Skip to content

Export walker and nodes modules as public APIs#196

Merged
bartveneman merged 1 commit intomainfrom
claude/implement-issue-194-s15QC
Mar 21, 2026
Merged

Export walker and nodes modules as public APIs#196
bartveneman merged 1 commit intomainfrom
claude/implement-issue-194-s15QC

Conversation

@bartveneman
Copy link
Member

This PR adds two new public module exports to the package, making the walker and nodes utilities available to consumers.

Summary

Extended the package's public API surface by exporting the walk and constants modules, allowing users to import and use the tree walker and node type constants directly.

Changes

  • Added ./walker export pointing to the walk module (dist/walk.js with types)
  • Added ./nodes export pointing to the constants module (dist/constants.js with types)
  • Updated build configuration to include both modules in the distribution output

Details

These exports enable users to:

  • Use import { ... } from 'package/walker' to access tree walking utilities
  • Use import { ... } from 'package/nodes' to access node type constants

Both modules are now properly built and typed as part of the public API.

https://claude.ai/code/session_01T96MRxjkWtd8YxRC5iWWgB

Adds two new subpath exports to enable more targeted imports:
- `@projectwallace/css-parser/walker` → exports walk, traverse, SKIP, BREAK
- `@projectwallace/css-parser/nodes` → exports all node type constants

Closes #194

https://claude.ai/code/session_01T96MRxjkWtd8YxRC5iWWgB
@codecov-commenter
Copy link

Bundle Report

Changes will increase total bundle size by 5.52kB (3.46%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@projectwallace/css-parser-esm 164.94kB 5.52kB (3.46%) ⬆️

Affected Assets, Files, and Routes:

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

Assets Changed:

Asset Name Size Change Total Size Change (%)
parse-atrule-prelude.js 38 bytes 21.09kB 0.18%
parse-selector.js 38 bytes 20.02kB 0.19%
css-node-CZf-PvCf.js (New) 12.72kB 12.72kB 100.0% 🚀
parse.js 38 bytes 10.08kB 0.38%
css-node-B9tSb6YD.d.ts (New) 8.94kB 8.94kB 100.0% 🚀
arena-CDAx4eAB.js (New) 8.15kB 8.15kB 100.0% 🚀
parse-anplusb.js 38 bytes 7.27kB 0.53%
parse-value.js 38 bytes 6.87kB 0.56%
index.d.ts -2.46kB 6.31kB -28.01%
parse-declaration.js 38 bytes 6.21kB 0.62%
arena-BtlVZlkG.d.ts (New) 5.13kB 5.13kB 100.0% 🚀
tokenize-CyiJelQC.d.ts (New) 4.86kB 4.86kB 100.0% 🚀
index.js -2.37kB 3.85kB -38.1%
constants.d.ts (New) 3.08kB 3.08kB 100.0% 🚀
parse-utils-BxrmqJxI.js (New) 2.84kB 2.84kB 100.0% 🚀
constants.js (New) 2.67kB 2.67kB 100.0% 🚀
walk.js (New) 1.82kB 1.82kB 100.0% 🚀
parse-atrule-prelude.d.ts 38 bytes 1.69kB 2.3%
walk.d.ts (New) 1.5kB 1.5kB 100.0% 🚀
parse-selector.d.ts 38 bytes 1.47kB 2.65%
parse.d.ts 38 bytes 1.29kB 3.04%
parse-value.d.ts 38 bytes 987 bytes 4.0%
parse-declaration.d.ts 38 bytes 875 bytes 4.54%
parse-anplusb.d.ts 38 bytes 770 bytes 5.19% ⚠️
css-node-Uj4oBgaw.js (Deleted) -20.82kB 0 bytes -100.0% 🗑️
css-node-DqyvMXBN.d.ts (Deleted) -13.29kB 0 bytes -100.0% 🗑️
tokenize-odLrcjj2.d.ts (Deleted) -4.86kB 0 bytes -100.0% 🗑️
parse-utils-DnsZRpfd.js (Deleted) -2.84kB 0 bytes -100.0% 🗑️

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.23%. Comparing base (e6606a1) to head (c0b8456).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #196   +/-   ##
=======================================
  Coverage   95.23%   95.23%           
=======================================
  Files          16       16           
  Lines        2874     2874           
  Branches      806      806           
=======================================
  Hits         2737     2737           
  Misses        137      137           

☔ 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 54eb44b into main Mar 21, 2026
4 of 5 checks passed
@bartveneman bartveneman deleted the claude/implement-issue-194-s15QC branch March 21, 2026 20:41
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