libnpmpack 10.0.0-pre.0.0 → 10.0.0-pre.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/lib/index.js +10 -3
- package/package.json +13 -9
package/lib/index.js
CHANGED
|
@@ -64,16 +64,23 @@ async function pack (spec = 'file:.', opts = {}) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// packs tarball
|
|
67
|
-
const
|
|
67
|
+
const tarballOpts = {
|
|
68
68
|
...opts,
|
|
69
69
|
Arborist,
|
|
70
70
|
integrity: manifest._integrity,
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
|
+
// pacote re-parses manifest._resolved as type=remote, so allow-remote=none
|
|
73
|
+
// would mis-fire on the tarball URL the registry just handed us. mirror
|
|
74
|
+
// arborist reify's carve-out: trust resolved tarballs for registry-typed specs.
|
|
75
|
+
if (spec.registry) {
|
|
76
|
+
tarballOpts.allowRemote = 'all'
|
|
77
|
+
}
|
|
78
|
+
const tarball = await pacote.tarball(manifest._resolved, tarballOpts)
|
|
72
79
|
|
|
73
80
|
// check for explicit `false` so the default behavior is to skip writing to disk
|
|
74
81
|
if (opts.dryRun === false) {
|
|
75
82
|
const filename = `${manifest.name}-${manifest.version}.tgz`
|
|
76
|
-
.replace(/^@/, '').replace(
|
|
83
|
+
.replace(/^@/, '').replace(/[/\\]/g, '-')
|
|
77
84
|
const destination = path.resolve(opts.packDestination, filename)
|
|
78
85
|
await writeFile(destination, tarball)
|
|
79
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libnpmpack",
|
|
3
|
-
"version": "10.0.0-pre.
|
|
3
|
+
"version": "10.0.0-pre.2",
|
|
4
4
|
"description": "Programmatic API for the bits behind npm pack",
|
|
5
5
|
"author": "GitHub Inc.",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@npmcli/eslint-config": "^5.0.1",
|
|
27
|
-
"@npmcli/template-oss": "
|
|
28
|
-
"nock": "^
|
|
27
|
+
"@npmcli/template-oss": "5.1.1",
|
|
28
|
+
"nock": "^14.0.0",
|
|
29
29
|
"spawk": "^1.7.1",
|
|
30
30
|
"tap": "^16.3.8"
|
|
31
31
|
},
|
|
@@ -37,20 +37,24 @@
|
|
|
37
37
|
"bugs": "https://github.com/npm/libnpmpack/issues",
|
|
38
38
|
"homepage": "https://npmjs.com/package/libnpmpack",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@npmcli/arborist": "^10.0.0-pre.
|
|
41
|
-
"@npmcli/run-script": "^
|
|
42
|
-
"npm-package-arg": "^
|
|
43
|
-
"pacote": "^
|
|
40
|
+
"@npmcli/arborist": "^10.0.0-pre.2",
|
|
41
|
+
"@npmcli/run-script": "^11.0.0",
|
|
42
|
+
"npm-package-arg": "^14.0.0",
|
|
43
|
+
"pacote": "^22.0.0"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": "^
|
|
46
|
+
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
|
|
47
47
|
},
|
|
48
48
|
"templateOSS": {
|
|
49
49
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
50
|
-
"version": "
|
|
50
|
+
"version": "5.1.1",
|
|
51
51
|
"content": "../../scripts/template-oss/index.js"
|
|
52
52
|
},
|
|
53
53
|
"tap": {
|
|
54
|
+
"node-arg": [
|
|
55
|
+
"--require",
|
|
56
|
+
"../../scripts/disable-agent-for-tests.js"
|
|
57
|
+
],
|
|
54
58
|
"nyc-arg": [
|
|
55
59
|
"--exclude",
|
|
56
60
|
"tap-snapshots/**"
|