Skip to content

Conversation

@bartveneman
Copy link
Member

@bartveneman bartveneman commented Jan 4, 2026

Changes:

  1. src/parse-atrule-prelude.ts:82-84, 471-484: Added @charset prelude parser that returns a STRING node
  2. src/parse.ts:367-376: Always create AT_RULE_PRELUDE wrapper when prelude parsing is enabled, even for at-rules without structured parsing
  3. src/parse.test.ts:1085-1087, 1096-1099: Updated @charset and @namespace tests to expect preludes
  4. src/parse.test.ts:1102-1112: Added test for @imaginary-atrule proving unknown at-rules have accessible .prelude.text

All 1079 tests pass. Now you can access .prelude.text for any at-rule with a prelude, regardless of whether it has structured parsing support.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.91%. Comparing base (2a57c89) to head (13e6fb3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   94.89%   94.91%   +0.01%     
==========================================
  Files          15       15              
  Lines        2566     2575       +9     
  Branches      671      674       +3     
==========================================
+ Hits         2435     2444       +9     
  Misses        131      131              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bartveneman bartveneman merged commit f5edaf7 into main Jan 4, 2026
5 checks passed
@bartveneman bartveneman deleted the v11-fixes branch January 4, 2026 10:44
@codecov-commenter
Copy link

Bundle Report

Changes will increase total bundle size by 433 bytes (0.31%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@projectwallace/css-parser-esm 139.66kB 433 bytes (0.31%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: @projectwallace/css-parser-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
parse-*.js 435 bytes 22.44kB 1.98%
parse.js -2 bytes 13.16kB -0.02%

Files in parse-*.js:

  • ./src/parse-atrule-prelude.ts → Total Size: 21.67kB

Files in parse.js:

  • ./src/parse.ts → Total Size: 12.3kB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants