npm / content-disposition
content-disposition
What changed in content-disposition 1 to 3, from its official release notes, upgrade guides and advisories. Also covers @types/content-disposition. Sources checked 2026-11-30.
12 breaking3 new APIs and options1 performance2 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcontent-disposition 35 changes
Breaking changes 4
With extended decoding enabled, parse omits the raw extended parameter and fixes edge cases around duplicate parameters.
The package is now ESM only, which affects how developers load it.
With extended format, param* is used instead of param when both are included and encoding would otherwise occur; extended: false is unchanged.
Invalid percent-encoding in ISO-8859-1 ext-value is now rejected.
Behavior and default changes 1
With extended decoding enabled, format emits all provided parameters, including duplicates.
content-disposition 212 changes
Breaking changes 5
Use the named create export instead of the default export.
create no longer applies basename; pass a filename rather than a full path to avoid exposing directory structure.
The filename passed to create is now ASCII only.
The decoder no longer falls back; invalid UTF-8 is no longer supported.
The default export was removed; use the named create export instead.
New APIs and options 3
format is now exposed as a method for formatting content-disposition values.
Extended parsing can now be disabled.
The multipart option parses headers within multipart/form-data appropriately, with HTML multipart behavior compatibility.
Performance 1
The parser was refactored to be 3x faster.
Behavior and default changes 1
The parser is more lenient and now parses unicode.
Fixes and other changes 2
Allows empty parameter values in quoted text.
Uses the first extended parameter when multiple extended parameters are present.
content-disposition 15 changes
Breaking changes 3
UTF-8 decoding now uses decodeURIComponent, which may affect how encoded values are decoded.
The engines field was updated to reflect the minimum supported Node.js version.
Support for Node.js versions below 18 was dropped.
Fixes and other changes 2
The package is usable in all JavaScript environments after removing its dependency on node:path.
Decoding now supports the charset label utf8 without a dash.