@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/exe",
3
- "version": "11.0.0-beta.4-0",
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/macos-arm64": "11.0.0-beta.4-0",
32
- "@pnpm/linux-x64": "11.0.0-beta.4-0",
33
- "@pnpm/linux-arm64": "11.0.0-beta.4-0",
34
- "@pnpm/macos-x64": "11.0.0-beta.4-0",
35
- "@pnpm/win-x64": "11.0.0-beta.4-0",
36
- "@pnpm/win-arm64": "11.0.0-beta.4-0"
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.4-0",
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
- This file intentionally left blank
1
+ #!/bin/sh
2
+ exec pnpm "$@"
package/pn.cmd ADDED
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ pnpm %*
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 and pn are placeholders — replaced with hardlinks by setup.js
8
- for (const name of ['pnpm', 'pn']) {
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' and 'pn' (no .exe
30
- // extension). npm's bin shims point to the name from publishConfig.bin,
31
- // and npm does NOT re-read package.json after preinstall, so rewriting
32
- // the bin entry has no effect on the shims. The file at the original
33
- // name must be the real binary so the shim can execute it.
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.exe'
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))