- List
types
first inpackage.json
exports
map
- Fix race condition causing initial wave to hang when
defiler.get(filter)
is called after everything else is already done
- Expose proper ESM build (along with CJS build) using
pkg.exports
map
- Fix published types for
defiler.add(file)
- Return a
Promise
fromdefiler.add(file)
indicating when processing is complete
- Include documentation files in published package
- Make
pkg.engines.node
supported versions range more correct and strict
- Require Node 12.17+ for native
AsyncLocalStorage
- Use
AsyncLocalStorage
for context tracking, rather than hacky custom solution - Fix dependencies fetched during generators not being attached back to the generator
- Lazily enable async hook and disable it when possible
- Include TypeScript declaration file (
.d.ts
)
- Git tag is now the built version, for easier direct installation without the npm registry
- Defer resolving the
dir
passed to theDefiler
constructor untildefiler.exec()
is called
defiler.get(filter)
now also returns virtual files in addition to physical ones
- Some fixes to resolving in
defiler.get
, and also allow the user-supplied resolver to return an array or a filter function
- New
defiler.get
feature: pass a filter function and retrieve all physical files whose paths match the filter (and make the transform/generator also re-run when physical files are created that match the filter)
- Fix a race condition where we might over-zealously break a non-existent deadlock because we haven't noticed yet that a file has become available
- Fix
file.filename
on top-level files
- Fix incorrect dependence relationships being made in certain cases
- Tidy API - no need to pass
defiler
instance to user code, as we are now actually tracking the asynchronous context in whichdefiler.get
anddefiler.add
are called - Rename
type
argument to the transform to the clearerevent
- Require Node.js 8.2+ for the use of
async_hooks
- Add
type
field to object passed to transform - Add
onerror
handler callback option toDefiler
constructor - Removed emitted events from
Defiler
instance, as these are now handled more generally bytype
andonerror
- Add
defiler.resolve
, exposing path resolution via yourresolver
- If file A's processing creates a virtual file B which depends on file C, then when file C changes, re-transform file B starting from what was originally created by file A
- Fix dependency tracking
- Allow multiple directories per Defiler instance, with per-directory
pre
-processing - Other API tweaks, see docs
- Fix a regression which caused a wave to hang when a file was deleted or renamed
- Fix a race condition that can occur when generators finish after transforms in a given wave
- Allow per-file and per-directory filtering of which files to consider
- Allow
read
andenc
settings to be determined per file - Remove
file.paths
- Support custom
resolver
option toDefiler
to resolve paths passed todefiler.get
anddefiler.add
from the transform
- Also wait for changes to settle if this wave was triggered by a file deletion
- Fix race condition when attempting to
defiler.get
aFile
that takes too long to process beyond the time it is waiting for its own dependencies
- If a file change event comes in during the first wave of processing, don't wait for another event after the first wave to trigger the second wave, and instead start it immediately upon finishing the first
- Fix
defiler.get
typechecking
- Remove concept of '
get
function' passed to transform and generators - Add
defiler.get
method to replace it - Fix a tricky dependency bug: If file or generator A added a virtual file B whose transformation depended on file C, make changing file C reprocess A, not B
- Remove
defiler.depend
, which was only exposed as a partial workaround for the above bug - Remove non-useful
path
argument toFile
constructor
- Document
file.stats
(formerlyfile.stat
, shhh) - Wait for all
defiler.add
ed files to settle before proceeding with handling the next watch event - Prevent mutations to
file.paths
from making their way back into the original copy of theFile
- Simplify the API yet again - see docs
- Add new guide to the docs
- Add more typechecking
- Add
file.dir
andfile.filename
, which also are kept in sync withfile.path
- Add support for other encodings, via
file.enc
and theenc
option when specifying an input directory
- Close
FSWatcher
instances when their directories are deleted
- Allow dependence on as-yet unknown files
- API adjustments - see docs
- Beautify
Defiler
API - see docs
- Add
file.paths
, an array of historical paths for the file - Change default debounce timeout to 10ms
- Allow the
debounce
time for an input directory to be configured - Normalize input directory names
- Fix a very embarrassing bug
- Switch from using Chokidar to an internal lightweight file watching system
- Remove concept of closing a
Defiler
instance and instead allow each configured input directory to specify whether it should be watched for changes - see API docs
- Make
defiler.ready
wait for any pending calls todefiler.addFile
that have been called in the meantime
- Switch from using Gaze to Chokidar for the underlying file watching library
- Allow passing a POJO to
defiler.addFile
instead of aFile
instance
- Change several APIs to use objects as named parameters - see docs
- Do not include directories in
defiler.origFiles
/defiler.files
/defiler.origPaths
- Add second argument to transform and generator callbacks which is a convenience function calling
defiler.get
with the appropriatedependent
- Add option to
defiler.exec
to automatically close Gazes after initial wave of processing - Rename
defiler.use
todefiler.get
and tidy its API - see docs
- Simplify if/else handling of conditional transforms - see API docs
- Re-process files when a dependency is deleted
- Include
origPath
as new first argument inorigFile
,file
, anderror
events - Fix dependency tracking for rebuilds when a dependency is renamed by a transform
- Change second argument of
defiler.use
into an object, in preparation for later features - Combine various
defiler.add*
methods into onedefiler.add
method
- Send file changes through a queue, so we're only processing one at a time
- Don't lose changes that come in after Gazes are initialized but before first wave of processing is complete
- Fix entry URL for ES6 bundle
- Fix
defiler.origPaths
during initial wave of processing
- Actual initial version, after various pre-releases