Skip to content

build(deps): bump comment-json from 4.6.2 to 5.0.0#368

Merged
DaanV2 merged 1 commit intomainfrom
dependabot/npm_and_yarn/comment-json-5.0.0
Apr 14, 2026
Merged

build(deps): bump comment-json from 4.6.2 to 5.0.0#368
DaanV2 merged 1 commit intomainfrom
dependabot/npm_and_yarn/comment-json-5.0.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 13, 2026

Bumps comment-json from 4.6.2 to 5.0.0.

Release notes

Sourced from comment-json's releases.

5.0.0

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.

Commits
  • 7032c69 bump version 5.0.0: potential breaking changes
  • f54170f test/docs: add bun-derived regression fixture and docs
  • 2f8b9eb api: add parse options overload and removeBlankLines
  • 2b83d03 core: introduce explicit BlankLine tokens for parse/stringify
  • 9bac144 codestyle: < 80 cols
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [comment-json](https://github.com/kaelzhang/node-comment-json) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/kaelzhang/node-comment-json/releases)
- [Commits](kaelzhang/node-comment-json@4.6.2...5.0.0)

---
updated-dependencies:
- dependency-name: comment-json
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Apr 13, 2026
@DaanV2 DaanV2 merged commit 6cc97c5 into main Apr 14, 2026
3 checks passed
@dependabot dependabot Bot deleted the dependabot/npm_and_yarn/comment-json-5.0.0 branch April 14, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant