unstale

npm / earcut

earcut

What changed in earcut 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

3 breaking1 new APIs and options5 performance1 tooling5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

earcut 315 changes

Breaking changes 3

  • The package is published as an ES module and no longer supports CommonJS; use v2.2.4 if you need compatibility.

    3.0.0release notes

  • The legacy UMD browser bundle exposes the main function as earcut.default.

    3.0.0release notes

  • Modern ES syntax drops IE11 support; developers can transpile on their end to keep support.

    3.0.0release notes

New APIs and options 1

  • Adds a function that refines an arbitrary triangulation, including earcut output, into a constrained Delaunay triangulation, improving triangulation quality at a small runtime and bundle-size cost.

    3.2.0release notes

Performance 5

  • Adds a small microoptimization for big input.

    3.2.4release notes

  • Speeds up refine slightly.

    3.2.3release notes

  • Improves refine performance; the reported regression changes from +50% to +38%.

    3.2.2release notes

  • Performance improves by another 6%.

    3.1.1release notes

  • Triangulation of large polygons with holes is significantly faster; the representative fixture drops from ~1000 ms to ~475 ms.

    3.1.0release notes

Tooling 1

  • Adds first-class TypeScript types via strict JSDoc.

    3.1.0release notes

Fixes and other changes 5

  • Fixes cases where deviation worked incorrectly for zero-area polygons.

    3.2.4release notes

  • Fixes a v3.2 regression that retained more memory than necessary in some cases.

    3.2.4release notes

  • Fixes an edge case that could cause an infinite loop on near-cocircular points.

    3.2.3release notes

  • Fixes cases where refine leaves quads in a non-Delaunay state.

    3.2.1release notes

  • Fixes edge cases where hole self-tangencies could produce incorrect triangulation.

    3.1.0release notes