diff --git a/.changeset/fix-write-strip-pre-marker.md b/.changeset/fix-write-strip-pre-marker.md new file mode 100644 index 0000000..6b71719 --- /dev/null +++ b/.changeset/fix-write-strip-pre-marker.md @@ -0,0 +1,5 @@ +--- +"zile": patch +--- + +Fixed `publish:prepare` not omitting pre-marker keys from written `package.json` diff --git a/src/Package.ts b/src/Package.ts index 46ca7a0..5384466 100644 --- a/src/Package.ts +++ b/src/Package.ts @@ -775,7 +775,7 @@ export async function writePackageJson(cwd: string, pkgJson: PackageJson) { // Merge decorated fields back into original package.json to preserve all fields const merged = (() => { if (!content) return pkgJson - return { ...JSON.parse(content), ...pkgJson } + return { ...stripPreMarkerKeys(JSON.parse(content)), ...pkgJson } })() let output = JSON.stringify(merged, null, indent)