Put only major.minor in Processor.version - #2137
Closed
theRizwan wants to merge 1 commit into
Closed
Conversation
theRizwan
marked this pull request as ready for review
August 14, 2026 21:31
Member
|
Duplicate #2109 And honestly, it looks like LLM slop (description is irrelevant to the changes |
Author
|
You're right I missed #2109, which does the same thing. Apologies for the noise. |
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.
Fixes #2101.
Processor.versionwas a fullmajor.minor.patchstring hardcoded inlib/processor.js, which meant it had to be edited on every patch release to stay in step withpackage.json. This drops the patch component so it only needs touching on a minor bump.Why this is safe
The patch component was never read. The only runtime consumer is the plugin-version mismatch warning in
lib/lazy-result.js:It compares
[0]and[1]only, so'8.5'behaves identically to'8.5.26'here.postcssVersion, whichlib/postcss.jssets fromnew Processor().version, flows into the same comparison and is unaffected. The documented example inprocessor.d.tsusesversion.split('.')[0], which also still works.Tests
test/version.jspreviously asserted exact equality withpackage.json, which would now always fail. It compares the major and minor components instead, so the guard against the two drifting is kept rather than removed:Two assertions matched
/\d+.\d+.\d+/. Both are now/^\d+\.\d+$/— anchored, and with the dots escaped, which the originals did not do.I have also noted the format in the
processor.d.tsdoc comment, since it is a visible change for anyone readingversiondirectly.Checks
pnpm unit— 696 passing, 0 failingnode ./test/version.js— passespnpm test:types— cleanpnpm test:lint— one pre-existing warning intest/visitor.test.ts(perfectionist/sort-objects), present on an unmodified checkout and untouched here