Closed jjspace closed 1 month ago
Thank you for the pull request, @jjspace!
:white_check_mark: We can confirm we have a CLA on file for you.
Awesome, thanks @jjspace!
One extra precaution we could add is a prepublishOnly lifecycle script to our package.json that calls npm run make-zip right before publish. Would make the publish command slower but guarantee we always build the version of files we want published.
We can follow up about this in a separate thread when appropriate. But the only concern I have with this is that it means the versions of each of the files we just tested will not be the ones that get published. Perhaps a simpler measure would be to add the maps to .npmignore?
Perhaps a simpler measure would be to add the maps to .npmignore?
The problem with this when coupled with our current build process is that the flow when maps are generated is slightly different than the flow when they are not. If we just ignored the map files it could hide the fact that the files were rebuilt differently than we may want them to be.
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 https://github.com/CesiumGS/cesium/issues/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 https://github.com/CesiumGS/cesium/issues/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