retire 3.1.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/bin/retire +2 -1
- package/lib/resolve.js +2 -1
- package/lib/retire.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -39,6 +39,7 @@ Options:
|
|
|
39
39
|
--exitwith <code> Custom exit code (default: 13) when vulnerabilities are found
|
|
40
40
|
--colors Enable color output (console output only)
|
|
41
41
|
--insecure Enable fetching remote jsrepo/noderepo files from hosts using an insecure or self-signed SSL (TLS) certificate
|
|
42
|
+
--ext <extensions> Comman separated list of file extensions for javascript files. The default is "js"
|
|
42
43
|
--cacert <path> Use the specified certificate file to verify the peer used for fetching remote jsrepo/noderepo files
|
|
43
44
|
````
|
|
44
45
|
|
package/bin/retire
CHANGED
|
@@ -60,13 +60,14 @@ program
|
|
|
60
60
|
.option('--exitwith <code>', 'Custom exit code (default: 13) when vulnerabilities are found')
|
|
61
61
|
.option('--colors', 'Enable color output (console output only)')
|
|
62
62
|
.option('--insecure', 'Enable fetching remote jsrepo/noderepo files from hosts using an insecure or self-signed SSL (TLS) certificate')
|
|
63
|
+
.option('--ext <extensions>', 'Comman separated list of file extensions for javascript files. The default is "js"')
|
|
63
64
|
.option('--cacert <path>', 'Use the specified certificate file to verify the peer used for fetching remote jsrepo/noderepo files')
|
|
64
65
|
.parse(process.argv);
|
|
65
66
|
|
|
66
67
|
var config = utils.extend({ path: '.' }, utils.pick(program, [
|
|
67
68
|
'package', 'node', 'js', 'jspath', 'verbose', 'nodepath', 'path', 'jsrepo', 'noderepo',
|
|
68
69
|
'dropexternal', 'nocache', 'proxy', 'ignore', 'ignorefile', 'outputformat', 'outputpath',
|
|
69
|
-
'severity', 'exitwith', 'colors', 'includemeta', 'cachedir', 'insecure', 'cacert'
|
|
70
|
+
'severity', 'exitwith', 'colors', 'includemeta', 'cachedir', 'insecure', 'cacert', 'ext'
|
|
70
71
|
]));
|
|
71
72
|
|
|
72
73
|
if (!config.nocache && !config.cachedir) {
|
package/lib/resolve.js
CHANGED
|
@@ -69,8 +69,9 @@ function getNodeDependencies(path, limit) {
|
|
|
69
69
|
|
|
70
70
|
function scanJsFiles(path, options) {
|
|
71
71
|
var finder = walkdir.find(path, { "follow_symlinks" : false, "no_return": true });
|
|
72
|
+
var ext = (options.ext || "js").split(",").map(e => "." + e);
|
|
72
73
|
function onFile(file){
|
|
73
|
-
if (file.
|
|
74
|
+
if (ext.some(e => file.endsWith(e))) {
|
|
74
75
|
finder.emit('jsfile', file);
|
|
75
76
|
}
|
|
76
77
|
if (file.match(/\/bower.json$/)) {
|
package/lib/retire.js
CHANGED
package/package.json
CHANGED