Releases: jaydenseric/extract-files
Releases · jaydenseric/extract-files
Version 5.0.0
Major
extractFileshas a new return signature and no longer mutates the original input, fixing #8. It returns an object withclone, a clone of the original input value with files recursively replaced withnull, andfiles, aMapinstance keying each extracted file to an array of object paths.
Minor
- Files can now be used as the root value passed to
extractFiles.
Patch
- Updated dev dependencies.
- Updated package description.
- Moved JSDoc type definitions into the index file.
- Manually composed package exports instead of relying on
*. - Improved tests.
- Added a paragraph explaining the GraphQL use case to the readme.
Version 4.1.0
Minor
- Support more browsers by changing the Browserslist query from
> 1%to> 0.5%, not dead.
Patch
- Updated dev dependencies.
- Ensure Babel reads from the package
browserslistfield due to a sneaky@babel/preset-envbreaking change. - Updated package scripts and config for the new
huskyversion. - Removed the package
modulefield. Webpack by default resolves extensionless paths the same way Node.js in--experimental-modulesmode does;.mjsfiles are preferred. Tools misconfigured or unable to resolve.mjscan get confused whenmodulepoints to an.mjsESM file and they attempt to resolve named imports from.jsCJS files. - Added a
ReactNativeFileSubstitutetype example. - Move JSDoc typedefs to the end of files to make it quicker to find the code.
- Regenerated the readme API docs using the latest
jsdoc-mdversion. - Tests now log if the environment is CJS or ESM (
--experimental-modules) and theNODE_ENV.
Version 4.0.0
Major
extractFilesis a named export again, and there is no longer a default export; mixed named and default exports causes native ESM and CJS interoperability issues.isObjectis no longer exported. It was not a documented API anyway.- Removed the
ReactNativeFilestatic functionlist. It added surface area to the API and bundles and is simple to do manually.
Minor
- Updated Babel, removing the
@babel/runtimedependency. - Refactored package scripts to use
prepareto support installation via Git (e.g.npm install jaydenseric/extract-files). - Package marked side-effect free for bundlers and tree-shaking.
Patch
- Use
jsdoc-mdto generate readme API docs from source JSDoc, which has been much improved. - Use
tapinstead ofava. Tests no longer transpile on the fly, are faster and AVA no longer dictates the Babel version. - Tests run against the actual dist
.mjsand.jsfiles in both native ESM (--experimental-modules) and CJS environments. - Added a package
test:sizescript, usingsize-limitto guarantee < 500 byte ESM and CJS bundle sizes. - Removed the package clean script
rimrafdev dependency in favour of nativerm -rf. - Removed the package
fixscript. - Renamed the
MODULEenvironment variable toBABEL_ESMto be more specific for the packageprepare:mjsscript. - Lint
.json,.ymland.mdfiles. - Use
.prettierignoreto leavepackage.jsonformatting to npm. - Use
eslint-config-env. - Compact package
repositoryfield. - Updated package description.
- HTTPS package author URL.
- Added package keywords.
- Replaced shields.io readme badges with:
- A Badgen npm version badge.
- An official Travis badge that only tracks
masterbranch.
- Changelog version entries now have “Major”, “Minor” and “Patch” subheadings.
Version 3.1.0
Version 3.0.0
Major
- The
extractFilesfunction is now the default export. - Replace extracted files with
nullinstead of deletion, fixing #4.
Patch
- Updated dev dependencies.
- Simplified npm scripts.
Version 2.1.1
Patch
- Setup Travis to test using the latest stable Node.js version and the oldest supported in
package.jsonengines(v6.10). - Added a Travis readme badge.
Version 2.1.0
Minor
- Support browsers with >1% global usage (was >2%).
- Target Node.js v6.10+ for transpilation and polyfills via
package.jsonengines. - Support Node.js native ESM via
--experimental-modules:- Module files now have
.mjsextension. - Modular project structure that works better for native ESM.
- Module files now have
- Reduced bundle size, fixing #3:
- Using
babel-preset-envto handle polyfills so only required ones are included for supported environments. - Using
Array.prototype.slice.callto convertFileListinstances to arrays instead ofArray.fromwhich requires a lot of polyfills.
- Using
Patch
- Updated dependencies.
- Updated Prettier and ESLint config.
- Prettier formats distribution code as well as source code, along with the readme and changelog.
- No more source maps; Prettier does not support them.
- Added a clean step to builds.
- Renamed
distdirectory tolib. - Using Babel directly instead of Rollup.
- Smarter Babel config with
.babelrc.js. - Added links to readme badges.
- Updated the readme support section.
Version 2.0.1
Patch
- Updated dependencies.
- Fixed incorrect usage example code for
ReactNativeFile.list, via #1.
Version 2.0.0
Major
- Extracted file paths no longer begin with
.when no tree path is passed toextractFiles.
Patch
- Updated dev dependencies.
Version 1.1.0
Minor
- Added tests.
Patch
- Updated dev dependencies.
- Removed
lint-staged, linting and tests now run on commit. - Fixed
extractFilesbugs by using logic that worked inapollo-upload-client@5.