# What changed in @ast-grep/napi

> 17 changes in @ast-grep/napi 0.45 to 0.51 from its official release notes, upgrade guides and advisories: 2 breaking, 1 security, 8 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/npm/@ast-grep/napi/

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

## @ast-grep/napi 0.51

### Tooling

- The project setup hint now uses the ast-grep name. (0.51.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.51.0)

### Fixes and other changes

- Files are preserved when update-all writes fail. (0.51.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.51.0)

## @ast-grep/napi 0.50

### Breaking changes

- Custom language loading now uses a policy, and custom language libraries require opt-in. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- Schema validation now rejects null relation fields. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)

### Security

- The CLI can trust and revoke custom language policies. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)

### New APIs and options

- Java outline rules were added for annotation types and elements. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- An outline rule was added for Java enum members. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- An outline rule was added for Java module declarations. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- An outline rule was added for Java record declarations. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- Outline rules were added for Java wildcard imports. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- Zig support was added. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)

### Fixes and other changes

- C/C++ declarator identifier names are now captured. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)
- Java private and protected fields are now reported in the outline. (0.50.0) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.50.0)

## @ast-grep/napi 0.45

### New APIs and options

- Adds Markdown heading support to outline. (0.45.3) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.45.3)
- Adds a CLI option to set the minimum severity. (0.45.3) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.45.3)

### Fixes and other changes

- Fixes the ordering requirement for ast-grep-ignore to take effect. (0.45.3) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.45.3)
- Anchors fallback signatures to names. (0.45.3) — [release notes](https://github.com/ast-grep/ast-grep/releases/tag/0.45.3)
