# What changed in gettext-parser

> 20 changes in gettext-parser 2 to 10 from its official release notes, upgrade guides and advisories: 11 breaking, 1 security, 3 new APIs and options. Each one cited. Sources checked 2026-10-25. HTML: https://unstale.sh/npm/gettext-parser/

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

## gettext-parser 10

### Breaking changes

- foldLength now represents page width, like msgcat --width, and defaults to 79 instead of 76; 0 or false still disables folding. (10.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v10.0.0)

### Fixes and other changes

- Folding no longer splits escape sequences such as \t across lines, which could produce an unparsable .po file. (10.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v10.0.0)
- Compiled strings are now wrapped exactly like GNU gettext's msgcat; version-controlled compiled .po files are rewrapped once without content changes. (10.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v10.0.0)

## gettext-parser 9

### Breaking changes

- Validation throws when the multiline format is invalid. (9.2.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v9.2.0)
- Invalid PO format is no longer silently ignored. (9.1.1) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v9.1.1)
- Support for Node.js versions below 20 is dropped. (9.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v9.0.0)

### Security

- Fixes possible prototype pollution during parsing. (9.0.2) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v9.0.2)

### Fixes and other changes

- Fixes parsing of multiline strings. (9.2.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v9.2.0)
- Parsing and compilation now handle `#~|` previous-msgid comments in obsolete entries. (9.1.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v9.1.0)

## gettext-parser 8

### Breaking changes

- The package switched to ESM; use import instead of require to use gettext-parser. (8.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v8.0.0)
- Support for Node.js versions 17 and below was dropped. (8.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v8.0.0)

## gettext-parser 7

### Breaking changes

- The method signature changes from accepting defaultCharset to accepting options. (7.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v7.0.0)
- The method signature changes from accepting defaultCharset to accepting options; transformOptions remains the second argument. (7.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v7.0.0)

### New APIs and options

- Adds a validation option to PO parsing; it is disabled by default. (7.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v7.0.0)

## gettext-parser 6

### Breaking changes

- Support for Node versions below 12 is dropped through the readable-stream dependency update. (6.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v6.0.0)

### Fixes and other changes

- PO output now ends with a newline. (6.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v6.0.0)

## gettext-parser 5

### Breaking changes

- When line folding is disabled by setting it to 0, folding still occurs on newline characters (\n). (5.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v5.0.0)

### New APIs and options

- Added support for obsolete messages, whose lines start with #~. (5.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v5.0.0)

## gettext-parser 2

### Breaking changes

- The parameter formerly named sortByMsgId was renamed to sort, requiring callers to update their code. (2.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v2.0.0)

### New APIs and options

- The sort parameter can also accept a custom function. (2.0.0) — [release notes](https://github.com/smhg/gettext-parser/releases/tag/v2.0.0)
