Uh oh!
There was an error while loading. Please reload this page.
Address Copilot review feedback on the prepare script - #6
Merged
Conversation
- Move babel from devDependencies to dependencies so `prepare` can still run `build-npm` when a consumer installs with dev deps omitted (npm ci --omit=dev / NODE_ENV=production). - Drop the now-redundant explicit build-npm call from the release script, since prepare already runs it during npm publish.
There was a problem hiding this comment.
Pull request overview
This PR adjusts the npm packaging/release workflow so the prepare lifecycle can successfully build lib/ even when consumers install with dev dependencies omitted (e.g., npm ci --omit=dev), and removes redundant work from the release script.
Changes:
- Move
babelfromdevDependenciestodependenciessonpm run prepare(viabuild-npm) can find thebabelCLI without dev deps. - Simplify
releaseby removing the explicitnpm run build-npm &&, relying on npm’spreparelifecycle duringnpm publishinstead.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 freeto 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
Follow-up to #5, addressing the two Copilot review comments left on that PR:
babelfromdevDependenciestodependencies, so thepreparescript (which invokes thebabelCLI viabuild-npm) still works when a consumer installs with dev deps omitted (npm ci --omit=dev,NODE_ENV=production).babel-corecomes along transitively since it's already a dependency of thebabelpackage itself.npm run build-npm &&from thereleasescript, sincepreparealready runs it automatically duringnpm publish.Test plan
npm install --omit=dev—preparesuccessfully ranbabeland producedlib/*.js(this would have failed with "babel: command not found" before this fix).package.jsonremains valid JSON.npm publish(not needed to verify thereleasescript fix — confirmed via npm's documentedprepare-runs-during-publish lifecycle instead).