Skip to content

feat: add node-types, string-utils and token-types subpath exports - #315

Merged
bartveneman merged 6 commits into
mainfrom
claude/trusting-ptolemy-ofgeuv
Oct 19, 2026
Merged

bartveneman merged 6 commits into
mainfrom
claude/trusting-ptolemy-ofgeuv

Conversation

@bartveneman

Copy link
Copy Markdown
Member

Summary

Some exports were only reachable through the package root barrel. This adds subpath exports so they can be imported directly:

  • ./node-types: the is_* node type guards and the node types (CSSNode, Rule, Declaration, …), plus the CloneOptions and PlainCSSNode types
  • ./string-utils: is_custom, is_vendor_prefixed, strip_vendor_prefix, str_equals, str_starts_with, str_index_of
  • ./token-types: the TOKEN_* constants

./string-utils points at a new src/string-helpers.ts that re-exports only the public helpers, so the internal CHAR_* constants and range helpers stay private. strip_vendor_prefix is now also exported from the root.

The README "Bundle sizes" table was unmaintained, so it is replaced by an "Entry points" table that lists what each subpath exports.

Notes

  • test/build/bundle-sizes.ts only existed to generate the removed table, and it needs esbuild, which is not installed. It is left in place for now.

Test plan

  • pnpm run build (publint passes)
  • pnpm run check
  • pnpm run lint
  • pnpm knip
  • pnpm vitest run
  • Each new subpath loads in Node and exposes the expected names

Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Package Size Increase

📦 Package 📏 Base Size 📏 Source Size 📈 Size Change
@projectwallace/css-parser 46 kB 47 kB +957 B

@pkg-pr-new

pkg-pr-new Bot commented Oct 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@projectwallace/css-parser@71b41b8

commit: 71b41b8

@bartveneman
bartveneman merged commit 30f75a4 into main Oct 19, 2026
16 checks passed
@bartveneman
bartveneman deleted the claude/trusting-ptolemy-ofgeuv branch October 19, 2026 07:43
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.

2 participants