unstale

npm / body-parser

body-parser

What changed in body-parser 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-22.

4 security1 new APIs and options3 performance2 fixes and other

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

npx @unstale/cli init

@unstale/cli on npm

body-parser 210 changes

Security 4

New APIs and options 1

Performance 3

  • Avoids the first-character regex for direct JSON bodies.

    2.4.0release notes

  • A conditional check is eliminated from the JSON strict mode hot path.

    2.3.0release notes

  • The empty-body guard is moved to avoid creating an extra function closure.

    2.3.0release notes

Fixes and other changes 2

  • Reading the body no longer mutates read options.

    2.4.0release notes

  • ESM compatibility is improved, making the package work better in ESM contexts.

    2.3.0release notes