# What changed in d3-scale

> 6 changes in d3-scale 3 to 4 from its official release notes, upgrade guides and advisories: 2 breaking. Each one cited. Sources checked 2026-11-30. HTML: https://unstale.sh/npm/d3-scale/

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

## d3-scale 4

### Breaking changes

- The package now requires Node.js 12 or higher. (4.0.0) — [release notes](https://github.com/d3/d3-scale/releases/tag/v4.0.0)
- The package adopts type: module, changing how Node.js interprets its files. (4.0.0) — [release notes](https://github.com/d3/d3-scale/releases/tag/v4.0.0)

### Performance

- Ordinal scale domains now use InternMap. (4.0.0) — [release notes](https://github.com/d3/d3-scale/releases/tag/v4.0.0)

### Fixes and other changes

- A diverging scale now treats null input as unknown. (4.0.3) — [release notes](https://github.com/d3/d3-scale/releases/tag/v4.0.3)
- Fixes an off-by-1ms error in scaleTime.invert. (4.0.3) — [release notes](https://github.com/d3/d3-scale/releases/tag/v4.0.3)

## d3-scale 3

### Behavior and default changes

- Accept iterables wherever appropriate, allowing developers to use iterable values with the API. (3.0.0) — [release notes](https://github.com/d3/d3-scale/releases/tag/v3.0.0)
