Skip to content

Commit 45f8d6f

Browse files
committed
1 parent f6f6a18 commit 45f8d6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+6659
-878
lines changed

DEPENDENCIES.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ graph LR;
8282
libnpmversion-->semver;
8383
make-fetch-happen-->cacache;
8484
make-fetch-happen-->minipass-fetch;
85+
make-fetch-happen-->npmcli-agent["@npmcli/agent"];
8586
make-fetch-happen-->ssri;
8687
nopt-->abbrev;
8788
normalize-package-data-->hosted-git-info;
@@ -259,8 +260,6 @@ graph LR;
259260
```mermaid
260261
graph LR;
261262
agent-base-->debug;
262-
agentkeepalive-->debug;
263-
agentkeepalive-->depd;
264263
agentkeepalive-->humanize-ms;
265264
aggregate-error-->clean-stack;
266265
aggregate-error-->indent-string;
@@ -460,6 +459,7 @@ graph LR;
460459
make-fetch-happen-->minipass-pipeline;
461460
make-fetch-happen-->minipass;
462461
make-fetch-happen-->negotiator;
462+
make-fetch-happen-->npmcli-agent["@npmcli/agent"];
463463
make-fetch-happen-->promise-retry;
464464
make-fetch-happen-->socks-proxy-agent;
465465
make-fetch-happen-->ssri;
@@ -598,6 +598,8 @@ graph LR;
598598
npm-registry-fetch-->minizlib;
599599
npm-registry-fetch-->npm-package-arg;
600600
npm-registry-fetch-->proc-log;
601+
npmcli-agent-->lru-cache;
602+
npmcli-agent-->socks;
601603
npmcli-arborist-->benchmark;
602604
npmcli-arborist-->bin-links;
603605
npmcli-arborist-->cacache;
@@ -828,4 +830,4 @@ packages higher up the chain.
828830
- @npmcli/git, make-fetch-happen, @npmcli/config, init-package-json
829831
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, @npmcli/run-script, read-package-json, promzard
830832
- @npmcli/docs, @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, npm-install-checks, npm-package-arg, npm-packlist, normalize-package-data, bin-links, nopt, npmlog, parse-conflict-json, @npmcli/mock-globals, read
831-
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, minify-registry-metadata, ini, @npmcli/disparity-colors, mute-stream, npm-audit-report, npm-user-validate
833+
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, are-we-there-yet, gauge, minify-registry-metadata, ini, @npmcli/disparity-colors, mute-stream, @npmcli/agent, npm-audit-report, npm-user-validate

node_modules/.gitignore

+11-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
!/@npmcli/metavuln-calculator
2828
!/@npmcli/metavuln-calculator/node_modules/
2929
/@npmcli/metavuln-calculator/node_modules/*
30+
!/@npmcli/metavuln-calculator/node_modules/make-fetch-happen
3031
!/@npmcli/metavuln-calculator/node_modules/npm-registry-fetch
3132
!/@npmcli/metavuln-calculator/node_modules/pacote
3233
!/@npmcli/name-from-folder
@@ -97,7 +98,6 @@
9798
!/debug/node_modules/ms
9899
!/defaults
99100
!/delegates
100-
!/depd
101101
!/diff
102102
!/eastasianwidth
103103
!/emoji-regex
@@ -149,6 +149,9 @@
149149
!/just-diff
150150
!/lru-cache
151151
!/make-fetch-happen
152+
!/make-fetch-happen/node_modules/
153+
/make-fetch-happen/node_modules/*
154+
!/make-fetch-happen/node_modules/minipass
152155
!/minimatch
153156
!/minipass-collect
154157
!/minipass-collect/node_modules/
@@ -188,6 +191,7 @@
188191
!/node-gyp/node_modules/brace-expansion
189192
!/node-gyp/node_modules/gauge
190193
!/node-gyp/node_modules/glob
194+
!/node-gyp/node_modules/make-fetch-happen
191195
!/node-gyp/node_modules/minimatch
192196
!/node-gyp/node_modules/nopt
193197
!/node-gyp/node_modules/npmlog
@@ -207,7 +211,6 @@
207211
!/npm-registry-fetch
208212
!/npm-registry-fetch/node_modules/
209213
/npm-registry-fetch/node_modules/*
210-
!/npm-registry-fetch/node_modules/make-fetch-happen
211214
!/npm-registry-fetch/node_modules/minipass
212215
!/npm-user-validate
213216
!/npmlog
@@ -256,6 +259,9 @@
256259
!/shebang-regex
257260
!/signal-exit
258261
!/sigstore
262+
!/sigstore/node_modules/
263+
/sigstore/node_modules/*
264+
!/sigstore/node_modules/make-fetch-happen
259265
!/smart-buffer
260266
!/socks-proxy-agent
261267
!/socks
@@ -281,6 +287,9 @@
281287
!/tiny-relative-date
282288
!/treeverse
283289
!/tuf-js
290+
!/tuf-js/node_modules/
291+
/tuf-js/node_modules/*
292+
!/tuf-js/node_modules/make-fetch-happen
284293
!/unique-filename
285294
!/unique-slug
286295
!/util-deprecate

node_modules/npm-registry-fetch/node_modules/make-fetch-happen/lib/remote.js renamed to node_modules/@npmcli/metavuln-calculator/node_modules/make-fetch-happen/lib/remote.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const promiseRetry = require('promise-retry')
44
const ssri = require('ssri')
55

66
const CachingMinipassPipeline = require('./pipeline.js')
7-
const { getAgent } = require('@npmcli/agent')
7+
const getAgent = require('./agent.js')
88
const pkg = require('../package.json')
99

1010
const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})`
@@ -14,15 +14,9 @@ const RETRY_ERRORS = [
1414
'ECONNREFUSED', // remote host refused to open connection
1515
'EADDRINUSE', // failed to bind to a local port (proxy?)
1616
'ETIMEDOUT', // someone in the transaction is WAY TOO SLOW
17-
// from @npmcli/agent
18-
'ECONNECTIONTIMEOUT',
19-
'EIDLETIMEOUT',
20-
'ERESPONSETIMEOUT',
21-
'ETRANSFERTIMEOUT',
17+
'ERR_SOCKET_TIMEOUT', // same as above, but this one comes from agentkeepalive
2218
// Known codes we do NOT retry on:
2319
// ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline)
24-
// EINVALIDPROXY // invalid protocol from @npmcli/agent
25-
// EINVALIDRESPONSE // invalid status code from @npmcli/agent
2620
]
2721

2822
const RETRY_TYPES = [

node_modules/npm-registry-fetch/node_modules/make-fetch-happen/package.json renamed to node_modules/@npmcli/metavuln-calculator/node_modules/make-fetch-happen/package.json

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "make-fetch-happen",
3-
"version": "12.0.0",
3+
"version": "11.1.1",
44
"description": "Opinionated, caching, retrying fetch client",
55
"main": "lib/index.js",
66
"files": [
@@ -33,28 +33,32 @@
3333
"author": "GitHub Inc.",
3434
"license": "ISC",
3535
"dependencies": {
36-
"@npmcli/agent": "^1.1.0",
36+
"agentkeepalive": "^4.2.1",
3737
"cacache": "^17.0.0",
3838
"http-cache-semantics": "^4.1.1",
39+
"http-proxy-agent": "^5.0.0",
40+
"https-proxy-agent": "^5.0.0",
3941
"is-lambda": "^1.0.1",
40-
"minipass": "^7.0.2",
42+
"lru-cache": "^7.7.1",
43+
"minipass": "^5.0.0",
4144
"minipass-fetch": "^3.0.0",
4245
"minipass-flush": "^1.0.5",
4346
"minipass-pipeline": "^1.2.4",
4447
"negotiator": "^0.6.3",
4548
"promise-retry": "^2.0.1",
49+
"socks-proxy-agent": "^7.0.0",
4650
"ssri": "^10.0.0"
4751
},
4852
"devDependencies": {
4953
"@npmcli/eslint-config": "^4.0.0",
50-
"@npmcli/template-oss": "4.18.0",
54+
"@npmcli/template-oss": "4.14.1",
5155
"nock": "^13.2.4",
5256
"safe-buffer": "^5.2.1",
5357
"standard-version": "^9.3.2",
5458
"tap": "^16.0.0"
5559
},
5660
"engines": {
57-
"node": "^16.13.0 || >=18.0.0"
61+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
5862
},
5963
"tap": {
6064
"color": 1,
@@ -68,13 +72,7 @@
6872
},
6973
"templateOSS": {
7074
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
71-
"ciVersions": [
72-
"16.13.0",
73-
"16.x",
74-
"18.0.0",
75-
"18.x"
76-
],
77-
"version": "4.18.0",
75+
"version": "4.14.1",
7876
"publish": "true"
7977
}
8078
}

node_modules/agentkeepalive/History.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11

2+
4.5.0 / 2023-08-06
3+
==================
4+
5+
**others**
6+
* [[`1e5e312`](http://github.com/node-modules/agentkeepalive/commit/1e5e312f36491243372dbfee0dd47607e7b3d94a)] - deps: remove debug and depd (#114) (fengmk2 <<[email protected]>>)
7+
8+
4.4.0 / 2023-08-05
9+
==================
10+
11+
**features**
12+
* [[`c7c1e93`](http://github.com/node-modules/agentkeepalive/commit/c7c1e93beba7310d7c2cc9647dd211a686d21cac)] - feat: return socket from createConnection (#113) (Nabeel Bukhari <<[email protected]>>)
13+
214
4.3.0 / 2023-03-06
315
==================
416

node_modules/agentkeepalive/lib/agent.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
const OriginalAgent = require('http').Agent;
44
const ms = require('humanize-ms');
5-
const debug = require('debug')('agentkeepalive');
6-
const deprecate = require('depd')('agentkeepalive');
5+
const debug = require('util').debuglog('agentkeepalive');
76
const {
87
INIT_SOCKET,
98
CURRENT_ID,
@@ -27,6 +26,10 @@ if (majorVersion >= 11 && majorVersion <= 12) {
2726
defaultTimeoutListenerCount = 3;
2827
}
2928

29+
function deprecate(message) {
30+
console.log('[agentkeepalive:deprecated] %s', message);
31+
}
32+
3033
class Agent extends OriginalAgent {
3134
constructor(options) {
3235
options = options || {};
@@ -230,6 +233,7 @@ class Agent extends OriginalAgent {
230233

231234
const newSocket = super.createConnection(options, onNewCreate);
232235
if (newSocket) onNewCreate(null, newSocket);
236+
return newSocket;
233237
}
234238

235239
get statusChanged() {

node_modules/agentkeepalive/lib/https_agent.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class HttpsAgent extends HttpAgent {
2525
};
2626
}
2727

28-
createConnection(options) {
29-
const socket = this[CREATE_HTTPS_CONNECTION](options);
28+
createConnection(options, oncreate) {
29+
const socket = this[CREATE_HTTPS_CONNECTION](options, oncreate);
3030
this[INIT_SOCKET](socket, options);
3131
return socket;
3232
}

node_modules/agentkeepalive/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agentkeepalive",
3-
"version": "4.3.0",
3+
"version": "4.5.0",
44
"description": "Missing keepalive http.Agent",
55
"main": "index.js",
66
"browser": "browser.js",
@@ -14,7 +14,7 @@
1414
"contributor": "git-contributor",
1515
"test": "npm run lint && egg-bin test --full-trace",
1616
"test-local": "egg-bin test --full-trace",
17-
"cov": "cross-env DEBUG=agentkeepalive egg-bin cov --full-trace",
17+
"cov": "cross-env NODE_DEBUG=agentkeepalive egg-bin cov --full-trace",
1818
"ci": "npm run lint && npm run cov",
1919
"lint": "eslint lib test index.js"
2020
},
@@ -35,8 +35,6 @@
3535
"HttpsAgent"
3636
],
3737
"dependencies": {
38-
"debug": "^4.1.0",
39-
"depd": "^2.0.0",
4038
"humanize-ms": "^1.2.1"
4139
},
4240
"devDependencies": {

node_modules/depd/History.md

-103
This file was deleted.

node_modules/depd/LICENSE

-22
This file was deleted.

0 commit comments

Comments
 (0)