NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4171 most downloaded on npm
A function to recursively extract files and their object paths within a value, replacing them with null in a deep clone without mutating the original value. FileList instances are treated as File instance arrays. Files are typically File and Blob instance
Last release 2 months ago
24 Jul 2026
Ships unpredictably
gaps range from 2 weeks to 3.9 years
Nearly every release is documented
notes for 22 of 22 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
22 releases · first in 2017
Updated Node.js support to ^22.13.0 || ^24.0.0 || >=26.0.0.
^22.13.0 || ^24.0.0 || >=26.0.0.@import for type imports (requires TypeScript v5.5+).isExtractableFile is no longer exported from extract-files/extractFiles.mjs.@deno-types with @ts-types (requires Deno v1.43+).coverage-node and test-director.assertBundleSize.package.json field repository to conform to new npm requirements..editorconfig..gitattributes file to enforce LF line endings.One column per quarter.
Updated Node.js support to ^14.17.0 || ^16.0.0 || >= 18.0.0.
^14.17.0 || ^16.0.0 || >= 18.0.0.node: URL scheme for Node.js builtin module imports in tests.actions/checkout to v3.actions/setup-node to v3.jsconfig.json:
compilerOptions.maxNodeModuleJsDepth to 10.compilerOptions.module to nodenext.not IE > 0 from the Browserslist query.Record types with index signatures.Updated Node.js support to ^12.22.0 || ^14.17.0 || >= 16.0.0.
Updated Node.js support to ^12.22.0 || ^14.17.0 || >= 16.0.0.
Added a new is-plain-obj dependency that is ESM.
Updated dev dependencies, some of which require newer Node.js versions than previously supported.
Public modules are now individually listed in the package files and exports fields.
Removed ./package from the package exports field; the full package.json filename must be used in a require path.
Removed the package main index module; deep imports must be used.
Shortened public module deep import paths, removing the /public/.
The API is now ESM in .mjs files instead of CJS in .js files, accessible via import but not require.
Implemented TypeScript types via JSDoc and @deno-types comments, fixing #7.
Changed the function extractFiles parameters. The previously third isExtractableFile parameter has been renamed isExtractable, is now the second parameter, and no longer defaults to the function isExtractableFile to avoid a redundant import when a custom function is specified.
The function extractFiles now does basic runtime argument type validation.
The function extractFiles now also deep clones “plain” objects that aren’t Object instances (e.g. Object.create(null)).
Removed out of the box React Native support. The class ReactNativeFile is no longer exported, or matched by the function isExtractableFile.
This class was bloating non React Native environments with an extra module, increasing bundle sizes when building and adding an extra step to ESM loading waterfalls in browsers.
It’s the responsibility of Facebook to adhere to web standards and implement spec-compliant File, Blob, and FormData globals in the React Native environment.
In the meantime, React Native projects can manually implement a class ReactNativeFile and match it with a custom function isReactNativeFile for use with the function extractFiles.
types script.jsdoc-md dev dependency and the related package scripts, replacing the readme “API” section with a manually written “Exports” section.assertBundleSize function to assert module bundle size in tests:
extractFiles function test bug.extractFiles function test clarifying that object properties with Symbol keys don’t get cloned.singleQuote to the default, false.license.md MIT License file, fixing #19 via #20.The function extractFiles now deeply clones an input value containing multiple references of an object or array with a mirrored reference structure in
extractFiles now deeply clones an input value containing multiple references of an object or array with a mirrored reference structure instead of creating multiple objects or arrays. This change shouldn’t affect typical JSON.stringify use with cloned values.extractFiles now uses for…of to iterate FileList instances.main field path.extractFiles now correctly handles circular references within the input value by recreating the circular references in the returned clone instead of infinitely recursing to the point of a Maximum call stack size exceeded error, fixing #14.extractFiles tests to use Object.freeze with input objects and arrays to ensure input isn’t mutated.Replaced the package.json exports field public subpath folder mapping (deprecated by Node.js) with a subpath pattern, fixing #17. Deep require paths w…
^12.20 || >= 14.13.package.json exports field public subpath folder mapping (deprecated by Node.js) with a subpath pattern, fixing #17. Deep require paths within extract-files/public/ must now include the .js file extension..mjs files instead of CJS in .js files.hard-rejection to detect unhandled Promise rejections in tests, as Node.js v15+ does this natively.revertable-globals to define globals per-test.esbuild and gzip-size, removing size-limit related dev dependencies, config, and scripts.npm-debug.log from the .gitignore file as npm v4.2.0+ doesn’t create it in the current working directory.extractFiles with an undefined value.actions/checkout to v2.actions/setup-node to v2.CI environment variable as it’s set by default.main field path.jsdoc-md v10 automatically generates a Prettier formatted readme.test:jsdoc script that checks the readme API docs are up to date with the source JSDoc..js file extension in internal require paths.changelog.md is no longer published.Updated Node.js support to ^10.17.0 || ^12.0.0 || >= 13.7.0.
^10.17.0 || ^12.0.0 || >= 13.7.0.lib directory to public; existing deep import or require paths must be updated.module field.npm install-test command..js files are parsed as scripts..js file extensions from require paths.import and require the public API.Updated the package engines.node field to 10 - 12 || >= 13.7 to reflect the package exports related breaking changes in extract-files@8.0.0.
Updated the package exports field:
Deep imports to specific files are now allowed, e.g.
import extractFiles from 'extract-files/lib/extractFiles.js';
const extractFiles = require('extract-files/lib/extractFiles');
The package.json can now be required, e.g.
const pkg = require('extract-files/package.json');
// With Node.js --experimental-json-modules flag.
import pkg from 'extract-files/package.json';
engines.node field to 10 - 12 || >= 13.7 to reflect the package exports related breaking changes in extract-files@8.0.0.prepare:prettier and test:prettier scripts.test:eslint script args for consistency with test:prettier.semi to the default, true.src directory so lib and test files are separate with their own .babelrc.js files.Added a package `exports` field to support native ESM in Node.js.
exports field to support native ESM in Node.js..js (CJS) instead of .mjs (ESM), so undocumented deep imports may no longer work. This approach avoids the dual package hazard.@babel/plugin-proposal-class-properties from dev dependencies and the Babel config.prettier v2.ExtractableFileMatcher JSDoc typedef.Updated Node.js support from v8.10+ to v10+.
tap and nyc with test-director, coverage-node and hard-rejection to improve the dev experience, test ESM natively with Node.js, and reduce the dev install size by ~78.8 MB. These new dev dependencies require Node.js v10+.eslint-plugin-import-order-alphabetical dev dependency.husky and lint-staged.Updated Node.js support from v6+ to v8.10+.
extractFiles function, for specifying a custom extractable file matcher.isExtractableFile function that is used as the default extractable file matcher for the extractFiles function. This can be used in a custom extractable file matcher implementation to match the default extractable files, along with additional custom files..github/funding.yml to display a sponsor button in GitHub.package.json funding field to enable npm CLI funding features.size-limit dev dependency with @size-limit/preset-small-lib.babel-plugin-transform-require-extensions dev dependency and ensured ESM import specifiers in both source and published .mjs files contain file names with extensions, which are mandatory in the final Node.js ESM implementation. Published CJS .js files now also have file extensions in require paths.module field.require-jsdoc comments.test script as they are the slowest.test:tap script to workaround a tap bug.prepublishOnly script.plugins before presets in Babel config as they run first.package.json by moving dev tool config to files.lib directory in .gitignore and .eslintignore.package-lock.json from .gitignore and .prettierignore as it’s disabled in .npmrc anyway.Instance (e.g. `new Date()`) references are copied to the clone instead of recursed as objects; fixing jaydenseric/apollo-upload-client#138 via #9.
new Date()) references are copied to the clone instead of recursed as objects; fixing jaydenseric/apollo-upload-client#138 via #9.extractFiles has a new return signature and no longer mutates the original input, fixing #8. It returns an object with clone, a clone of the original
extractFiles has a new return signature and no longer mutates the original input, fixing #8. It returns an object with clone, a clone of the original input value with files recursively replaced with null, and files, a Map instance keying each extracted file to an array of object paths.extractFiles.*.Ensure Babel reads from the package browserslist field due to a sneaky `@babel/preset-env` breaking change.
> 1% to > 0.5%, not dead.browserslist field due to a sneaky @babel/preset-env breaking change.husky version.module field. Webpack by default resolves extensionless paths the same way Node.js in --experimental-modules mode does; .mjs files are preferred. Tools misconfigured or unable to resolve .mjs can get confused when module points to an .mjs ESM file and they attempt to resolve named imports from .js CJS files.ReactNativeFileSubstitute type example.jsdoc-md version.--experimental-modules) and the NODE_ENV.extractFiles is a named export again, and there is no longer a default export; mixed named and default exports causes native ESM and CJS interoperabil
extractFiles is a named export again, and there is no longer a default export; mixed named and default exports causes native ESM and CJS interoperability issues.isObject is no longer exported. It was not a documented API anyway.ReactNativeFile static function list. It added surface area to the API and bundles and is simple to do manually.@babel/runtime dependency.prepare to support installation via Git (e.g. npm install jaydenseric/extract-files).jsdoc-md to generate readme API docs from source JSDoc, which has been much improved.tap instead of ava. Tests no longer transpile on the fly, are faster and AVA no longer dictates the Babel version..mjs and .js files in both native ESM (--experimental-modules) and CJS environments.test:size script, using size-limit to guarantee < 500 byte ESM and CJS bundle sizes.rimraf dev dependency in favour of native rm -rf.fix script.MODULE environment variable to BABEL_ESM to be more specific for the package prepare:mjs script..json, .yml and .md files..prettierignore to leave package.json formatting to npm.eslint-config-env.repository field.master branch.Added support for `Blob` types, via #5.
The extractFiles function is now the default export.
extractFiles function is now the default export.null instead of deletion, fixing #4.Setup Travis to test using the latest stable Node.js version and the oldest supported in package.json engines (v6.10).
package.json engines (v6.10).Support browsers with >1% global usage (was >2%).
package.json engines.--experimental-modules:
.mjs extension.babel-preset-env to handle polyfills so only required ones are included for supported environments.Array.prototype.slice.call to convert FileList instances to arrays instead of Array.from which requires a lot of polyfills.dist directory to lib..babelrc.js.Fixed incorrect usage example code for ReactNativeFile.list, via #1.
ReactNativeFile.list, via #1.Extracted file paths no longer begin with . when no tree path is passed to extractFiles.
. when no tree path is passed to extractFiles.Removed lint-staged, linting and tests now run on commit.
lint-staged, linting and tests now run on commit.extractFiles bugs by using logic that worked in apollo-upload-client@5.Initial release.
Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →