pnpm 7.9.0 → 7.9.3
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 +67488 -66230
- 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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/fs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "filesystem utilities for the npm cli",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
7
|
-
"bin",
|
|
8
|
-
"lib"
|
|
7
|
+
"bin/",
|
|
8
|
+
"lib/"
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"preversion": "npm test",
|
|
@@ -14,11 +14,16 @@
|
|
|
14
14
|
"snap": "tap",
|
|
15
15
|
"test": "tap",
|
|
16
16
|
"npmclilint": "npmcli-lint",
|
|
17
|
-
"lint": "eslint
|
|
17
|
+
"lint": "eslint \"**/*.js\"",
|
|
18
18
|
"lintfix": "npm run lint -- --fix",
|
|
19
19
|
"posttest": "npm run lint",
|
|
20
20
|
"postsnap": "npm run lintfix --",
|
|
21
|
-
"postlint": "
|
|
21
|
+
"postlint": "template-oss-check",
|
|
22
|
+
"template-oss-apply": "template-oss-apply --force"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/npm/fs.git"
|
|
22
27
|
},
|
|
23
28
|
"keywords": [
|
|
24
29
|
"npm",
|
|
@@ -27,12 +32,19 @@
|
|
|
27
32
|
"author": "GitHub Inc.",
|
|
28
33
|
"license": "ISC",
|
|
29
34
|
"devDependencies": {
|
|
30
|
-
"@npmcli/
|
|
31
|
-
"
|
|
35
|
+
"@npmcli/eslint-config": "^3.0.1",
|
|
36
|
+
"@npmcli/template-oss": "3.5.0",
|
|
37
|
+
"tap": "^16.0.1"
|
|
32
38
|
},
|
|
33
39
|
"dependencies": {
|
|
34
|
-
"@gar/promisify": "^1.
|
|
40
|
+
"@gar/promisify": "^1.1.3",
|
|
35
41
|
"semver": "^7.3.5"
|
|
36
42
|
},
|
|
37
|
-
"
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
|
45
|
+
},
|
|
46
|
+
"templateOSS": {
|
|
47
|
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
48
|
+
"version": "3.5.0"
|
|
49
|
+
}
|
|
38
50
|
}
|
|
@@ -6,8 +6,6 @@ const {
|
|
|
6
6
|
accessSync,
|
|
7
7
|
copyFile: copyFile_,
|
|
8
8
|
copyFileSync,
|
|
9
|
-
unlink: unlink_,
|
|
10
|
-
unlinkSync,
|
|
11
9
|
readdir: readdir_,
|
|
12
10
|
readdirSync,
|
|
13
11
|
rename: rename_,
|
|
@@ -19,12 +17,11 @@ const {
|
|
|
19
17
|
symlink: symlink_,
|
|
20
18
|
symlinkSync,
|
|
21
19
|
readlink: readlink_,
|
|
22
|
-
readlinkSync
|
|
20
|
+
readlinkSync,
|
|
23
21
|
} = require('fs')
|
|
24
22
|
|
|
25
23
|
const access = promisify(access_)
|
|
26
24
|
const copyFile = promisify(copyFile_)
|
|
27
|
-
const unlink = promisify(unlink_)
|
|
28
25
|
const readdir = promisify(readdir_)
|
|
29
26
|
const rename = promisify(rename_)
|
|
30
27
|
const stat = promisify(stat_)
|
|
@@ -61,7 +58,7 @@ const moveFile = async (source, destination, options = {}, root = true, symlinks
|
|
|
61
58
|
|
|
62
59
|
options = {
|
|
63
60
|
overwrite: true,
|
|
64
|
-
...options
|
|
61
|
+
...options,
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
if (!options.overwrite && await pathExists(destination)) {
|
|
@@ -77,7 +74,9 @@ const moveFile = async (source, destination, options = {}, root = true, symlinks
|
|
|
77
74
|
const sourceStat = await lstat(source)
|
|
78
75
|
if (sourceStat.isDirectory()) {
|
|
79
76
|
const files = await readdir(source)
|
|
80
|
-
await Promise.all(files.map((file) =>
|
|
77
|
+
await Promise.all(files.map((file) =>
|
|
78
|
+
moveFile(join(source, file), join(destination, file), options, false, symlinks)
|
|
79
|
+
))
|
|
81
80
|
} else if (sourceStat.isSymbolicLink()) {
|
|
82
81
|
symlinks.push({ source, destination })
|
|
83
82
|
} else {
|
|
@@ -89,17 +88,29 @@ const moveFile = async (source, destination, options = {}, root = true, symlinks
|
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
if (root) {
|
|
92
|
-
await Promise.all(symlinks.map(async ({ source, destination }) => {
|
|
93
|
-
let target = await readlink(
|
|
94
|
-
// junction symlinks in windows will be absolute paths, so we need to
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => {
|
|
92
|
+
let target = await readlink(symSource)
|
|
93
|
+
// junction symlinks in windows will be absolute paths, so we need to
|
|
94
|
+
// make sure they point to the symlink destination
|
|
95
|
+
if (isAbsolute(target)) {
|
|
96
|
+
target = resolve(symDestination, relative(symSource, target))
|
|
97
|
+
}
|
|
98
|
+
// try to determine what the actual file is so we can create the correct
|
|
99
|
+
// type of symlink in windows
|
|
100
|
+
let targetStat = 'file'
|
|
99
101
|
try {
|
|
100
|
-
targetStat = await stat(resolve(dirname(
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
targetStat = await stat(resolve(dirname(symSource), target))
|
|
103
|
+
if (targetStat.isDirectory()) {
|
|
104
|
+
targetStat = 'junction'
|
|
105
|
+
}
|
|
106
|
+
} catch {
|
|
107
|
+
// targetStat remains 'file'
|
|
108
|
+
}
|
|
109
|
+
await symlink(
|
|
110
|
+
target,
|
|
111
|
+
symDestination,
|
|
112
|
+
targetStat
|
|
113
|
+
)
|
|
103
114
|
}))
|
|
104
115
|
await rimraf(source)
|
|
105
116
|
}
|
|
@@ -112,7 +123,7 @@ const moveFileSync = (source, destination, options = {}, root = true, symlinks =
|
|
|
112
123
|
|
|
113
124
|
options = {
|
|
114
125
|
overwrite: true,
|
|
115
|
-
...options
|
|
126
|
+
...options,
|
|
116
127
|
}
|
|
117
128
|
|
|
118
129
|
if (!options.overwrite && pathExistsSync(destination)) {
|
|
@@ -142,17 +153,29 @@ const moveFileSync = (source, destination, options = {}, root = true, symlinks =
|
|
|
142
153
|
}
|
|
143
154
|
|
|
144
155
|
if (root) {
|
|
145
|
-
for (const { source, destination } of symlinks) {
|
|
146
|
-
let target = readlinkSync(
|
|
147
|
-
// junction symlinks in windows will be absolute paths, so we need to
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
for (const { source: symSource, destination: symDestination } of symlinks) {
|
|
157
|
+
let target = readlinkSync(symSource)
|
|
158
|
+
// junction symlinks in windows will be absolute paths, so we need to
|
|
159
|
+
// make sure they point to the symlink destination
|
|
160
|
+
if (isAbsolute(target)) {
|
|
161
|
+
target = resolve(symDestination, relative(symSource, target))
|
|
162
|
+
}
|
|
163
|
+
// try to determine what the actual file is so we can create the correct
|
|
164
|
+
// type of symlink in windows
|
|
165
|
+
let targetStat = 'file'
|
|
152
166
|
try {
|
|
153
|
-
targetStat = statSync(resolve(dirname(
|
|
154
|
-
|
|
155
|
-
|
|
167
|
+
targetStat = statSync(resolve(dirname(symSource), target))
|
|
168
|
+
if (targetStat.isDirectory()) {
|
|
169
|
+
targetStat = 'junction'
|
|
170
|
+
}
|
|
171
|
+
} catch {
|
|
172
|
+
// targetStat remains 'file'
|
|
173
|
+
}
|
|
174
|
+
symlinkSync(
|
|
175
|
+
target,
|
|
176
|
+
symDestination,
|
|
177
|
+
targetStat
|
|
178
|
+
)
|
|
156
179
|
}
|
|
157
180
|
rimrafSync(source)
|
|
158
181
|
}
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/move-file",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"files": [
|
|
5
|
-
"
|
|
5
|
+
"bin/",
|
|
6
|
+
"lib/"
|
|
6
7
|
],
|
|
8
|
+
"main": "lib/index.js",
|
|
7
9
|
"description": "move a file (fork of move-file)",
|
|
8
10
|
"dependencies": {
|
|
9
11
|
"mkdirp": "^1.0.4",
|
|
10
12
|
"rimraf": "^3.0.2"
|
|
11
13
|
},
|
|
12
14
|
"devDependencies": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
+
"@npmcli/eslint-config": "^3.0.1",
|
|
16
|
+
"@npmcli/template-oss": "3.5.0",
|
|
17
|
+
"tap": "^16.0.1"
|
|
15
18
|
},
|
|
16
19
|
"scripts": {
|
|
17
20
|
"test": "tap",
|
|
18
21
|
"snap": "tap",
|
|
19
22
|
"preversion": "npm test",
|
|
20
23
|
"postversion": "npm publish",
|
|
21
|
-
"prepublishOnly": "git push origin --follow-tags"
|
|
24
|
+
"prepublishOnly": "git push origin --follow-tags",
|
|
25
|
+
"lint": "eslint \"**/*.js\"",
|
|
26
|
+
"postlint": "template-oss-check",
|
|
27
|
+
"template-oss-apply": "template-oss-apply --force",
|
|
28
|
+
"lintfix": "npm run lint -- --fix",
|
|
29
|
+
"posttest": "npm run lint"
|
|
22
30
|
},
|
|
23
31
|
"repository": {
|
|
24
32
|
"type": "git",
|
|
25
|
-
"url": "
|
|
33
|
+
"url": "https://github.com/npm/move-file.git"
|
|
26
34
|
},
|
|
27
35
|
"tap": {
|
|
28
36
|
"check-coverage": true
|
|
29
37
|
},
|
|
30
38
|
"license": "MIT",
|
|
31
39
|
"engines": {
|
|
32
|
-
"node": ">=
|
|
40
|
+
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
|
41
|
+
},
|
|
42
|
+
"author": "GitHub Inc.",
|
|
43
|
+
"templateOSS": {
|
|
44
|
+
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
45
|
+
"version": "3.5.0"
|
|
33
46
|
}
|
|
34
47
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nathan Rajlich
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,39 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
function once(emitter, name) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function cancel() {
|
|
14
|
-
emitter.removeListener(name, onEvent);
|
|
15
|
-
emitter.removeListener('error', onError);
|
|
16
|
-
p.cancel = noop;
|
|
17
|
-
}
|
|
18
|
-
function onEvent(...args) {
|
|
19
|
-
cancel();
|
|
20
|
-
resolve(args);
|
|
21
|
-
}
|
|
22
|
-
function onError(err) {
|
|
23
|
-
cancel();
|
|
24
|
-
reject(err);
|
|
25
|
-
}
|
|
26
|
-
c = cancel;
|
|
27
|
-
emitter.on(name, onEvent);
|
|
28
|
-
emitter.on('error', onError);
|
|
29
|
-
});
|
|
30
|
-
if (!c) {
|
|
31
|
-
throw new TypeError('Could not get `cancel()` function');
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function once(emitter, name, { signal } = {}) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
function cleanup() {
|
|
6
|
+
signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup);
|
|
7
|
+
emitter.removeListener(name, onEvent);
|
|
8
|
+
emitter.removeListener('error', onError);
|
|
9
|
+
}
|
|
10
|
+
function onEvent(...args) {
|
|
11
|
+
cleanup();
|
|
12
|
+
resolve(args);
|
|
32
13
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
14
|
+
function onError(err) {
|
|
15
|
+
cleanup();
|
|
16
|
+
reject(err);
|
|
17
|
+
}
|
|
18
|
+
signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup);
|
|
19
|
+
emitter.on(name, onEvent);
|
|
20
|
+
emitter.on('error', onError);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.default = once;
|
|
39
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAOA,SAAwB,IAAI,CAI3B,OAAgB,EAChB,IAAW,EACX,EAAE,MAAM,KAAkB,EAAE;IAE5B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,SAAS,OAAO;YACf,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACtC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1C,CAAC;QACD,SAAS,OAAO,CAAC,GAAG,IAAW;YAC9B,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,IAA+C,CAAC,CAAC;QAC1D,CAAC;QACD,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QACD,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACJ,CAAC;AA1BD,uBA0BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overloaded-parameters.js","sourceRoot":"","sources":["../src/overloaded-parameters.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tootallnate/once",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Creates a Promise that waits for a single event",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prebuild": "rimraf dist",
|
|
12
12
|
"build": "tsc",
|
|
13
|
-
"test": "
|
|
14
|
-
"test-lint": "eslint src --ext .js,.ts",
|
|
13
|
+
"test": "jest",
|
|
15
14
|
"prepublishOnly": "npm run build"
|
|
16
15
|
},
|
|
17
16
|
"repository": {
|
|
@@ -25,21 +24,29 @@
|
|
|
25
24
|
"url": "https://github.com/TooTallNate/once/issues"
|
|
26
25
|
},
|
|
27
26
|
"devDependencies": {
|
|
27
|
+
"@types/jest": "^27.0.2",
|
|
28
28
|
"@types/node": "^12.12.11",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"eslint": "5.16.0",
|
|
32
|
-
"eslint-config-airbnb": "17.1.0",
|
|
33
|
-
"eslint-config-prettier": "4.1.0",
|
|
34
|
-
"eslint-import-resolver-typescript": "1.1.1",
|
|
35
|
-
"eslint-plugin-import": "2.16.0",
|
|
36
|
-
"eslint-plugin-jsx-a11y": "6.2.1",
|
|
37
|
-
"eslint-plugin-react": "7.12.4",
|
|
38
|
-
"mocha": "^6.2.2",
|
|
29
|
+
"abort-controller": "^3.0.0",
|
|
30
|
+
"jest": "^27.2.1",
|
|
39
31
|
"rimraf": "^3.0.0",
|
|
40
|
-
"
|
|
32
|
+
"ts-jest": "^27.0.5",
|
|
33
|
+
"typescript": "^4.4.3"
|
|
41
34
|
},
|
|
42
35
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
36
|
+
"node": ">= 10"
|
|
37
|
+
},
|
|
38
|
+
"jest": {
|
|
39
|
+
"preset": "ts-jest",
|
|
40
|
+
"globals": {
|
|
41
|
+
"ts-jest": {
|
|
42
|
+
"diagnostics": false,
|
|
43
|
+
"isolatedModules": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"verbose": false,
|
|
47
|
+
"testEnvironment": "node",
|
|
48
|
+
"testMatch": [
|
|
49
|
+
"<rootDir>/test/**/*.test.ts"
|
|
50
|
+
]
|
|
44
51
|
}
|
|
45
52
|
}
|