Skip to content

Commit 814c5c7

Browse files
authored
Merge pull request #13 from djbreen7/npm-updates
Fix Node Module Vulnerabilities
2 parents 2913b3f + f5b0724 commit 814c5c7

File tree

9 files changed

+5988
-50
lines changed

9 files changed

+5988
-50
lines changed

.eslintrc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"no-array-constructor": 2,
66
"no-caller": 2,
77
"no-catch-shadow": 2,
8-
"no-empty-label": 2,
98
"no-eval": 2,
109
"no-extend-native": 2,
1110
"no-extra-bind": 2,
@@ -40,12 +39,12 @@
4039
"semi": 2,
4140
"semi-spacing": [2, {"before": false, "after": true}],
4241
"space-infix-ops": 2,
43-
"space-return-throw-case": 2,
4442
"space-unary-ops": [2, { "words": true, "nonwords": false }],
4543
"yoda": [2, "never"],
4644
"brace-style": [2, "stroustrup", { "allowSingleLine": false }],
4745
"eol-last": 2,
4846
"indent": 2,
47+
"keyword-spacing": [2, {"after": true}],
4948
"key-spacing": [2, { "align": "value" }],
5049
"max-nested-callbacks": [2, 3],
5150
"new-parens": 2,
@@ -58,7 +57,6 @@
5857
"object-curly-spacing": [2, "always"],
5958
"operator-assignment": [2, "always"],
6059
"quotes": [2, "single", "avoid-escape"],
61-
"space-after-keywords": [2, "always"],
6260
"space-before-blocks": [2, "always"],
6361
"prefer-const": 2,
6462
"no-path-concat": 2,
@@ -82,6 +80,7 @@
8280
"handle-callback-err": 0
8381
},
8482
"env": {
85-
"node": true
83+
"node": true,
84+
"es6": true
8685
}
8786
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: node_js
22
node_js:
33
- stable
4-
- v4
4+
- 6

Gulpfile.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
'use strict';
22

3-
var gulp = require('gulp');
3+
var gulp = require('gulp');
44
var eslint = require('gulp-eslint');
5-
var mocha = require('gulp-mocha');
5+
var mocha = require('gulp-mocha');
66

7-
gulp.task('lint', function () {
7+
function lint () {
88
return gulp
99
.src([
1010
'generators/app/index.js',
11-
'test.js',
11+
'test/test.js',
1212
'Gulpfile.js'
1313
])
1414
.pipe(eslint())
1515
.pipe(eslint.format())
1616
.pipe(eslint.failAfterError());
17-
});
17+
}
1818

19-
gulp.task('test', ['lint'], function () {
19+
function test () {
2020
return gulp
2121
.src('test/test.js')
2222
.pipe(mocha({
2323
ui: 'bdd',
2424
reporter: 'spec',
2525
timeout: typeof v8debug === 'undefined' ? 20000 : Infinity // NOTE: disable timeouts in debug
2626
}));
27-
});
27+
}
28+
29+
exports.lint = lint;
30+
exports.test = gulp.series(lint, test);

generators/app/index.js

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
'use strict';
2-
var yeoman = require('yeoman-generator');
2+
var Generator = require('yeoman-generator');
33
var slugify = require('underscore.string').slugify;
44
var normalizeUrl = require('normalize-url');
55

66
function filterProjectName (name) {
77
return slugify(name.replace(/^testcafe(-|\s)reporter(-|\s)/i, ''));
88
}
99

10-
module.exports = yeoman.generators.Base.extend({
11-
prompting: function () {
12-
var done = this.async();
13-
var gen = this;
14-
10+
module.exports = class extends Generator {
11+
prompting () {
1512
var prompts = [
1613
{
1714
name: 'reporterName',
@@ -43,16 +40,14 @@ module.exports = yeoman.generators.Base.extend({
4340
}
4441
];
4542

46-
this.prompt(prompts, function (props) {
47-
gen.props = props;
48-
49-
done();
50-
});
51-
},
52-
53-
writing: function () {
54-
var gen = this;
43+
return this
44+
.prompt(prompts)
45+
.then(props => {
46+
this.props = props;
47+
});
48+
}
5549

50+
writing () {
5651
var tmplProps = {
5752
author: this.user.git.name(),
5853
email: this.user.git.email(),
@@ -74,12 +69,12 @@ module.exports = yeoman.generators.Base.extend({
7469
this.fs.copyTpl(this.templatePath() + '/**/!(*.png)', this.destinationPath(), tmplProps);
7570
this.fs.copy(this.templatePath() + '/**/*.png', this.destinationPath());
7671

77-
Object.keys(unescaped).forEach(function (escaped) {
78-
gen.fs.move(gen.destinationPath(escaped), gen.destinationPath(unescaped[escaped]));
72+
Object.keys(unescaped).forEach(escaped => {
73+
this.fs.move(this.destinationPath(escaped), this.destinationPath(unescaped[escaped]));
7974
});
80-
},
75+
}
8176

82-
install: function () {
77+
install () {
8378
this.installDependencies({ bower: false });
8479
}
85-
});
80+
};

generators/app/templates/_.eslintrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"no-caller": 2,
88
"no-catch-shadow": 2,
99
"no-console": 0,
10-
"no-empty-label": 2,
1110
"no-eval": 2,
1211
"no-extend-native": 2,
1312
"no-extra-bind": 2,
@@ -41,7 +40,7 @@
4140
"semi": 2,
4241
"semi-spacing": [2, {"before": false, "after": true}],
4342
"space-infix-ops": 2,
44-
"space-return-throw-case": 2,
43+
"keyword-spacing": [2, {"after": true}],
4544
"space-unary-ops": [2, { "words": true, "nonwords": false }],
4645
"yoda": [2, "never"],
4746
"brace-style": [2, "stroustrup", { "allowSingleLine": false }],
@@ -59,7 +58,6 @@
5958
"object-curly-spacing": [2, "always"],
6059
"operator-assignment": [2, "always"],
6160
"quotes": [2, "single", "avoid-escape"],
62-
"space-after-keywords": [2, "always"],
6361
"space-before-blocks": [2, "always"],
6462
"prefer-const": 2,
6563
"no-path-concat": 2,

generators/app/templates/_package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
],
2525
"license": "MIT",
2626
"devDependencies": {
27-
"babel-eslint": "^4.0.10",
27+
"@babel/core": "^7.3.4",
28+
"babel-eslint": "^10.0.1",
2829
"callsite-record": "^3.2.0",
2930
"del": "^1.2.0",
30-
"gulp": "^3.9.0",
31-
"gulp-babel": "^5.2.1",
32-
"gulp-eslint": "^1.1.1",
33-
"gulp-mocha": "^2.2.0",
31+
"gulp": "^4.0.0",
32+
"gulp-babel": "^8.0.0",
33+
"gulp-eslint": "^5.0.0",
34+
"gulp-mocha": "^6.0.0",
3435
"normalize-newline": "^1.0.2",
35-
"publish-please": "^1.0.1",
36-
"publish-please": "^2.1.4",
36+
"publish-please": "^5.4.3",
3737
"read-file-relative": "^1.2.0",
38-
"testcafe": "^0.2.0-alpha"
38+
"testcafe": "^1.0.1"
3939
}
4040
}

0 commit comments

Comments
 (0)