fix: use wildcard re-export for padrone/zod entry#19
Merged
Conversation
A named re-export in src/zod.ts triggered a rolldown-plugin-dts
chunk-merge bug in the multi-entry build, emitting a dts chunk with
an `export { jsonCodec }` that had no matching binding and failing
`npm publish`. Switching to `export *` produces identical output and
builds cleanly.
Also add `bun --filter=padrone build` to CI so build breakages are
caught in PRs instead of only at release time.
Contributor
TegamiThis repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under Create a changelog → · Changelog format Release preview
Changelogs in this PR
Run Managed by Tegami. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Release workflow failed at the publish step because
bun run builderrored during pack:src/zod.tswas a named re-export barrel (export { jsonCodec, zodAsyncStream } from './schema/zod.ts'). In the multi-entry--unbundlebuild,rolldown-plugin-dtsmerges thezod.tsandschema/zod.tsdeclarations into onezod.d.mtschunk but drops the import binding, emitting anexport { jsonCodec }with no matching declaration. Buildingzod.tsalone worked; adding any second entry triggered it — which is why CI never caught it (CI ran typecheck/lint/test but not the build).Fix
src/zod.tstoexport * from './schema/zod.ts'. Generateddist/zod.d.mtsis byte-identical to the working single-entry output — public API unchanged.bun --filter=padrone buildto CI so build breakages surface in PRs instead of only at release time.Includes a
padrone: patchchangelog entry.