Don't rebuild during the release process #12263
Merged
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.
Description
The past couple releases we've had some extra
.map.js
files bleed through into the published version. These cause warnings for users downstream. See #12182It seems these are generated when we run
npm run test
even with the--release
option. I also noticed these would be generated any time we runnpm start
without--production
as the dev server does a build when it starts up.This PR adds a check for the release flag to skip building for
npm run test
. It also updates the release guide to specify the dev server should only be started with the--production
flag.One extra precaution we could add is a
prepublishOnly
lifecycle script to ourpackage.json
that callsnpm run make-zip
right before publish. Would make the publish command slower but guarantee we always build the version of files we want published.Issue number and link
Fixes #12182
Testing plan
git clean -dxf
to remove all extra filesnpm run make-zip
like you would during the releasenpm run test -- --failTaskOnError --release
like in the release guide.map.js
files generatedAuthor checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change