Add error when running build script after prepack#55914
Closed
huntie wants to merge 1 commit intofacebook:mainfrom
Closed
Add error when running build script after prepack#55914huntie wants to merge 1 commit intofacebook:mainfrom
huntie wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary: Introduce a clear error message if running `yarn build` again after `yarn prepack` (which will have applied the `"publishConfig"` field to each `package.json`, just ahead of publishing to npm). This state should never happen in CI or local dev, but can occur if repeat-running `yarn test-release-local` without `yarn test-release-local-clean`. Introducing a validation error is preferable over making this idempotent (logic would be complex + fragile) for this rare + out-of-design edge case. Changelog: [Internal] Differential Revision: D95215735
|
This pull request has been merged in 238bd24. |
Collaborator
|
This pull request was successfully merged by @huntie in 238bd24 When will my fix make it into a release? | How to file a pick request? |
zoontek
pushed a commit
to zoontek/react-native
that referenced
this pull request
Mar 9, 2026
Summary: Pull Request resolved: facebook#55914 Introduce a clear error message if running `yarn build` again after `yarn prepack` (which will have applied the `"publishConfig"` field to each `package.json`, just ahead of publishing to npm). This state should never happen in CI or local dev, but can occur if repeat-running `yarn test-release-local` without `yarn test-release-local-clean`. Introducing a validation error is preferable over making this idempotent (logic would be complex + fragile) for this rare + out-of-design edge case. Changelog: [Internal] Reviewed By: alanleedev Differential Revision: D95215735 fbshipit-source-id: 5a9be44f0d0ae1f2721eed2b11088466a4ff7f72
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:
Introduce a clear error message if running
yarn buildagain afteryarn prepack(which will have applied the"publishConfig"field to eachpackage.json, just ahead of publishing to npm). This state should never happen in CI or local dev, but can occur if repeat-runningyarn test-release-localwithoutyarn test-release-local-clean.Introducing a validation error is preferable over making this idempotent (logic would be complex + fragile) for this rare + out-of-design edge case.
Changelog: [Internal]
Differential Revision: D95215735