# What changed in pug

> 7 changes in pug 3 from its official release notes, upgrade guides and advisories: 2 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-27. HTML: https://unstale.sh/npm/pug/

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

## pug 3

### Breaking changes

- The minify option on filters now requires installing the relevant jstransformer. (3.0.0) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.0)
- Support for Node.js 6 and 8 has been dropped. (3.0.0) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.0)

### New APIs and options

- Pug supports each ... of ... loops, including iteration over Maps, Sets, and arrays. (3.0.0) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.0)
- A plugin can replace code generation using generateCode. (3.0.0) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.0)
- Filters can use a renderBuffer property to process Buffer input. (3.0.0) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.0)

### Behavior and default changes

- Read plugins must return Buffer to support filters that use renderBuffer; returning string remains supported otherwise. (3.0.0) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.0)

### Fixes and other changes

- The doctype option is now properly validated. (3.0.4) — [release notes](https://github.com/pugjs/pug/releases/tag/pug%403.0.4)
