Repository navigation
Update Rust crate nodejs-semver to v8 - #229
Merged
Merged
Conversation
Classify a range as any by comparing it with `*` as a set, so that `^x`, `~*` and `^1.0.0 || *`, which nodejs-semver 8 now parses the way node-semver does, are rewritten like `*`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`workspace:x`, `workspace:^x` and the like were narrowed to `workspace:>=<new version>`, unlike the same ranges without the protocol. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Describe in the changeset what the any-like ranges did before, limit the workspace arm to the only specs that reach it, and drop the tests that checked the semver library rather than this crate. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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 free
to 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.
This PR contains the following updates:
7.0.0→8.0.0Release Notes
cijiugechu/nodejs-semver (nodejs-semver)
v8.0.0Compare Source
Breaking changes
Version::parse,FromStr, and Serde deserialization now require a complete version after trimming surrounding JavaScript whitespace. Inputs such as1.2.3 junk,1.2.3-rc!, and non-ASCII version identifiers return an error. Applications that stored annotated version strings should separate the version and annotation before parsing.1.0.0 - xmatches1.9.7, and~* || 1.2.3can now select2.0.0. Bare*,x, andXnow display and serialize as*.||range takes precedence over the other branches, including explicit prereleases. For example,3.0.0-beta || ^xsimplifies to*and excludes3.0.0-betaunder default matching.MAX_SAFE_INTEGERnow matches JavaScript's9_007_199_254_740_991. Version and range parsing accept larger numeric components, and the displayed upper bound for a range such as<=1.2reflects the corrected limit.Performance
u64, so comparing their release tuples takes one integer comparison.We compared 7.0.0 and 8.0.0 on an Apple M4 running macOS 15.7.5 and Rust 1.98.1, using the same benchmark code and dependency versions. Times are the median of three Criterion slope estimates per version, with a 1-second warm-up, a 1-second measurement window, and 30 samples per run. The last four rows measure a batch of 128 inputs. Benchmark source
1.2.31.2.3-rc.4+build.7into_parts()19.0.0-rc.1Calling
into_parts()immediately after parsing forces the deferred identifier decoding. That workload took 22% longer in 8.0.0.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.