singularity-forge/scripts
Jeremy McSpadden 23b89c64c9 fix: detect broken install and add Windows symlink fallback (#890)
Fixes #882 — npm install -g gsd-pi installing a broken version where
@gsd/pi-coding-agent cannot be resolved, causing ERR_MODULE_NOT_FOUND.

Root causes addressed:
1. On Windows without Developer Mode or admin rights, symlinkSync fails
   even for NTFS junctions, leaving node_modules/@gsd/ empty and causing
   a cryptic ERR_MODULE_NOT_FOUND instead of a usable error message.
2. If npm latest dist-tag is stale (pointing to an old version that
   predates the packages/ directory), users get the same failure.

Changes:
- src/loader.ts: after symlinking, validate @gsd/pi-coding-agent exists;
  emit a clear actionable error with reinstall instructions instead of
  letting Node throw ERR_MODULE_NOT_FOUND deep inside cli.js. Also adds
  cpSync fallback when symlinkSync fails (Windows without elevated perms).
- scripts/link-workspace-packages.cjs: same cpSync fallback — ensures
  postinstall succeeds on restricted Windows environments.
- scripts/validate-pack.js: verify @gsd/* packages are resolvable after
  the isolated install test, and run `gsd -v` to confirm end-to-end
  resolution before declaring the pack valid.
- .github/workflows/build-native.yml: add post-publish dist-tag
  verification step that confirms npm dist-tags.latest matches the
  published version for stable releases, catching stale-tag regressions
  in CI before users encounter them.
2026-03-17 09:35:57 -06:00
..
ci_monitor.cjs feat: add GitHub Workflows skill with CI workflow and ci_monitor tool (#294) 2026-03-13 22:31:17 -06:00
ci_monitor.md feat: add GitHub Workflows skill with CI workflow and ci_monitor tool (#294) 2026-03-13 22:31:17 -06:00
copy-export-html.cjs refactor: extract inline build scripts from package.json to files 2026-03-16 13:34:05 -05:00
copy-resources.cjs refactor: extract inline build scripts from package.json to files 2026-03-16 13:34:05 -05:00
copy-themes.cjs refactor: extract inline build scripts from package.json to files 2026-03-16 13:34:05 -05:00
dev.js refactor: deduplicate help text, cross-platform validate-pack, fix dev.js 2026-03-16 13:29:31 -05:00
install-pi-global.js Add pi global install scripts (#57) 2026-03-11 14:34:03 -06:00
link-workspace-packages.cjs fix: detect broken install and add Windows symlink fallback (#890) 2026-03-17 09:35:57 -06:00
postinstall.js fix: strip clack UI from postinstall, keep silent Playwright download (#783) 2026-03-16 21:35:04 -06:00
sync-pkg-version.cjs feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
uninstall-pi-global.js Add pi global install scripts (#57) 2026-03-11 14:34:03 -06:00
validate-pack.js fix: detect broken install and add Windows symlink fallback (#890) 2026-03-17 09:35:57 -06:00
validate-pack.sh fix: broken npm install — remove bundleDependencies, use postinstall symlinks (#369) 2026-03-14 10:04:12 -06:00
verify-s03.sh feat(wizard): add BRAVE_ANSWERS_KEY support 2026-03-10 22:44:28 -06:00
verify-s04.sh Replace remaining 'get stuff done' instances in verify script 2026-03-11 08:11:11 -06:00
watch-resources.js fix: read resources from dist/ to prevent branch-drift in npm-link setups (#314) 2026-03-14 11:47:03 -06:00