fix: move package exports from publishConfig to top-level fields#318
Merged
Conversation
npm does not support publishConfig overrides for manifest fields (main, types, module, exports). This caused 0.0.47 and @react-simplikit/mobile 0.0.1 to be published with incorrect entry points (pointing to source instead of built output). Move these fields to the top level of package.json so they are correctly included regardless of the publish tool used.
Contributor
|
Size Change: 0 B 🆕 Total Size: 0 B |
Collaborator
Author
Snapshot Verification ResultsPublished canary versions and verified in a real consumer project: 1. npm registry fields — ✅ Correct2. Consumer project verification — ✅ PassTested in some project (uses
3. Broken versions deprecated — ✅ DoneComparison: before vs after
|
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.
Summary
react-simplikit@0.0.47and@react-simplikit/mobile@0.0.1were published with broken entry points (main: "./src/index.ts"instead of built output)changeset publishinternally usesnpm publish, which does NOT supportpublishConfigfield overrides for manifest fields likemain,types,module,exportsyarn npm publish(which does support this), before the changesets migrationChanges
packages/core/package.jsonmain,types,module,exportsfrompublishConfigto top-levelpublishConfig.access: "public"packages/mobile/package.json.changeset/fix-publishconfig.mdVerification
Expected release flow
Test plan
npm packfor both packages shows correct top-level fieldsyarn buildsucceeds for both packagesyarn changeset statusshows both packages pending patch