fix: bundle workspace dependencies for npm registry installs

Workspace packages (@gsd/pi-agent-core, @gsd/pi-ai, @gsd/pi-coding-agent,
@gsd/pi-tui) are included in the published tarball via the "files" field but
are not resolvable by Node because npm does not recreate workspace symlinks
when installing from the registry. This causes "ERR_MODULE_NOT_FOUND: Cannot
find package '@gsd/pi-coding-agent'" on fresh installs.

Add workspace packages to both "dependencies" and "bundleDependencies" so npm
packs them into node_modules/ within the tarball and installs them correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
alphinus_biosdesk 2026-03-13 08:36:53 +01:00
parent 24302942d0
commit d6bf806f1a
2 changed files with 21 additions and 0 deletions

11
package-lock.json generated
View file

@ -7,6 +7,12 @@
"": {
"name": "gsd-pi",
"version": "2.7.0",
"bundleDependencies": [
"@gsd/pi-agent-core",
"@gsd/pi-ai",
"@gsd/pi-coding-agent",
"@gsd/pi-tui"
],
"hasInstallScript": true,
"license": "MIT",
"workspaces": [
@ -14,6 +20,10 @@
],
"dependencies": {
"@clack/prompts": "^1.1.0",
"@gsd/pi-agent-core": "*",
"@gsd/pi-ai": "*",
"@gsd/pi-coding-agent": "*",
"@gsd/pi-tui": "*",
"picocolors": "^1.1.1",
"playwright": "^1.58.2"
},
@ -3550,6 +3560,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",
"integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
"license": "MIT",
"peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}

View file

@ -53,9 +53,19 @@
},
"dependencies": {
"@clack/prompts": "^1.1.0",
"@gsd/pi-agent-core": "*",
"@gsd/pi-ai": "*",
"@gsd/pi-coding-agent": "*",
"@gsd/pi-tui": "*",
"picocolors": "^1.1.1",
"playwright": "^1.58.2"
},
"bundleDependencies": [
"@gsd/pi-agent-core",
"@gsd/pi-ai",
"@gsd/pi-coding-agent",
"@gsd/pi-tui"
],
"devDependencies": {
"@types/node": "^22.0.0",
"typescript": "^5.4.0"