pnpm 7.9.1 → 7.9.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/README.md +22 -7
- package/bin/pnpm.cjs +3 -0
- package/bin/pnpx.cjs +1 -15
- package/dist/node_modules/.modules.yaml +3 -3
- package/dist/node_modules/.pnpm/lock.yaml +76 -42
- package/dist/node_modules/@npmcli/fs/lib/common/owner-sync.js +96 -0
- package/dist/node_modules/@npmcli/fs/lib/common/owner.js +8 -4
- package/dist/node_modules/@npmcli/fs/lib/copy-file.js +3 -9
- package/dist/node_modules/@npmcli/fs/lib/fs.js +9 -3
- package/dist/node_modules/@npmcli/fs/lib/index.js +3 -1
- package/dist/node_modules/@npmcli/fs/lib/mkdir.js +19 -0
- package/dist/node_modules/@npmcli/fs/lib/mkdtemp.js +3 -8
- package/dist/node_modules/@npmcli/fs/lib/with-owner-sync.js +21 -0
- package/dist/node_modules/@npmcli/fs/lib/with-owner.js +21 -0
- package/dist/node_modules/@npmcli/fs/lib/with-temp-dir.js +4 -2
- package/dist/node_modules/@npmcli/fs/lib/write-file.js +3 -8
- package/dist/node_modules/@npmcli/fs/package.json +21 -9
- package/dist/node_modules/@npmcli/move-file/{index.js → lib/index.js} +50 -27
- package/dist/node_modules/@npmcli/move-file/package.json +20 -7
- package/dist/node_modules/@tootallnate/once/LICENSE +21 -0
- package/dist/node_modules/@tootallnate/once/dist/index.js +21 -36
- package/dist/node_modules/@tootallnate/once/dist/index.js.map +1 -1
- package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js +3 -0
- package/dist/node_modules/@tootallnate/once/dist/overloaded-parameters.js.map +1 -0
- package/dist/node_modules/@tootallnate/once/dist/types.js +3 -0
- package/dist/node_modules/@tootallnate/once/dist/types.js.map +1 -0
- package/dist/node_modules/@tootallnate/once/package.json +22 -15
- package/dist/node_modules/cacache/lib/content/read.js +99 -102
- package/dist/node_modules/cacache/lib/content/rm.js +9 -8
- package/dist/node_modules/cacache/lib/content/write.js +67 -67
- package/dist/node_modules/cacache/lib/entry-index.js +128 -118
- package/dist/node_modules/cacache/{get.js → lib/get.js} +88 -100
- package/dist/node_modules/cacache/{index.js → lib/index.js} +5 -6
- package/dist/node_modules/cacache/lib/memoization.js +10 -11
- package/dist/node_modules/cacache/{put.js → lib/put.js} +23 -26
- package/dist/node_modules/cacache/{rm.js → lib/rm.js} +3 -3
- package/dist/node_modules/cacache/lib/util/fix-owner.js +41 -38
- package/dist/node_modules/cacache/lib/util/move-file.js +36 -47
- package/dist/node_modules/cacache/lib/util/tmp.js +5 -7
- package/dist/node_modules/cacache/lib/verify.js +160 -190
- package/dist/node_modules/cacache/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
- package/dist/node_modules/cacache/node_modules/brace-expansion/LICENSE +21 -0
- package/dist/node_modules/cacache/node_modules/brace-expansion/index.js +203 -0
- package/dist/node_modules/cacache/node_modules/brace-expansion/package.json +46 -0
- package/dist/node_modules/cacache/node_modules/glob/LICENSE +15 -0
- package/dist/node_modules/cacache/node_modules/glob/common.js +240 -0
- package/dist/node_modules/cacache/node_modules/glob/glob.js +790 -0
- package/dist/node_modules/cacache/node_modules/glob/package.json +55 -0
- package/dist/node_modules/cacache/node_modules/glob/sync.js +486 -0
- package/dist/node_modules/cacache/node_modules/minimatch/LICENSE +15 -0
- package/dist/node_modules/cacache/node_modules/minimatch/lib/path.js +4 -0
- package/dist/node_modules/cacache/node_modules/minimatch/minimatch.js +906 -0
- package/dist/node_modules/cacache/node_modules/minimatch/package.json +32 -0
- package/dist/node_modules/cacache/package.json +34 -30
- package/dist/node_modules/http-proxy-agent/dist/agent.js +3 -3
- package/dist/node_modules/http-proxy-agent/dist/agent.js.map +1 -1
- package/dist/node_modules/http-proxy-agent/package.json +4 -4
- package/dist/node_modules/lru-cache/LICENSE +1 -1
- package/dist/node_modules/lru-cache/index.js +921 -247
- package/dist/node_modules/lru-cache/package.json +49 -9
- package/dist/node_modules/make-fetch-happen/LICENSE +1 -1
- package/dist/node_modules/make-fetch-happen/lib/agent.js +34 -14
- package/dist/node_modules/make-fetch-happen/lib/cache/entry.js +90 -106
- package/dist/node_modules/make-fetch-happen/lib/cache/errors.js +1 -0
- package/dist/node_modules/make-fetch-happen/lib/cache/index.js +10 -6
- package/dist/node_modules/make-fetch-happen/lib/cache/policy.js +21 -21
- package/dist/node_modules/make-fetch-happen/lib/dns.js +49 -0
- package/dist/node_modules/make-fetch-happen/lib/fetch.js +40 -22
- package/dist/node_modules/make-fetch-happen/lib/index.js +4 -3
- package/dist/node_modules/make-fetch-happen/lib/options.js +17 -9
- package/dist/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
- package/dist/node_modules/make-fetch-happen/lib/remote.js +28 -9
- package/dist/node_modules/make-fetch-happen/package.json +36 -33
- package/dist/node_modules/minipass-fetch/lib/blob.js +4 -4
- package/dist/node_modules/minipass-fetch/lib/body.js +63 -49
- package/dist/node_modules/minipass-fetch/lib/fetch-error.js +2 -1
- package/dist/node_modules/minipass-fetch/lib/headers.js +38 -21
- package/dist/node_modules/minipass-fetch/lib/index.js +130 -106
- package/dist/node_modules/minipass-fetch/lib/request.js +46 -28
- package/dist/node_modules/minipass-fetch/lib/response.js +3 -2
- package/dist/node_modules/minipass-fetch/package.json +27 -14
- package/dist/node_modules/node-gyp/.github/workflows/release-please.yml +1 -1
- package/dist/node_modules/node-gyp/.github/workflows/tests.yml +16 -9
- package/dist/node_modules/node-gyp/.github/workflows/visual-studio.yml +16 -8
- package/dist/node_modules/node-gyp/lib/build.js +7 -0
- package/dist/node_modules/node-gyp/lib/configure.js +26 -1
- package/dist/node_modules/node-gyp/lib/create-config-gypi.js +2 -1
- package/dist/node_modules/node-gyp/lib/find-visualstudio.js +9 -8
- package/dist/node_modules/node-gyp/lib/node-gyp.js +4 -0
- package/dist/node_modules/node-gyp/package.json +4 -4
- package/dist/node_modules/semver/node_modules/lru-cache/LICENSE +15 -0
- package/dist/node_modules/semver/node_modules/lru-cache/index.js +334 -0
- package/dist/node_modules/semver/node_modules/lru-cache/package.json +34 -0
- package/dist/node_modules/socks-proxy-agent/dist/index.js +3 -3
- package/dist/node_modules/socks-proxy-agent/dist/index.js.map +1 -1
- package/dist/node_modules/socks-proxy-agent/package.json +2 -2
- package/dist/node_modules/ssri/{index.js → lib/index.js} +78 -24
- package/dist/node_modules/ssri/package.json +27 -16
- package/dist/pnpm.cjs +67042 -65886
- package/package.json +6 -6
- package/dist/node_modules/@npmcli/fs/lib/common/file-url-to-path/index.js +0 -17
- package/dist/node_modules/@npmcli/fs/lib/common/file-url-to-path/polyfill.js +0 -121
- package/dist/node_modules/@npmcli/fs/lib/mkdir/index.js +0 -32
- package/dist/node_modules/@npmcli/fs/lib/mkdir/polyfill.js +0 -81
- package/dist/node_modules/cacache/lib/util/disposer.js +0 -30
- package/dist/node_modules/cacache/ls.js +0 -6
- package/dist/node_modules/cacache/verify.js +0 -3
- package/dist/node_modules/minipass-fetch/index.js +0 -1
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
2
|
+
|
|
3
|
+
name: visual-studio
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [ main ]
|
|
3
9
|
jobs:
|
|
4
|
-
|
|
10
|
+
visual-studio:
|
|
5
11
|
strategy:
|
|
6
12
|
fail-fast: false
|
|
7
|
-
max-parallel:
|
|
13
|
+
max-parallel: 8
|
|
8
14
|
matrix:
|
|
9
|
-
os: [windows-
|
|
15
|
+
os: [windows-latest]
|
|
16
|
+
msvs-version: [2016, 2019, 2022] # https://github.com/actions/virtual-environments/tree/main/images/win
|
|
10
17
|
runs-on: ${{ matrix.os }}
|
|
11
18
|
steps:
|
|
12
19
|
- name: Checkout Repository
|
|
13
|
-
uses: actions/checkout@
|
|
20
|
+
uses: actions/checkout@v3
|
|
14
21
|
- name: Install Dependencies
|
|
15
22
|
run: |
|
|
16
23
|
npm install --no-progress
|
|
24
|
+
# npm audit fix --force
|
|
17
25
|
- name: Set Windows environment
|
|
18
|
-
if: matrix.os
|
|
26
|
+
if: startsWith(matrix.os, 'windows')
|
|
19
27
|
run: |
|
|
20
|
-
echo 'GYP_MSVS_VERSION
|
|
28
|
+
echo 'GYP_MSVS_VERSION=${{ matrix.msvs-version }}' >> $Env:GITHUB_ENV
|
|
21
29
|
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
|
|
22
30
|
- name: Environment Information
|
|
23
31
|
run: npx envinfo
|
|
@@ -185,6 +185,13 @@ function build (gyp, argv, callback) {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
if (!win) {
|
|
189
|
+
// Add build-time dependency symlinks (such as Python) to PATH
|
|
190
|
+
const buildBinsDir = path.resolve('build', 'node_gyp_bins')
|
|
191
|
+
process.env.PATH = `${buildBinsDir}:${process.env.PATH}`
|
|
192
|
+
log.verbose('bin symlinks', `adding symlinks (such as Python), at "${buildBinsDir}", to PATH`)
|
|
193
|
+
}
|
|
194
|
+
|
|
188
195
|
var proc = gyp.spawn(command, argv)
|
|
189
196
|
proc.on('exit', onExit)
|
|
190
197
|
}
|
|
@@ -17,6 +17,7 @@ if (win) {
|
|
|
17
17
|
function configure (gyp, argv, callback) {
|
|
18
18
|
var python
|
|
19
19
|
var buildDir = path.resolve('build')
|
|
20
|
+
var buildBinsDir = path.join(buildDir, 'node_gyp_bins')
|
|
20
21
|
var configNames = ['config.gypi', 'common.gypi']
|
|
21
22
|
var configs = []
|
|
22
23
|
var nodeDir
|
|
@@ -73,7 +74,9 @@ function configure (gyp, argv, callback) {
|
|
|
73
74
|
|
|
74
75
|
function createBuildDir () {
|
|
75
76
|
log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
|
|
76
|
-
|
|
77
|
+
|
|
78
|
+
const deepestBuildDirSubdirectory = win ? buildDir : buildBinsDir
|
|
79
|
+
fs.mkdir(deepestBuildDirSubdirectory, { recursive: true }, function (err, isNew) {
|
|
77
80
|
if (err) {
|
|
78
81
|
return callback(err)
|
|
79
82
|
}
|
|
@@ -84,11 +87,31 @@ function configure (gyp, argv, callback) {
|
|
|
84
87
|
findVisualStudio(release.semver, gyp.opts.msvs_version,
|
|
85
88
|
createConfigFile)
|
|
86
89
|
} else {
|
|
90
|
+
createPythonSymlink()
|
|
87
91
|
createConfigFile()
|
|
88
92
|
}
|
|
89
93
|
})
|
|
90
94
|
}
|
|
91
95
|
|
|
96
|
+
function createPythonSymlink () {
|
|
97
|
+
const symlinkDestination = path.join(buildBinsDir, 'python3')
|
|
98
|
+
|
|
99
|
+
log.verbose('python symlink', `creating symlink to "${python}" at "${symlinkDestination}"`)
|
|
100
|
+
|
|
101
|
+
fs.unlink(symlinkDestination, function (err) {
|
|
102
|
+
if (err && err.code !== 'ENOENT') {
|
|
103
|
+
log.verbose('python symlink', 'error when attempting to remove existing symlink')
|
|
104
|
+
log.verbose('python symlink', err.stack, 'errno: ' + err.errno)
|
|
105
|
+
}
|
|
106
|
+
fs.symlink(python, symlinkDestination, function (err) {
|
|
107
|
+
if (err) {
|
|
108
|
+
log.verbose('python symlink', 'error when attempting to create Python symlink')
|
|
109
|
+
log.verbose('python symlink', err.stack, 'errno: ' + err.errno)
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
|
|
92
115
|
function createConfigFile (err, vsInfo) {
|
|
93
116
|
if (err) {
|
|
94
117
|
return callback(err)
|
|
@@ -169,6 +192,8 @@ function configure (gyp, argv, callback) {
|
|
|
169
192
|
})
|
|
170
193
|
} else {
|
|
171
194
|
candidates = [
|
|
195
|
+
'out/Release/lib.target/libnode',
|
|
196
|
+
'out/Debug/lib.target/libnode',
|
|
172
197
|
'out/Release/obj.target/libnode',
|
|
173
198
|
'out/Debug/obj.target/libnode',
|
|
174
199
|
'lib/libnode'
|
|
@@ -19,7 +19,8 @@ async function getBaseConfigGypi ({ gyp, nodeDir }) {
|
|
|
19
19
|
// try reading $nodeDir/include/node/config.gypi first when:
|
|
20
20
|
// 1. --dist-url or --nodedir is specified
|
|
21
21
|
// 2. and --force-process-config is not specified
|
|
22
|
-
const
|
|
22
|
+
const useCustomHeaders = gyp.opts.nodedir || gyp.opts.disturl || gyp.opts['dist-url']
|
|
23
|
+
const shouldReadConfigGypi = useCustomHeaders && !gyp.opts['force-process-config']
|
|
23
24
|
if (shouldReadConfigGypi && nodeDir) {
|
|
24
25
|
try {
|
|
25
26
|
const baseConfigGypiPath = path.resolve(nodeDir, 'include/node/config.gypi')
|
|
@@ -314,29 +314,30 @@ VisualStudioFinder.prototype = {
|
|
|
314
314
|
getSDK: function getSDK (info) {
|
|
315
315
|
const win8SDK = 'Microsoft.VisualStudio.Component.Windows81SDK'
|
|
316
316
|
const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.'
|
|
317
|
+
const win11SDKPrefix = 'Microsoft.VisualStudio.Component.Windows11SDK.'
|
|
317
318
|
|
|
318
|
-
var
|
|
319
|
+
var Win10or11SDKVer = 0
|
|
319
320
|
info.packages.forEach((pkg) => {
|
|
320
|
-
if (!pkg.startsWith(win10SDKPrefix)) {
|
|
321
|
+
if (!pkg.startsWith(win10SDKPrefix) && !pkg.startsWith(win11SDKPrefix)) {
|
|
321
322
|
return
|
|
322
323
|
}
|
|
323
324
|
const parts = pkg.split('.')
|
|
324
325
|
if (parts.length > 5 && parts[5] !== 'Desktop') {
|
|
325
|
-
this.log.silly('- ignoring non-Desktop
|
|
326
|
+
this.log.silly('- ignoring non-Desktop Win10/11SDK:', pkg)
|
|
326
327
|
return
|
|
327
328
|
}
|
|
328
329
|
const foundSdkVer = parseInt(parts[4], 10)
|
|
329
330
|
if (isNaN(foundSdkVer)) {
|
|
330
331
|
// Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb
|
|
331
|
-
this.log.silly('- failed to parse
|
|
332
|
+
this.log.silly('- failed to parse Win10/11SDK number:', pkg)
|
|
332
333
|
return
|
|
333
334
|
}
|
|
334
|
-
this.log.silly('- found
|
|
335
|
-
|
|
335
|
+
this.log.silly('- found Win10/11SDK:', foundSdkVer)
|
|
336
|
+
Win10or11SDKVer = Math.max(Win10or11SDKVer, foundSdkVer)
|
|
336
337
|
})
|
|
337
338
|
|
|
338
|
-
if (
|
|
339
|
-
return `10.0.${
|
|
339
|
+
if (Win10or11SDKVer !== 0) {
|
|
340
|
+
return `10.0.${Win10or11SDKVer}.0`
|
|
340
341
|
} else if (info.packages.indexOf(win8SDK) !== -1) {
|
|
341
342
|
this.log.silly('- found Win8SDK')
|
|
342
343
|
return '8.1'
|
|
@@ -149,6 +149,10 @@ proto.parseArgv = function parseOpts (argv) {
|
|
|
149
149
|
// gyp@741b7f1 enters an infinite loop when it encounters
|
|
150
150
|
// zero-length options so ensure those don't get through.
|
|
151
151
|
if (name) {
|
|
152
|
+
// convert names like force_process_config to force-process-config
|
|
153
|
+
if (name.includes('_')) {
|
|
154
|
+
name = name.replace(/_/g, '-')
|
|
155
|
+
}
|
|
152
156
|
this.opts[name] = val
|
|
153
157
|
}
|
|
154
158
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bindings",
|
|
12
12
|
"gyp"
|
|
13
13
|
],
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "9.1.0",
|
|
15
15
|
"installVersion": 9,
|
|
16
16
|
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",
|
|
17
17
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"env-paths": "^2.2.0",
|
|
26
26
|
"glob": "^7.1.4",
|
|
27
27
|
"graceful-fs": "^4.2.6",
|
|
28
|
-
"make-fetch-happen": "^
|
|
28
|
+
"make-fetch-happen": "^10.0.3",
|
|
29
29
|
"nopt": "^5.0.0",
|
|
30
30
|
"npmlog": "^6.0.0",
|
|
31
31
|
"rimraf": "^3.0.2",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"which": "^2.0.2"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": "
|
|
37
|
+
"node": "^12.22 || ^14.13 || >=16"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"bindings": "^1.5.0",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"lint": "standard */*.js test/**/*.js",
|
|
48
|
-
"test": "npm run lint && tap --timeout=
|
|
48
|
+
"test": "npm run lint && tap --timeout=600 test/test-*"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
// A linked list to keep track of recently-used-ness
|
|
4
|
+
const Yallist = require('yallist')
|
|
5
|
+
|
|
6
|
+
const MAX = Symbol('max')
|
|
7
|
+
const LENGTH = Symbol('length')
|
|
8
|
+
const LENGTH_CALCULATOR = Symbol('lengthCalculator')
|
|
9
|
+
const ALLOW_STALE = Symbol('allowStale')
|
|
10
|
+
const MAX_AGE = Symbol('maxAge')
|
|
11
|
+
const DISPOSE = Symbol('dispose')
|
|
12
|
+
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
|
|
13
|
+
const LRU_LIST = Symbol('lruList')
|
|
14
|
+
const CACHE = Symbol('cache')
|
|
15
|
+
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
|
|
16
|
+
|
|
17
|
+
const naiveLength = () => 1
|
|
18
|
+
|
|
19
|
+
// lruList is a yallist where the head is the youngest
|
|
20
|
+
// item, and the tail is the oldest. the list contains the Hit
|
|
21
|
+
// objects as the entries.
|
|
22
|
+
// Each Hit object has a reference to its Yallist.Node. This
|
|
23
|
+
// never changes.
|
|
24
|
+
//
|
|
25
|
+
// cache is a Map (or PseudoMap) that matches the keys to
|
|
26
|
+
// the Yallist.Node object.
|
|
27
|
+
class LRUCache {
|
|
28
|
+
constructor (options) {
|
|
29
|
+
if (typeof options === 'number')
|
|
30
|
+
options = { max: options }
|
|
31
|
+
|
|
32
|
+
if (!options)
|
|
33
|
+
options = {}
|
|
34
|
+
|
|
35
|
+
if (options.max && (typeof options.max !== 'number' || options.max < 0))
|
|
36
|
+
throw new TypeError('max must be a non-negative number')
|
|
37
|
+
// Kind of weird to have a default max of Infinity, but oh well.
|
|
38
|
+
const max = this[MAX] = options.max || Infinity
|
|
39
|
+
|
|
40
|
+
const lc = options.length || naiveLength
|
|
41
|
+
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
|
|
42
|
+
this[ALLOW_STALE] = options.stale || false
|
|
43
|
+
if (options.maxAge && typeof options.maxAge !== 'number')
|
|
44
|
+
throw new TypeError('maxAge must be a number')
|
|
45
|
+
this[MAX_AGE] = options.maxAge || 0
|
|
46
|
+
this[DISPOSE] = options.dispose
|
|
47
|
+
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
|
|
48
|
+
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
|
|
49
|
+
this.reset()
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// resize the cache when the max changes.
|
|
53
|
+
set max (mL) {
|
|
54
|
+
if (typeof mL !== 'number' || mL < 0)
|
|
55
|
+
throw new TypeError('max must be a non-negative number')
|
|
56
|
+
|
|
57
|
+
this[MAX] = mL || Infinity
|
|
58
|
+
trim(this)
|
|
59
|
+
}
|
|
60
|
+
get max () {
|
|
61
|
+
return this[MAX]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
set allowStale (allowStale) {
|
|
65
|
+
this[ALLOW_STALE] = !!allowStale
|
|
66
|
+
}
|
|
67
|
+
get allowStale () {
|
|
68
|
+
return this[ALLOW_STALE]
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
set maxAge (mA) {
|
|
72
|
+
if (typeof mA !== 'number')
|
|
73
|
+
throw new TypeError('maxAge must be a non-negative number')
|
|
74
|
+
|
|
75
|
+
this[MAX_AGE] = mA
|
|
76
|
+
trim(this)
|
|
77
|
+
}
|
|
78
|
+
get maxAge () {
|
|
79
|
+
return this[MAX_AGE]
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// resize the cache when the lengthCalculator changes.
|
|
83
|
+
set lengthCalculator (lC) {
|
|
84
|
+
if (typeof lC !== 'function')
|
|
85
|
+
lC = naiveLength
|
|
86
|
+
|
|
87
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
88
|
+
this[LENGTH_CALCULATOR] = lC
|
|
89
|
+
this[LENGTH] = 0
|
|
90
|
+
this[LRU_LIST].forEach(hit => {
|
|
91
|
+
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
|
|
92
|
+
this[LENGTH] += hit.length
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
trim(this)
|
|
96
|
+
}
|
|
97
|
+
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
|
|
98
|
+
|
|
99
|
+
get length () { return this[LENGTH] }
|
|
100
|
+
get itemCount () { return this[LRU_LIST].length }
|
|
101
|
+
|
|
102
|
+
rforEach (fn, thisp) {
|
|
103
|
+
thisp = thisp || this
|
|
104
|
+
for (let walker = this[LRU_LIST].tail; walker !== null;) {
|
|
105
|
+
const prev = walker.prev
|
|
106
|
+
forEachStep(this, fn, walker, thisp)
|
|
107
|
+
walker = prev
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
forEach (fn, thisp) {
|
|
112
|
+
thisp = thisp || this
|
|
113
|
+
for (let walker = this[LRU_LIST].head; walker !== null;) {
|
|
114
|
+
const next = walker.next
|
|
115
|
+
forEachStep(this, fn, walker, thisp)
|
|
116
|
+
walker = next
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
keys () {
|
|
121
|
+
return this[LRU_LIST].toArray().map(k => k.key)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
values () {
|
|
125
|
+
return this[LRU_LIST].toArray().map(k => k.value)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
reset () {
|
|
129
|
+
if (this[DISPOSE] &&
|
|
130
|
+
this[LRU_LIST] &&
|
|
131
|
+
this[LRU_LIST].length) {
|
|
132
|
+
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
this[CACHE] = new Map() // hash of items by key
|
|
136
|
+
this[LRU_LIST] = new Yallist() // list of items in order of use recency
|
|
137
|
+
this[LENGTH] = 0 // length of items in the list
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
dump () {
|
|
141
|
+
return this[LRU_LIST].map(hit =>
|
|
142
|
+
isStale(this, hit) ? false : {
|
|
143
|
+
k: hit.key,
|
|
144
|
+
v: hit.value,
|
|
145
|
+
e: hit.now + (hit.maxAge || 0)
|
|
146
|
+
}).toArray().filter(h => h)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
dumpLru () {
|
|
150
|
+
return this[LRU_LIST]
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
set (key, value, maxAge) {
|
|
154
|
+
maxAge = maxAge || this[MAX_AGE]
|
|
155
|
+
|
|
156
|
+
if (maxAge && typeof maxAge !== 'number')
|
|
157
|
+
throw new TypeError('maxAge must be a number')
|
|
158
|
+
|
|
159
|
+
const now = maxAge ? Date.now() : 0
|
|
160
|
+
const len = this[LENGTH_CALCULATOR](value, key)
|
|
161
|
+
|
|
162
|
+
if (this[CACHE].has(key)) {
|
|
163
|
+
if (len > this[MAX]) {
|
|
164
|
+
del(this, this[CACHE].get(key))
|
|
165
|
+
return false
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const node = this[CACHE].get(key)
|
|
169
|
+
const item = node.value
|
|
170
|
+
|
|
171
|
+
// dispose of the old one before overwriting
|
|
172
|
+
// split out into 2 ifs for better coverage tracking
|
|
173
|
+
if (this[DISPOSE]) {
|
|
174
|
+
if (!this[NO_DISPOSE_ON_SET])
|
|
175
|
+
this[DISPOSE](key, item.value)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
item.now = now
|
|
179
|
+
item.maxAge = maxAge
|
|
180
|
+
item.value = value
|
|
181
|
+
this[LENGTH] += len - item.length
|
|
182
|
+
item.length = len
|
|
183
|
+
this.get(key)
|
|
184
|
+
trim(this)
|
|
185
|
+
return true
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const hit = new Entry(key, value, len, now, maxAge)
|
|
189
|
+
|
|
190
|
+
// oversized objects fall out of cache automatically.
|
|
191
|
+
if (hit.length > this[MAX]) {
|
|
192
|
+
if (this[DISPOSE])
|
|
193
|
+
this[DISPOSE](key, value)
|
|
194
|
+
|
|
195
|
+
return false
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
this[LENGTH] += hit.length
|
|
199
|
+
this[LRU_LIST].unshift(hit)
|
|
200
|
+
this[CACHE].set(key, this[LRU_LIST].head)
|
|
201
|
+
trim(this)
|
|
202
|
+
return true
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
has (key) {
|
|
206
|
+
if (!this[CACHE].has(key)) return false
|
|
207
|
+
const hit = this[CACHE].get(key).value
|
|
208
|
+
return !isStale(this, hit)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
get (key) {
|
|
212
|
+
return get(this, key, true)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
peek (key) {
|
|
216
|
+
return get(this, key, false)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
pop () {
|
|
220
|
+
const node = this[LRU_LIST].tail
|
|
221
|
+
if (!node)
|
|
222
|
+
return null
|
|
223
|
+
|
|
224
|
+
del(this, node)
|
|
225
|
+
return node.value
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
del (key) {
|
|
229
|
+
del(this, this[CACHE].get(key))
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
load (arr) {
|
|
233
|
+
// reset the cache
|
|
234
|
+
this.reset()
|
|
235
|
+
|
|
236
|
+
const now = Date.now()
|
|
237
|
+
// A previous serialized cache has the most recent items first
|
|
238
|
+
for (let l = arr.length - 1; l >= 0; l--) {
|
|
239
|
+
const hit = arr[l]
|
|
240
|
+
const expiresAt = hit.e || 0
|
|
241
|
+
if (expiresAt === 0)
|
|
242
|
+
// the item was created without expiration in a non aged cache
|
|
243
|
+
this.set(hit.k, hit.v)
|
|
244
|
+
else {
|
|
245
|
+
const maxAge = expiresAt - now
|
|
246
|
+
// dont add already expired items
|
|
247
|
+
if (maxAge > 0) {
|
|
248
|
+
this.set(hit.k, hit.v, maxAge)
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
prune () {
|
|
255
|
+
this[CACHE].forEach((value, key) => get(this, key, false))
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const get = (self, key, doUse) => {
|
|
260
|
+
const node = self[CACHE].get(key)
|
|
261
|
+
if (node) {
|
|
262
|
+
const hit = node.value
|
|
263
|
+
if (isStale(self, hit)) {
|
|
264
|
+
del(self, node)
|
|
265
|
+
if (!self[ALLOW_STALE])
|
|
266
|
+
return undefined
|
|
267
|
+
} else {
|
|
268
|
+
if (doUse) {
|
|
269
|
+
if (self[UPDATE_AGE_ON_GET])
|
|
270
|
+
node.value.now = Date.now()
|
|
271
|
+
self[LRU_LIST].unshiftNode(node)
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return hit.value
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const isStale = (self, hit) => {
|
|
279
|
+
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
|
|
280
|
+
return false
|
|
281
|
+
|
|
282
|
+
const diff = Date.now() - hit.now
|
|
283
|
+
return hit.maxAge ? diff > hit.maxAge
|
|
284
|
+
: self[MAX_AGE] && (diff > self[MAX_AGE])
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
const trim = self => {
|
|
288
|
+
if (self[LENGTH] > self[MAX]) {
|
|
289
|
+
for (let walker = self[LRU_LIST].tail;
|
|
290
|
+
self[LENGTH] > self[MAX] && walker !== null;) {
|
|
291
|
+
// We know that we're about to delete this one, and also
|
|
292
|
+
// what the next least recently used key will be, so just
|
|
293
|
+
// go ahead and set it now.
|
|
294
|
+
const prev = walker.prev
|
|
295
|
+
del(self, walker)
|
|
296
|
+
walker = prev
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const del = (self, node) => {
|
|
302
|
+
if (node) {
|
|
303
|
+
const hit = node.value
|
|
304
|
+
if (self[DISPOSE])
|
|
305
|
+
self[DISPOSE](hit.key, hit.value)
|
|
306
|
+
|
|
307
|
+
self[LENGTH] -= hit.length
|
|
308
|
+
self[CACHE].delete(hit.key)
|
|
309
|
+
self[LRU_LIST].removeNode(node)
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
class Entry {
|
|
314
|
+
constructor (key, value, length, now, maxAge) {
|
|
315
|
+
this.key = key
|
|
316
|
+
this.value = value
|
|
317
|
+
this.length = length
|
|
318
|
+
this.now = now
|
|
319
|
+
this.maxAge = maxAge || 0
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
const forEachStep = (self, fn, node, thisp) => {
|
|
324
|
+
let hit = node.value
|
|
325
|
+
if (isStale(self, hit)) {
|
|
326
|
+
del(self, node)
|
|
327
|
+
if (!self[ALLOW_STALE])
|
|
328
|
+
hit = undefined
|
|
329
|
+
}
|
|
330
|
+
if (hit)
|
|
331
|
+
fn.call(thisp, hit.value, hit.key, self)
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
module.exports = LRUCache
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lru-cache",
|
|
3
|
+
"description": "A cache object that deletes the least-recently-used items.",
|
|
4
|
+
"version": "6.0.0",
|
|
5
|
+
"author": "Isaac Z. Schlueter <i@izs.me>",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"mru",
|
|
8
|
+
"lru",
|
|
9
|
+
"cache"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "tap",
|
|
13
|
+
"snap": "tap",
|
|
14
|
+
"preversion": "npm test",
|
|
15
|
+
"postversion": "npm publish",
|
|
16
|
+
"prepublishOnly": "git push origin --follow-tags"
|
|
17
|
+
},
|
|
18
|
+
"main": "index.js",
|
|
19
|
+
"repository": "git://github.com/isaacs/node-lru-cache.git",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"benchmark": "^2.1.4",
|
|
22
|
+
"tap": "^14.10.7"
|
|
23
|
+
},
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"yallist": "^4.0.0"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"index.js"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=10"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -24,9 +24,9 @@ function parseSocksProxy(opts) {
|
|
|
24
24
|
let port = 0;
|
|
25
25
|
let lookup = false;
|
|
26
26
|
let type = 5;
|
|
27
|
-
const host = opts.hostname
|
|
27
|
+
const host = opts.hostname;
|
|
28
28
|
if (host == null) {
|
|
29
|
-
throw new TypeError('No "
|
|
29
|
+
throw new TypeError('No "host"');
|
|
30
30
|
}
|
|
31
31
|
if (typeof opts.port === 'number') {
|
|
32
32
|
port = opts.port;
|
|
@@ -103,7 +103,7 @@ const normalizeProxyOptions = (input) => {
|
|
|
103
103
|
proxyOptions = input;
|
|
104
104
|
}
|
|
105
105
|
if (proxyOptions == null) {
|
|
106
|
-
throw new TypeError('a SOCKS proxy server `
|
|
106
|
+
throw new TypeError('a SOCKS proxy server `host` and `port` must be specified!');
|
|
107
107
|
}
|
|
108
108
|
return proxyOptions;
|
|
109
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAmE;AACnE,2CAAiE;AAEjE,kDAA+B;AAE/B,8CAAqB;AAErB,8CAAqB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAmE;AACnE,2CAAiE;AAEjE,kDAA+B;AAE/B,8CAAqB;AAErB,8CAAqB;AAarB,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,mBAAmB,CAAC,CAAA;AAE9C,SAAS,eAAe,CAAE,IAA4B;;IACpD,IAAI,IAAI,GAAG,C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E,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,KACjD,MAAM;oBACN,UAAU,KACP,IAAI,CAAC,oBAAoB,EAC5B,CAAA;gBAEF,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;oBAChC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;oBACxC,OAAO,CAAC,SAAS,CAAC,CAAA;gBACpB,CAAC,CAAC,CAAA;gBAEF,OAAO,SAAS,CAAA;aACjB;YAED,OAAO,MAAM,CAAA;;KACd;CACF;AA7FD,0CA6FC;AAED,SAAS,IAAI,CACX,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAAgD,CAAA;IAC5D,IAAI,GAAqB,CAAA;IACzB,KAAK,GAAG,IAAI,GAAG,EAAE;QACf,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACvB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;SACpB;KACF;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "socks-proxy-agent",
|
|
3
3
|
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
|
|
4
4
|
"homepage": "https://github.com/TooTallNate/node-socks-proxy-agent#readme",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "7.0.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "nathan@tootallnate.net",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@commitlint/config-conventional": "latest",
|
|
116
116
|
"@types/debug": "latest",
|
|
117
117
|
"@types/node": "latest",
|
|
118
|
-
"cacheable-lookup": "
|
|
118
|
+
"cacheable-lookup": "latest",
|
|
119
119
|
"conventional-github-releaser": "latest",
|
|
120
120
|
"dns2": "latest",
|
|
121
121
|
"finepack": "latest",
|