@pnpm/exe 11.0.0-beta.4-0 → 11.0.0-beta.5
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/dist/pnpm.mjs +1733 -1809
- package/package.json +10 -8
- package/pn +2 -1
- package/pn.cmd +2 -0
- package/pn.ps1 +1 -0
- package/prepare.js +4 -4
- package/setup.js +6 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/exe",
|
|
3
|
-
"version": "11.0.0-beta.
|
|
3
|
+
"version": "11.0.0-beta.5",
|
|
4
4
|
"description": "Fast, disk space efficient package manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"setup.js",
|
|
20
20
|
"prepare.js",
|
|
21
21
|
"dist/",
|
|
22
|
+
"pn.cmd",
|
|
23
|
+
"pn.ps1",
|
|
22
24
|
"pnpx.cmd",
|
|
23
25
|
"pnpx.ps1",
|
|
24
26
|
"pnx.cmd",
|
|
@@ -28,18 +30,18 @@
|
|
|
28
30
|
"@reflink/reflink": "0.1.19"
|
|
29
31
|
},
|
|
30
32
|
"optionalDependencies": {
|
|
31
|
-
"@pnpm/
|
|
32
|
-
"@pnpm/
|
|
33
|
-
"@pnpm/
|
|
34
|
-
"@pnpm/
|
|
35
|
-
"@pnpm/win-
|
|
36
|
-
"@pnpm/win-
|
|
33
|
+
"@pnpm/linux-x64": "11.0.0-beta.5",
|
|
34
|
+
"@pnpm/macos-arm64": "11.0.0-beta.5",
|
|
35
|
+
"@pnpm/macos-x64": "11.0.0-beta.5",
|
|
36
|
+
"@pnpm/linux-arm64": "11.0.0-beta.5",
|
|
37
|
+
"@pnpm/win-arm64": "11.0.0-beta.5",
|
|
38
|
+
"@pnpm/win-x64": "11.0.0-beta.5"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
41
|
"@jest/globals": "30.3.0",
|
|
40
42
|
"execa": "npm:safe-execa@0.3.0",
|
|
41
43
|
"tar": "^7.5.10",
|
|
42
|
-
"@pnpm/exe": "11.0.0-beta.
|
|
44
|
+
"@pnpm/exe": "11.0.0-beta.5",
|
|
43
45
|
"@pnpm/jest-config": "1000.0.5"
|
|
44
46
|
},
|
|
45
47
|
"jest": {
|
package/pn
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
exec pnpm "$@"
|
package/pn.cmd
ADDED
package/pn.ps1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm @args
|
package/prepare.js
CHANGED
|
@@ -4,8 +4,8 @@ import path from 'path'
|
|
|
4
4
|
const ownDir = import.meta.dirname
|
|
5
5
|
const placeholder = 'This file intentionally left blank'
|
|
6
6
|
|
|
7
|
-
// pnpm
|
|
8
|
-
for (const name of ['pnpm'
|
|
7
|
+
// pnpm is a placeholder — replaced with a hardlink to the native binary by setup.js
|
|
8
|
+
for (const name of ['pnpm']) {
|
|
9
9
|
const file = path.join(ownDir, name)
|
|
10
10
|
try {
|
|
11
11
|
fs.unlinkSync(file)
|
|
@@ -15,8 +15,8 @@ for (const name of ['pnpm', 'pn']) {
|
|
|
15
15
|
fs.writeFileSync(file, placeholder, 'utf8')
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// pnpx and pnx — write the real shell scripts and Windows wrappers
|
|
19
|
-
for (const [name, command] of [['pnpx', 'pnpm dlx'], ['pnx', 'pnpm dlx']]) {
|
|
18
|
+
// pn, pnpx, and pnx — write the real shell scripts and Windows wrappers
|
|
19
|
+
for (const [name, command] of [['pn', 'pnpm'], ['pnpx', 'pnpm dlx'], ['pnx', 'pnpm dlx']]) {
|
|
20
20
|
const file = path.join(ownDir, name)
|
|
21
21
|
try {
|
|
22
22
|
fs.unlinkSync(file)
|
package/setup.js
CHANGED
|
@@ -21,23 +21,18 @@ if (!fs.existsSync(bin)) process.exit(0)
|
|
|
21
21
|
|
|
22
22
|
linkSync(bin, path.resolve(ownDir, executable))
|
|
23
23
|
|
|
24
|
-
// Create pn alias (hardlink to the same binary)
|
|
25
|
-
const pnExecutable = platform === 'win' ? 'pn.exe' : 'pn'
|
|
26
|
-
linkSync(bin, path.resolve(ownDir, pnExecutable))
|
|
27
|
-
|
|
28
24
|
if (platform === 'win') {
|
|
29
|
-
// On Windows, also hardlink the binary as 'pnpm'
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
25
|
+
// On Windows, also hardlink the binary as 'pnpm' (no .exe extension).
|
|
26
|
+
// npm's bin shims point to the name from publishConfig.bin, and npm
|
|
27
|
+
// does NOT re-read package.json after preinstall, so rewriting the bin
|
|
28
|
+
// entry has no effect on the shims. The file at the original name must
|
|
29
|
+
// be the real binary so the shim can execute it.
|
|
34
30
|
linkSync(bin, path.resolve(ownDir, 'pnpm'))
|
|
35
|
-
linkSync(bin, path.resolve(ownDir, 'pn'))
|
|
36
31
|
|
|
37
32
|
const pkgJsonPath = path.resolve(ownDir, 'package.json')
|
|
38
33
|
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'))
|
|
39
34
|
pkg.bin.pnpm = 'pnpm.exe'
|
|
40
|
-
pkg.bin.pn = 'pn.
|
|
35
|
+
pkg.bin.pn = 'pn.cmd'
|
|
41
36
|
pkg.bin.pnpx = 'pnpx.cmd'
|
|
42
37
|
pkg.bin.pnx = 'pnx.cmd'
|
|
43
38
|
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, 2))
|