singularity-forge/package.json
TÂCHES 098ed35a50 fix: broken npm install — remove bundleDependencies, use postinstall symlinks (#369)
* fix: remove @gsd/* cross-deps that break npm install (#hotfix)

Workspace packages declared @gsd/* as dependencies in their own
package.json files. npm's bundleDependencies bundles packages into
node_modules/ but still tries to resolve sub-dependencies from the
registry — causing 404s for the unpublished @gsd/* scope.

- Remove @gsd/* from all dependencies (root and workspace packages)
- Add validate-pack.sh: tests tarball installability before publish
- Wire validate-pack into CI (every PR) and publish pipeline
- Bump to v2.10.10
- Update changelog

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: drop bundleDependencies, use postinstall symlinks instead

bundleDependencies with workspace packages causes npm to resolve
@gsd/* from the registry during install — 404 since they're not
published. Replace with a postinstall script that creates
node_modules/@gsd/* symlinks pointing to packages/*.

- Remove @gsd/* from dependencies and bundleDependencies
- Add link-workspace-packages.cjs (CJS, runs before ESM postinstall)
- Update validate-pack to verify symlinks after install
- Include link script in files array

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: robust validate-pack + fallback workspace linking

- Keep @gsd/* in bundleDependencies (for npm pack bundling)
- Remove @gsd/* from root dependencies (prevents 404 registry lookups)
- Add link-workspace-packages.cjs fallback for when bundled symlinks
  aren't created
- Simplified validate-pack with better error diagnostics

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove bundleDependencies — use postinstall symlinks only

npm 10.x fetches packument metadata for ALL deps including bundled ones.
@gsd/* packages don't exist on npm → 404 → hard install failure.

bundleDependencies is fundamentally broken for unpublished workspace
packages. Replace with:
- packages/ shipped via files array (already was)
- link-workspace-packages.cjs creates node_modules/@gsd/* symlinks in
  postinstall, pointing to packages/*
- No @gsd/* in dependencies or bundleDependencies at all

Tarball drops from 40M to 3M (no bundled node_modules).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add .npmignore to prevent .gitignore from excluding dist/

.gitignore contains /dist/ and packages/*/dist/ which are needed in
the published tarball. Without .npmignore, npm pack respects .gitignore
and excludes them — even though "files" in package.json should override.

An empty .npmignore causes npm to ignore .gitignore entirely, letting
the "files" field control what's packed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: avoid SIGPIPE in validate-pack on Linux

tar | grep -q causes SIGPIPE (exit 141) on Linux when grep closes the
pipe early. Write tar listing to a temp file and grep that instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 10:04:12 -06:00

88 lines
3.8 KiB
JSON

{
"name": "gsd-pi",
"version": "2.10.10",
"description": "GSD — Get Shit Done coding agent",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/glittercowboy/gsd-pi.git"
},
"homepage": "https://github.com/glittercowboy/gsd-pi#readme",
"bugs": {
"url": "https://github.com/glittercowboy/gsd-pi/issues"
},
"type": "module",
"workspaces": [
"packages/*"
],
"bin": {
"gsd": "dist/loader.js",
"gsd-cli": "dist/loader.js"
},
"files": [
"dist",
"packages",
"pkg",
"src/resources",
"scripts/postinstall.js",
"scripts/link-workspace-packages.cjs",
"package.json",
"README.md"
],
"piConfig": {
"name": "gsd",
"configDir": ".gsd"
},
"engines": {
"node": ">=20.6.0"
},
"scripts": {
"build:pi-tui": "npm run build -w @gsd/pi-tui",
"build:pi-ai": "npm run build -w @gsd/pi-ai",
"build:pi-agent-core": "npm run build -w @gsd/pi-agent-core",
"build:pi-coding-agent": "npm run build -w @gsd/pi-coding-agent",
"build:native-pkg": "npm run build -w @gsd/native",
"build:pi": "npm run build:native-pkg && npm run build:pi-tui && npm run build:pi-ai && npm run build:pi-agent-core && npm run build:pi-coding-agent",
"build": "npm run build:pi && tsc && npm run copy-themes",
"copy-themes": "node -e \"const{mkdirSync,cpSync}=require('fs');const{resolve}=require('path');const src=resolve(__dirname,'packages/pi-coding-agent/dist/modes/interactive/theme');mkdirSync('pkg/dist/modes/interactive/theme',{recursive:true});cpSync(src,'pkg/dist/modes/interactive/theme',{recursive:true})\"",
"test:unit": "node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/resources/extensions/gsd/tests/*.test.ts src/resources/extensions/gsd/tests/*.test.mjs src/tests/*.test.ts",
"test:integration": "node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/resources/extensions/gsd/tests/*integration*.test.ts src/tests/integration/*.test.ts",
"test": "npm run test:unit && npm run test:integration",
"test:browser-tools": "node --test src/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs src/resources/extensions/browser-tools/tests/browser-tools-integration.test.mjs",
"test:native": "node --test packages/native/src/__tests__/grep.test.mjs",
"build:native": "node native/scripts/build.js",
"build:native:dev": "node native/scripts/build.js --dev",
"dev": "tsc --watch",
"postinstall": "node scripts/link-workspace-packages.cjs && node scripts/postinstall.js",
"pi:install-global": "node scripts/install-pi-global.js",
"pi:uninstall-global": "node scripts/uninstall-pi-global.js",
"sync-pkg-version": "node scripts/sync-pkg-version.cjs",
"sync-platform-versions": "node native/scripts/sync-platform-versions.cjs",
"validate-pack": "bash scripts/validate-pack.sh",
"prepublishOnly": "npm run sync-pkg-version && npm run sync-platform-versions && git diff --exit-code || (echo 'ERROR: version sync changed files — commit them before publishing' && exit 1) && npm run build && npm run validate-pack"
},
"dependencies": {
"@clack/prompts": "^1.1.0",
"picocolors": "^1.1.1",
"picomatch": "^4.0.3",
"playwright": "^1.58.2",
"sharp": "^0.34.5"
},
"devDependencies": {
"@types/node": "^22.0.0",
"@types/picomatch": "^4.0.2",
"jiti": "^2.6.1",
"typescript": "^5.4.0"
},
"optionalDependencies": {
"@gsd-build/engine-darwin-arm64": ">=2.10.2",
"@gsd-build/engine-darwin-x64": ">=2.10.2",
"@gsd-build/engine-linux-x64-gnu": ">=2.10.2",
"@gsd-build/engine-linux-arm64-gnu": ">=2.10.2",
"@gsd-build/engine-win32-x64-msvc": ">=2.10.2",
"fsevents": "~2.3.3"
},
"overrides": {
"gaxios": "7.1.4"
}
}