You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: multiple bugfixes and optimizations in CSS modules (#20648)
- Fix third code point position in walkCssTokens number detection (pos → pos+1)
- Fix multiline CSS comment regex to match across line breaks
- Fix swapped :import/:export in error message
- Fix comma callback incorrectly popping balanced stack, causing stray ')' in output
- Fix cache comparison missing inheritance array length check
- Fix match.index mutation side effect in publicPathAutoRegex replacement
- Fix typo GRID_TEMPLATE_ARES → GRID_TEMPLATE_AREAS
- Remove duplicate grid-column-start property setting
- Move publicPathAutoRegex to module scope to avoid repeated construction
- Precompute merged callbacks in consumeUntil to avoid per-token object spread
- Simplify redundant nested ternary in CssGenerator
- Replace spread+reduce with for-of loop for Map→Object conversion
- Merge duplicate getCompilationHooks calls in CssLoadingRuntimeModule
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* test: update snapshots for CSS module bugfixes
Update walkCssTokens snapshot for correct number token parsing (-.1, +.1
now correctly recognized as number tokens instead of delim + number).
Update postcss-modules-plugins snapshots for correct :local() comma
handling (stray ')' no longer in output).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* test: add multiline CSS comment test cases for @value rule
Add three test cases with multiline comments in @value declarations:
- @value with multiline comments around name, colon, and value
- @value import with multiline comments around name, from, and request
- @value empty with multiline comment as value
These cover the CSS_COMMENT regex fix (.*? → [\s\S]*?) ensuring
multiline comments are correctly stripped during @value parsing.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* test: update ConfigCacheTestCases snapshot for multiline CSS comment tests
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* test: remove obsolete ConfigCacheTestCases snapshots
Clean up 94 obsolete snapshots for chunks-order, import-meta-env,
and extract-source-map-css test cases.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* update
* Revert "test: remove obsolete ConfigCacheTestCases snapshots"
This reverts commit 652e2f0.
* test: update ConfigCacheTestCases CSS snapshots
Update postcss-modules-plugins snapshots reflecting the comma balanced
stack fix (removal of stray ')' in :local() output).
Add missing CSS test snapshots for ConfigCacheTestCases.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* update
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
0 commit comments