Skip to content

fix: strip dev scripts before publish to fix npx install#17

Merged
jesse23 merged 1 commit intomainfrom
fix/npx-publish
Mar 26, 2026
Merged

fix: strip dev scripts before publish to fix npx install#17
jesse23 merged 1 commit intomainfrom
fix/npx-publish

Conversation

@jesse23
Copy link
Copy Markdown
Owner

@jesse23 jesse23 commented Mar 26, 2026

Summary

npx webtty fails because the npm registry manifest for published versions contains preinstall: bun scripts/check-pkg-manager.ts. When users install via npx, npm runs this script, which fails because scripts/check-pkg-manager.ts doesn't exist in the installed package.

Root cause: prepack strips scripts from the tarball's package.json, but npm uploads the registry manifest from package.json before prepack runs. So the tarball is clean but the registry metadata still has all scripts.

Fix: Explicitly run clean-pkg-scripts.ts strip before semantic-release in the release workflow, so the manifest npm sends to the registry is also clean.

@jesse23 jesse23 merged commit a0f564b into main Mar 26, 2026
3 checks passed
@jesse23 jesse23 deleted the fix/npx-publish branch March 26, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant