retire 3.0.5 → 3.0.6

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.0.6]
4
+
5
+ ### Security
6
+
7
+ - Switch the `colors` package with `ansi-colors`
8
+
3
9
  ## [3.0.4] / [3.0.5]
4
10
 
5
11
  ### Security
package/bin/retire CHANGED
@@ -12,7 +12,7 @@ var utils = require('../lib/utils'),
12
12
  os = require('os'),
13
13
  path = require('path'),
14
14
  fs = require('fs'),
15
- colors = require('colors/safe'),
15
+ colors = require('ansi-colors'),
16
16
  emitter = new require('events').EventEmitter;
17
17
 
18
18
  var events = new emitter();
@@ -32,9 +32,6 @@ var severityLevels = {
32
32
  critical: 4
33
33
  };
34
34
 
35
- colors.setTheme({
36
- warn: 'red'
37
- });
38
35
 
39
36
 
40
37
  /*
@@ -80,7 +77,7 @@ if (!config.nocache && !config.cachedir) {
80
77
 
81
78
  config.ignore = config.ignore ? utils.map(config.ignore.split(','), function(e) { return path.resolve(e); }) : [];
82
79
  config.ignore = { paths : config.ignore, descriptors: [] };
83
- config.colorwarn = config.colors ? colors.warn : x => x;
80
+ config.colorwarn = config.colors ? colors.red : x => x;
84
81
 
85
82
  if (!config.ignorefile) {
86
83
  config.ignorefile = defaultIgnoreFiles.filter(function(x){ return fs.existsSync(x); })[0];
@@ -203,7 +200,7 @@ events.on('scan-js', function() {
203
200
  });
204
201
 
205
202
  events.on('scan-node', function() {
206
- console.warn('DEPRECATION NOTICE: The node scanning is deprecated and will be removed soon. See https://github.com/RetireJS/retire.js/wiki/Deprecating-the-node.js-scanner ')
203
+ console.warn('DEPRECATION NOTICE: The node scanning is deprecated and will be removed soon. See https://github.com/RetireJS/retire.js/wiki/Deprecating-the-node.js-scanner ');
207
204
  resolve.getNodeDependencies(config.nodepath || config.path, config.package).on('done', function(dependencies) {
208
205
  scanner.scanDependencies(dependencies, nodeRepo, config);
209
206
  events.emit('scan-done');
package/lib/retire.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  var exports = exports || {};
7
- exports.version = '3.0.5';
7
+ exports.version = '3.0.6';
8
8
 
9
9
  function isDefined(o) {
10
10
  return typeof o !== 'undefined';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Erlend Oftedal <erlend@oftedal.no>",
3
3
  "name": "retire",
4
4
  "description": "Retire is a tool for detecting use of vulnerable libraries",
5
- "version": "3.0.5",
5
+ "version": "3.0.6",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -13,16 +13,16 @@
13
13
  },
14
14
  "main": "./lib/retire.js",
15
15
  "dependencies": {
16
- "colors": "1.4.0",
16
+ "ansi-colors": "^4.1.1",
17
17
  "commander": "2.5.x",
18
18
  "https-proxy-agent": "^5.0.0",
19
19
  "read-installed": "^4.0.3",
20
20
  "walkdir": "0.4.1"
21
21
  },
22
22
  "devDependencies": {
23
- "chai": "^4.2.0",
23
+ "chai": "^4.3.4",
24
24
  "jshint": "^2.12.0",
25
- "mocha": "^8.1.3"
25
+ "mocha": "^9.1.3"
26
26
  },
27
27
  "scripts": {
28
28
  "test": "./test"