Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't normalize package.json fields #1143

Conversation

codykaup
Copy link
Contributor

@codykaup codykaup commented Jan 16, 2025

Fixes #1123

This fixes a weird bug where an invalid semver string in the version field of a user's package.json causes the CLI to silently exit. Turns out, it comes from normalizing the package.json file from read-package-up and meow. This disables that behavior to prevent this issue.

📦 Published PR as canary version: 11.25.2--canary.1143.12912030314.0

✨ Test out this PR locally via:

npm install [email protected]
# or 
yarn add [email protected]

@codykaup codykaup self-assigned this Jan 16, 2025
@codykaup codykaup added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Jan 16, 2025
Copy link
Contributor

github-actions bot commented Jan 16, 2025

📦 Package Size: 5448 KB

@codykaup codykaup force-pushed the cody/cap-2409-cli-exits-silently-when-packagejson-version-field-does-not branch from f235959 to 3710ea1 Compare January 16, 2025 18:39
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.05%. Comparing base (6646a43) to head (e9d7fa8).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1143      +/-   ##
==========================================
+ Coverage   69.44%   70.05%   +0.60%     
==========================================
  Files         202      202              
  Lines        7335     7336       +1     
  Branches     1284     1299      +15     
==========================================
+ Hits         5094     5139      +45     
+ Misses       2218     2174      -44     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codykaup codykaup force-pushed the cody/cap-2409-cli-exits-silently-when-packagejson-version-field-does-not branch from 3710ea1 to e9d7fa8 Compare January 16, 2025 20:45
@codykaup codykaup requested a review from a team January 16, 2025 20:59
Copy link
Contributor

@jmhobbs jmhobbs left a comment

Choose a reason for hiding this comment

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

What else does normalization do? Are we using any of it?

@codykaup
Copy link
Contributor Author

What else does normalization do? Are we using any of it?

It does a bunch of stuff but it doesn't appear we use any of it (I could be wrong though).

@codykaup codykaup added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit e69d42b Jan 22, 2025
21 checks passed
@codykaup codykaup deleted the cody/cap-2409-cli-exits-silently-when-packagejson-version-field-does-not branch January 22, 2025 15:53
@chromatic-ci-bot
Copy link
Collaborator

🚀 PR was released in v11.25.1 🚀

@chromatic-ci-bot chromatic-ci-bot added the released Verdict: This issue/pull request has been released label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Auto: Increment the patch version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI exits silently when package.json version field does not contain patch number
3 participants