retire 4.2.0 → 4.2.2

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.2.2]
4
+
5
+ ### Bugfix
6
+
7
+ - Proxy setting did not work
8
+
9
+ ## [4.2.1]
10
+
11
+ ### Changes
12
+
13
+ - Fix provenance settings
14
+
3
15
  ## [4.2.0]
4
16
 
5
17
  ### Changes
package/lib/cli.js CHANGED
@@ -108,6 +108,7 @@ const config = {
108
108
  exitwith: (_j = prg.exitwith) !== null && _j !== void 0 ? _j : 13,
109
109
  includeOsv: !!prg.includeOsv,
110
110
  verbose: !!prg.verbose,
111
+ proxy: prg.proxy,
111
112
  };
112
113
  log.info(`retire.js v${retire.version}`);
113
114
  function exitWithError(msg) {
package/lib/repo.js CHANGED
@@ -31,9 +31,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31
31
  step((generator = generator.apply(thisArg, _arguments || [])).next());
32
32
  });
33
33
  };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
34
  Object.defineProperty(exports, "__esModule", { value: true });
38
35
  exports.loadrepositoryFromFile = exports.loadrepository = exports.asbowerrepo = void 0;
39
36
  const fs = __importStar(require("fs"));
@@ -42,7 +39,7 @@ const http = __importStar(require("http"));
42
39
  const https = __importStar(require("https"));
43
40
  const retire = __importStar(require("./retire"));
44
41
  const URL = __importStar(require("url"));
45
- const proxy_agent_1 = __importDefault(require("proxy-agent"));
42
+ const proxy_agent_1 = require("proxy-agent");
46
43
  function loadJson(url, options) {
47
44
  return __awaiter(this, void 0, void 0, function* () {
48
45
  return new Promise((resolve, reject) => {
@@ -50,7 +47,9 @@ function loadJson(url, options) {
50
47
  const reqOptions = Object.assign(Object.assign({}, URL.parse(url)), { method: 'GET' });
51
48
  const proxyUri = options.proxy || process.env.http_proxy;
52
49
  if (proxyUri) {
53
- reqOptions.agent = new proxy_agent_1.default(proxyUri);
50
+ reqOptions.agent = new proxy_agent_1.ProxyAgent({
51
+ getProxyForUrl: () => proxyUri,
52
+ });
54
53
  }
55
54
  if (options.insecure) {
56
55
  reqOptions.rejectUnauthorized = false;
package/lib/retire.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  var exports = exports || {};
7
- exports.version = '4.2.0';
7
+ exports.version = '4.2.2';
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": "4.2.0",
5
+ "version": "4.2.2",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "ansi-colors": "^4.1.1",
17
17
  "commander": "^10.0.0",
18
- "proxy-agent": "^5.0.0",
18
+ "proxy-agent": "^6.2.0",
19
19
  "uuid": "^9.0.0",
20
20
  "walkdir": "0.4.1",
21
21
  "zod": "^3.20.6"