Skip to content

refactor: inline punctuation string constants - #258

Merged
bartveneman merged 1 commit into
mainfrom
claude/nifty-mccarthy-tx1tln
Oct 21, 2026
Merged

bartveneman merged 1 commit into
mainfrom
claude/nifty-mccarthy-tx1tln

Conversation

@bartveneman

Copy link
Copy Markdown
Member

Summary

Replace the punctuation string constants in src/lib/index.ts with their literal characters (COLON, SEMICOLON, COMMA, OPEN_/CLOSE_PARENTHESES, OPEN_/CLOSE_BRACKET, OPEN_/CLOSE_BRACE). SPACE and EMPTY_STRING stay named, since ' ' and '' are easy to misread.

The bundler doesn't inline these, so each declaration and name use shipped as written.

Bytes Gzip
Before 17,935 5,048
After 17,482 (−2.5%) 4,958 (−1.8%)

(dist/index.js, pnpm build)

Test plan

  • pnpm check clean
  • pnpm lint clean
  • Tests: 277 passed, 1 skipped

Generated by Claude Code

Replace COLON, SEMICOLON, COMMA, OPEN/CLOSE_PARENTHESES, OPEN/CLOSE_BRACKET
and OPEN/CLOSE_BRACE with their literal characters. SPACE and EMPTY_STRING
stay named. dist/index.js shrinks from 17,935 to 17,482 bytes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Package Size Decrease

📦 Package 📏 Base Size 📏 Source Size 📈 Size Change
@projectwallace/format-css 9.4 kB 9.3 kB -88 B

@bartveneman
bartveneman merged commit b848a6b into main Oct 21, 2026
9 checks passed
@bartveneman
bartveneman deleted the claude/nifty-mccarthy-tx1tln branch October 21, 2026 18: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.

2 participants