Skip to content

Commit 5e49a4a

Browse files
authored
Resolved npm vulnerabilities (#153)
The only way I found for resolving npm audit warnings was by forcing the usage of the latest version of the `gulp-parent` dependency. For that I've used a new `override` support in Node v8: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides Here is the output from `npm audit` after the change: ![image](https://user-images.githubusercontent.com/34246760/176778632-0ad02fc3-b392-4b7e-b0e2-092ac3b6560b.png) I've also updated the license header of the jquery-validation-unobtrusive.js file so that it is aligned with our current (MIT) license as well as is written in JSDoc style, as that's what the new gulp-uglify dependency requires. Otherwise, the license comments will be stripped out from the generated `.min.js` file. Keeping this as `draft` for now to validate the fix before actually proceeding with merging, given that I've updated the dependencies to their latest versions. ** Validation ** Did some basic validation and it works: <img width="617" alt="image" src="https://user-images.githubusercontent.com/34246760/176960882-76a24951-c619-45c8-ba91-8b7c8ca32b87.png">
1 parent 19f88bf commit 5e49a4a

File tree

5 files changed

+5430
-884
lines changed

5 files changed

+5430
-884
lines changed

gulpfile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ function minifyjs() {
1010
.pipe(replace(/@version.*/, '@version v' + pkg.version))
1111
.pipe(gulp.dest("dist"))
1212
.pipe(uglify({
13-
preserveComments: 'license'
13+
mangle: true,
14+
output: {
15+
comments: "some"
16+
}
1417
}))
15-
.pipe(lec({eolc: 'CRLF'}))
16-
.pipe(rename({suffix: '.min'}))
18+
.pipe(lec({ eolc: 'CRLF' }))
19+
.pipe(rename({ suffix: '.min' }))
1720
.pipe(gulp.dest("dist"));
1821
}
1922

0 commit comments

Comments
 (0)