diff --git a/packages/coding-agent/npm-shrinkwrap.json b/packages/coding-agent/npm-shrinkwrap.json index bb4be5bcc..a50b306c8 100644 --- a/packages/coding-agent/npm-shrinkwrap.json +++ b/packages/coding-agent/npm-shrinkwrap.json @@ -486,7 +486,7 @@ }, "node_modules/@earendil-works/pi-agent-core": { "version": "2026.5.29-4", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-2026.5.29-4.tgz", + "inBundle": true, "license": "MIT", "dependencies": { "@earendil-works/pi-ai": "^2026.5.29-4", @@ -500,7 +500,7 @@ }, "node_modules/@earendil-works/pi-ai": { "version": "2026.5.29-4", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-2026.5.29-4.tgz", + "inBundle": true, "license": "MIT", "dependencies": { "@anthropic-ai/sdk": "0.91.1", @@ -527,7 +527,7 @@ }, "node_modules/@earendil-works/pi-tui": { "version": "2026.5.29-4", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-2026.5.29-4.tgz", + "inBundle": true, "license": "MIT", "dependencies": { "get-east-asian-width": "1.6.0", diff --git a/scripts/build-all.mjs b/scripts/build-all.mjs index 985438424..aafbbb093 100644 --- a/scripts/build-all.mjs +++ b/scripts/build-all.mjs @@ -91,10 +91,10 @@ export function cleanEnv(envSource = process.env) { function spawnPmAsync(pm, args, cwd, env) { // bun's execpath is a native binary so we invoke it directly. // npm's and pnpm's execpaths are .js / .cjs entry points that have to - // be loaded through the current Node runtime. + // be loaded through the current Node runtime, unless they are native binaries (like pnpm.exe). let command = pm.cmd; let spawnArgs = args; - if (pm.execpath && pm.cmd === "bun") { + if (pm.execpath && (pm.cmd === "bun" || !/\.[cm]?js$/i.test(pm.execpath))) { command = pm.execpath; } else if (pm.execpath) { command = process.execPath; diff --git a/scripts/generate-coding-agent-shrinkwrap.mjs b/scripts/generate-coding-agent-shrinkwrap.mjs index 7bcf56813..7c8a3962a 100644 --- a/scripts/generate-coding-agent-shrinkwrap.mjs +++ b/scripts/generate-coding-agent-shrinkwrap.mjs @@ -46,6 +46,7 @@ function sortedPackageEntry(entry) { "version", "resolved", "integrity", + "inBundle", "license", "dependencies", "optionalDependencies", @@ -196,7 +197,7 @@ function addInternalWorkspace(shrinkwrapPackages, addedPaths, queue, name, works const packageJson = workspace.packageJson; const outputPath = `node_modules/${name}`; const entry = copyPackageJsonEntry(packageJson, { includeName: false }); - entry.resolved = registryTarballUrl(name, packageJson.version); + entry.inBundle = true; shrinkwrapPackages[outputPath] = sortedPackageEntry(entry); addedPaths.add(outputPath); diff --git a/scripts/run-web-ui-check.mjs b/scripts/run-web-ui-check.mjs index 4938a3798..e813ff858 100644 --- a/scripts/run-web-ui-check.mjs +++ b/scripts/run-web-ui-check.mjs @@ -38,9 +38,9 @@ function detectPm() { } const pm = detectPm(); -// bun's execpath is a native binary, npm/pnpm are .js we load via Node. +// bun's execpath is a native binary, npm/pnpm are .js we load via Node, unless they are native binaries (like pnpm.exe). function runCheck() { - if (pm.execpath && pm.cmd === "bun") { + if (pm.execpath && (pm.cmd === "bun" || !/\.[cm]?js$/i.test(pm.execpath))) { return spawnSync(pm.execpath, ["run", "check"], { cwd: webUiDir, stdio: "inherit", env, shell: false }); } if (pm.execpath) {