Skip to content

devdeps(semantic-conventions): update dependency comment-json to v5#183

Open
mapcolonies-devops wants to merge 1 commit intomasterfrom
renovate/comment-json-5.x
Open

devdeps(semantic-conventions): update dependency comment-json to v5#183
mapcolonies-devops wants to merge 1 commit intomasterfrom
renovate/comment-json-5.x

Conversation

@mapcolonies-devops
Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
comment-json 4.5.15.0.0 age 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.

v4.6.2

Compare Source

v4.6.1

Compare Source

v4.6.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), 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 has been generated by Renovate Bot.

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