Skip to content

Convert JSDoc comments to line comments for internal APIs - #298

Open
bartveneman wants to merge 1 commit into
mainfrom
claude/focused-gates-77xarg
Open

bartveneman wants to merge 1 commit into
mainfrom
claude/focused-gates-77xarg

Conversation

@bartveneman

Copy link
Copy Markdown
Member

Summary

This PR converts JSDoc-style block comments (/** ... */) to standard line comments (// ...) throughout the codebase, particularly for internal APIs and implementation details. This change simplifies the comment style while maintaining documentation clarity.

Key Changes

  • src/value-node-parser.ts: Removed @internal JSDoc tag from class declaration and converted multi-line JSDoc comments to line comments for parse_if_function_node(), parse_if_condition(), parse_if_condition_function(), and parse_value_nodes_in_range() methods
  • src/parse-condition.ts: Removed @internal JSDoc tag from class declaration and converted multi-line JSDoc comments to line comments for parse_media_feature_content(), parse_supports_declaration_content(), and parse_supports_condition() methods
  • src/string-utils.ts: Converted JSDoc comments to line comments for is_whitespace(), is_digit(), str_equals_range(), and strip_vendor_prefix() functions; removed @internal tags
  • src/parse-utils.ts: Removed @internal JSDoc tags and converted multi-line JSDoc comments to line comments for skip_whitespace_forward(), skip_whitespace_and_comments_forward(), skip_whitespace_and_comments_backward(), trim_boundaries(), and find_colon_at_depth_zero() functions
  • src/css-node.ts: Converted JSDoc comments to line comments for __get_arena(), __get_source(), and __get_index() methods; removed @internal tags

Implementation Details

  • All functional behavior remains unchanged; this is purely a documentation style update
  • The @internal JSDoc tags have been removed as they are no longer needed with the simplified comment style
  • Multi-line JSDoc blocks have been converted to equivalent line comment blocks, preserving all documentation content
  • This affects internal/private APIs and implementation details that are not part of the public API surface

https://claude.ai/code/session_012iwxGPpt9H7E31PUoDjMXc

Comments on symbols that never appear in the generated .d.ts no longer
end up in dist.
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Package Size Decrease

📦 Package 📏 Base Size 📏 Source Size 📈 Size Change
@projectwallace/css-parser 45.9 kB 44.2 kB -1.7 kB

Copy link
Copy Markdown
Member Author

The "Audit packages" check fails with 7 advisories in dev dependencies (e.g. source-map-js via @vitest/coverage-v8 → vite → postcss). It is not caused by this PR: the diff only converts comments in src/ and leaves package.json and pnpm-lock.yaml untouched, and pnpm audit on origin/main reports the same 7 vulnerabilities. No fix exists on the base branch yet, so I'm not widening this PR to bump dependencies. The other checks are still running; I'll look at them when they finish.


Generated by Claude Code

@pkg-pr-new

pkg-pr-new Bot commented Oct 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@projectwallace/css-parser@9b562f3

commit: 9b562f3

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