Skip to content

Address Copilot review feedback on the prepare script - #6

Merged
vivek-perforce merged 1 commit into
masterfrom
vivek/fix-prepare-copilot-feedback
Jul 28, 2026
Merged

Address Copilot review feedback on the prepare script#6
vivek-perforce merged 1 commit into
masterfrom
vivek/fix-prepare-copilot-feedback

Conversation

@vivek-perforce

Copy link
Copy Markdown

Summary

Follow-up to #5, addressing the two Copilot review comments left on that PR:

  • Moves babel from devDependencies to dependencies, so the prepare script (which invokes the babel CLI via build-npm) still works when a consumer installs with dev deps omitted (npm ci --omit=dev, NODE_ENV=production). babel-core comes along transitively since it's already a dependency of the babel package itself.
  • Removes the now-redundant npm run build-npm && from the release script, since prepare already runs it automatically during npm publish.

Test plan

  • Simulated the failure scenario: copied the working tree to a scratch dir and ran npm install --omit=devprepare successfully ran babel and produced lib/*.js (this would have failed with "babel: command not found" before this fix).
  • Confirmed package.json remains valid JSON.
  • Did not run npm publish (not needed to verify the release script fix — confirmed via npm's documented prepare-runs-during-publish lifecycle instead).

- 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.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 babel from devDependencies to dependencies so npm run prepare (via build-npm) can find the babel CLI without dev deps.
  • Simplify release by removing the explicit npm run build-npm &&, relying on npm’s prepare lifecycle during npm publish instead.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vivek-perforce
vivek-perforce merged commit 6229e95 into masterJul 28, 2026
1 check passed
@vivek-perforce
vivek-perforce deleted the vivek/fix-prepare-copilot-feedback branch July 28, 2026 05:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vivek-perforce