# What changed in comment-json

> 7 changes in comment-json 4 to 5 from its official release notes, upgrade guides and advisories: 2 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-10-25. HTML: https://unstale.sh/npm/comment-json/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## comment-json 5

### Breaking changes

- CommentToken is now a union that can include BlankLine tokens, so value and loc are no longer guaranteed on every token. (5.0.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/5.0.0)
- stringify() renders blank lines only from explicit BlankLine tokens, rather than inferring them from loc or historical line-break logic. (5.0.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/5.0.0)

### New APIs and options

- Blank lines are represented by explicit BlankLine comment tokens used during parse() and stringify(). (5.0.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/5.0.0)
- Parsing with no_blank_lines: true explicitly drops blank lines; default parsing preserves them as first-class tokens. (5.0.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/5.0.0)
- parse() accepts the no_comments option. (5.0.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/5.0.0)
- Removes blank lines globally or at a specific comment location. (5.0.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/5.0.0)

## comment-json 4

### Tooling

- Improves TypeScript definitions for developers using the package. (4.5.0) — [release notes](https://github.com/kaelzhang/node-comment-json/releases/tag/4.5.0)
