From cef4816dfbc9aa7ffbe67fa727c1eb9be5d5e1e7 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 24 Aug 2026 16:29:13 +0200 Subject: [PATCH] fix(release): keep the bundled bins packable (#14135) `dist/node_modules` is built by a `pnpm deploy --config.node-linker=hoisted`, and the hoisted linker turns `preferSymlinkedExecutables` on, so `dist/node_modules/.bin` became a directory of symlinks. An npm tarball cannot carry a symlink, so those bins were dropped from the packed `pnpm` and `@pnpm/exe` tarballs and the release workflow's artifact verification failed: tar: package/dist/node_modules/.bin/node-gyp: Not found in archive Force the deploy to write shell shims, which pack fine, restoring the layout every release before 11.24.0 shipped. --- pnpm11/pnpm/bundle-deps.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pnpm11/pnpm/bundle-deps.ts b/pnpm11/pnpm/bundle-deps.ts index 252e7266cf..557885a87b 100644 --- a/pnpm11/pnpm/bundle-deps.ts +++ b/pnpm11/pnpm/bundle-deps.ts @@ -98,7 +98,17 @@ function createDistNodeModules () { 'deploy', DEPLOY_DIR ].join(' ') - execSync(pnpmDeploy, { cwd: WORKSPACE_DIR, stdio: 'inherit' }) + execSync(pnpmDeploy, { + cwd: WORKSPACE_DIR, + stdio: 'inherit', + // The hoisted node linker turns preferSymlinkedExecutables on, which makes + // node_modules/.bin a directory of symlinks — and a symlink cannot travel + // inside an npm tarball, so every bin would silently disappear from the + // published dist/node_modules/.bin. Shell shims survive packing. Passed + // through the environment rather than as `--config.` because the release- + // pinned pnpm ignores that flag for this setting. + env: { ...process.env, pnpm_config_prefer_symlinked_executables: 'false' }, + }) cleanupNodeModules(DEPLOY_DIR)