Use prepack/postpack instead of prepublishOnly/postpublish for export swap

prepack/postpack fire for both 'pack' and 'publish', and postpack
always runs after packing regardless of publish success, preventing
the working tree from being left in dist-exports state on failure.
This commit is contained in:
Vorflux AI 2026-03-27 00:33:54 +00:00
parent 96b7f16175
commit 4750842b00

View file

@ -19,8 +19,8 @@
"dev": "vite build --watch",
"build": "vite build && tsc --emitDeclarationOnly",
"check-types": "tsc --noEmit",
"prepublishOnly": "bun run build && bun run scripts/swap-exports.ts pack",
"postpublish": "bun run scripts/swap-exports.ts unpack",
"prepack": "bun run build && bun run scripts/swap-exports.ts pack",
"postpack": "bun run scripts/swap-exports.ts unpack",
"test": "vitest run"
},
"keywords": [