HTML5 FormData polyfill for browsers and Node.js, providing a spec-compatible FormData implementation when it is missing or incomplete. It includes a browser polyfill that patches fetch and XMLHttpRequest to correctly send FormData, and a separate Node.js/ESM module useful for building and serializing multipart request bodies (including helpers to convert FormData to Blob for HTTP libraries like node-fetch).
Project status
- The repository appears to have some activity (upstream last push on 2024-03-06), but the most recent update entries shown for this project are from 2021 (v4.0.10 to v4.0.8), suggesting maintenance or slow-evolving development rather than frequent updates.
- Apparent update cadence is low based on the available release/update history (v4.0.9 and v4.0.10 are a couple days apart in 2021, but there is a multi-year gap afterward in the provided summaries).
AI summary generated Today
Recent updates
v4.0.10
9/30/2021v4.0.10 contains a small bug fix related to `instanceof` behavior for `FormData`. The implementation of the `hasInstance`-style check was hardened to safely handle `null` values, and tests were updated to cover this scenario.
v4.0.9
9/29/2021v4.0.9 includes a single bug fix related to the FormData class behavior with Symbol.hasInstance. The change updates the implementation so that hasInstance logic is defined as a static method, improving correct instanceof handling.
v4.0.8
9/26/2021v4.0.8 primarily removes the npm prepare script and makes minor build-related adjustments. The code diff also shows additional changes related to Node compatibility (optional chaining removal), an added Node engine requirement, and a fetch-blob dependency update, none of which are documented in the release notes.
Breakingv4.0.6
9/6/2021The release notes only state that the TypeScript declaration files (d.ts) were included. The actual code changes go well beyond that, including modifications to how multipart/form-data bodies are encoded (line break normalization, key/filename escaping), plus dependency and build tooling updates.
BreakingFeatures4.0.5
6/19/2021Release 4.0.5 updates the formdata-polyfill to normalize line breaks when serializing FormData into multipart/form-data payloads. The code changes focus on how string field values are embedded into the multipart body.
4.0.4
6/17/2021Version 4.0.4 introduces a major refactor of the project, adding a dedicated ESM/Node-friendly build and a pure `formDataToBlob` conversion helper (built around `fetch-blob`). The browser polyfill implementation was also significantly changed, including how `File` objects are created and how multipart payloads are serialized (including escaping key and filename values).
Features3.0.20
6/17/2020v3.0.20 contains a small release note entry, "fix: #110", but the code diff shows a much larger internal refactor of the FormData polyfill. In addition to fixing disabled fieldset handling, the implementation of value normalization, storage, and iteration behavior changed substantially.
Features3.0.19
8/6/2019v3.0.19 is labeled as a fix for iOS 9 blob detection, with development dependency updates. The main runtime change is in the FormData polyfill bootstrap logic around how it detects Blob support, plus minor XHR-related handling adjustments.
3.0.18
5/16/2019Version 3.0.18 changes how the polyfill interacts with XHR Content-Type headers when sending FormData. The documented intent is to avoid setting the Content-Type request header if the caller already set it.
3.0.17
3/3/2019Version 3.0.17 adds support for using the polyfilled FormData with navigator.sendBeacon, and it changes how empty file inputs are handled. Specifically, file inputs that have no selected files now result in an appended empty File object instead of sending nothing for that field.
BreakingFeatures