All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The
quaff
individual file processor is now available atloadFile
. This makes it possible to tap into all ofquaff
's processors to load a single file. The newly namedload
export works the same as before and usesloadFile
behind the scenes. - It is now possible to include JavaScript files using the
.cjs
and.mjs
extensions.
quaff
is now a pure ESM package. It can no longer berequire()
'd from CommonJS. If this functionality is still needed please continue to usequaff@^4
. It is also possible to dynamically import ESM in CommonJS (await import('quaff')
) if that is compatible with your use case.quaff
no longer has a default export and now uses two named exports -load
andloadFile
.
quaff
will now throw an error when more than one input file attempts to use the same output key. This is caused by having multiple files in a directory with the same name but different extensions.- When a
.yaml
or.yml
file fails to parse the thrown error will now include the file path. - We are now testing
quaff
in Mac OS and Windows thanks to GitHub Actions. Don't expect that'll ever be an issue but good to know.
tiny-glob
has been replaced withtotalist
, which makes quaff a little faster at iterating through files.- All tests have been moved to
uvu
.
- Added TypeScript definition file.
- Some housekeeping in
index.js
, but no functional changes.
- Support for ArchieML files. These are processed when they are found with the
.aml
extension. - Support for JavaScript files. This includes any JavaScript file that provides a default export (
module.exports = ...
). JavaScript files that export functions, including async functions, are also supported! This makes it possible forquaff
to load data that's fetched from an API. Load GraphQL and go to town! Do some extra-preprocessing!
quaff
now returns a Promise to enable async resolution of JavaScript files.- Moves testing to
nyc
. - Now requires Node.js 8 or later.