Repository navigation
feat: add node-types, string-utils and token-types subpath exports - #315
Merged
Merged
Conversation
Move TYPE_NAMES to the ./nodes entry so it can be imported without the barrel.
Contributor
|
| 📦 Package | 📏 Base Size | 📏 Source Size | 📈 Size Change |
|---|---|---|---|
| @projectwallace/css-parser | 46 kB | 47 kB | +957 B |
commit: |
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.
Summary
Some exports were only reachable through the package root barrel. This adds subpath exports so they can be imported directly:
./node-types: theis_*node type guards and the node types (CSSNode,Rule,Declaration, …), plus theCloneOptionsandPlainCSSNodetypes./string-utils:is_custom,is_vendor_prefixed,strip_vendor_prefix,str_equals,str_starts_with,str_index_of./token-types: theTOKEN_*constants./string-utilspoints at a newsrc/string-helpers.tsthat re-exports only the public helpers, so the internalCHAR_*constants and range helpers stay private.strip_vendor_prefixis 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.tsonly existed to generate the removed table, and it needsesbuild, which is not installed. It is left in place for now.Test plan
pnpm run build(publint passes)pnpm run checkpnpm run lintpnpm knippnpm vitest runGenerated by Claude Code