Skip to content

chore(deps): update dependency comment-json to v5#3749

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/comment-json-5.x
Open

chore(deps): update dependency comment-json to v5#3749
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/comment-json-5.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 16, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
comment-json 4.6.25.0.0 age adoption passing confidence

Release Notes

kaelzhang/node-comment-json (comment-json)

v5.0.0

Compare Source

MAJOR: blank lines are now modeled explicitly instead of being inferred from loc and historical line-break logic.

  • Introduce explicit BlankLine comment tokens and use them during parse() / stringify().
  • Add parse(code, reviver, { no_comments, no_blank_lines }).
  • Add removeBlankLines() for removing blank lines globally or at a specific comment location.
  • Improve round-trip behavior for JSON files that rely on preserved blank lines, including a Bun-derived regression fixture.
  • Update TypeScript definitions and documentation for the new blank-line model.
Potential breaking changes

This release may introduce breaking changes for consumers who directly inspect or mutate comment tokens:

  • CommentToken is now a union type. A token may be { type: 'BlankLine', inline: false }, so value and loc are no longer guaranteed on every token.
  • stringify() no longer uses loc or the old internal blank-line history to infer empty lines. Blank lines are rendered only from explicit BlankLine tokens.
  • Custom logic that manually creates or rewrites comment token arrays may need to be updated to preserve blank lines correctly.
Behavior differences

If your existing usage includes business logic related to blank lines, you may notice behavior differences:

  • Code that previously relied on loc-based blank-line rendering may now produce different output unless it preserves BlankLine tokens explicitly.
  • Code that assumed every comment token was a line/block comment may need an extra type check for BlankLine.
  • Parsing with { no_blank_lines: true } now provides an explicit way to drop blank lines, while default parsing preserves them as first-class tokens.

An upgrade review is recommended for dependents that have custom comment-token processing or formatting logic around blank lines.


Configuration

📅 Schedule: (in timezone Asia/Tokyo)

  • Branch creation
    • "after 9pm,before 9am"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the renovate label Apr 16, 2026
@renovate renovate Bot requested a review from a team as a code owner April 16, 2026 22:52
@renovate renovate Bot requested review from chihiro-adachi and shabaraba and removed request for a team April 16, 2026 22:52
@renovate renovate Bot added the renovate label Apr 16, 2026
@renovate renovate Bot force-pushed the renovate/comment-json-5.x branch 2 times, most recently from 2bf6f14 to ce61129 Compare April 29, 2026 18:09
@renovate renovate Bot force-pushed the renovate/comment-json-5.x branch 2 times, most recently from b79cca5 to 6d6776d Compare May 18, 2026 18:20
@renovate renovate Bot force-pushed the renovate/comment-json-5.x branch from 6d6776d to a1b35af Compare May 28, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants