Conversation
Replace the hand-written recursive descent parser with a lightweight wrapper on top of PostCSS, maintaining 100% API and AST compatibility with v4. Uses postcss-safe-parser for error recovery in silent mode. Key implementation details: - All 32 CssTypes AST node types preserved with identical structure - Silent mode uses per-segment strict-parse to generate parsingErrors - Non-silent mode falls back to safe-parser only for top-level syntax errors (depth 0), not for errors inside rule bodies - IE6 star hack (*property) restored from PostCSS raws.before - Comment whitespace preserved via raws.left/right - Custom-media multiline params normalized during name/media split - @import: safe-parser artifact (colon-in-name) handled transparently - Regenerated all ast.json fixtures from v5 output Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…nd document vendor - Declarations with ';': use PostCSS end directly (no +1) — matches v4 - Declarations without ';': use parent rule's '}' position — matches v4 - @layer statement: advance past trailing whitespace to next token — matches v4 quirk - @document without vendor prefix: use '' not undefined — matches v4 All 222 tests now pass with the original v4 ast.json fixtures (zero diff). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Author
|
@jogibear9988 Could you take a look? |
Add declaration file for postcss-safe-parser (no bundled types) and add null guards on postcss source.start/source.end which TypeScript 6 now types as possibly undefined. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- rollup.config.mjs: mark postcss and postcss-safe-parser as external to eliminate unresolved dependency and Node.js shim warnings; add globals for UMD; fix missing outputToFilesystem:false on CJS plugin; add sourcemapPathTransform to fix source map paths - biome.json: update schema version from 2.1.2 to 2.4.9 (installed version) - src/postcss-safe-parser.d.ts: fix biome formatting (blank line, line wrapping) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- npm update: bump @biomejs/biome 2.4.9→2.4.15, @rollup/plugin-commonjs 29.0.0→29.0.2, @types/node 25.5.0→25.9.1, jest 30.3.0→30.4.2, rollup 4.59.0→4.60.4, typescript 6.0.2→6.0.3 - Add overrides.@arethetypeswrong/core.fflate=0.8.2: fflate 0.8.3 changed Gunzip callback to multi-chunk streaming, breaking attw's single-chunk assumption; pin to 0.8.2 until attw is fixed upstream - postbuild: replace manual tar+attw with attw --pack . (simpler, same result) - biome.json: update schema to 2.4.15 to match installed biome version Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Resolve rollup.config.mjs conflict by keeping v5 version which has postcss/postcss-safe-parser external deps, UMD globals, and the sourcemapPathTransform fix from main. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
What should I say about this? I refactored my fork in a complete different way, so it has no dependecies. |
Regenerated lockfile from scratch (rm node_modules + package-lock.json + npm install) to include @rollup/rollup-linux-x64-gnu in the lockfile. macOS partial reinstalls omit platform-specific optional deps causing CI failures on Linux runners. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Author
|
No problems with you fork. On my side, I know that there is 40M download per week and professionally I have less and less time for that open source project. The idea is to make css-tools a small wrapper layer for people to have option of migrating out. I could make the v5 with an announcement like this:
Thoughs? |
|
it's okay for me. |
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.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: