chore(release): new release#288
Open
github-actions[bot] wants to merge 1 commit intomainfrom
Open
Conversation
a7f5373 to
53210a9
Compare
06298d5 to
c50c2ff
Compare
c50c2ff to
24ecb29
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
watchpack@2.5.2
Patch Changes
fix: retry
fs.lstaton transientEBUSYerrors instead of flagging the (by @alexander-akait in #293)file as removed (fixes Webpack watch stops if one of the output files is busy #223, Watch Mode stops functioning if emitted file is busy or locked #44).
On Windows it is common for anti-virus scanners, indexers or the editor
itself to briefly hold an exclusive handle on a file that has just
changed. Before this change the watcher would receive the
fs.watchevent, call
lstat, get backEBUSY, and fall through tosetMissing— causing a spurious
removeevent and in some cases leaving thewatcher unable to see further changes for that file until the directory
was re-scanned.
DirectoryWatchernow retrieslstatup to three times (100 ms apart)before giving up, and does not emit a remove when the only reason the
file could not be stat'd was
EBUSY.The retry count is controlled by the
WATCHPACK_RETRIESenvironmentvariable (default:
3; set to0or"false"to disable retrying andrestore the previous behaviour).
Improve perfomance for ignored and improve perfomance for reduce plan. (by @alexander-akait in #289)
perf: skip the path-separator replacement when the input has no backslash (by @alexander-akait in #287)
(benchmarks measure ~35–45% less time for
ignoredmatchers on POSIX paths),fast-path single-element
ignoredarrays, and makereducePlan's selectionloop walk only structurally valid candidates with an early exit when the
ideal reduction is found (measured ~20–40% faster on medium and large
plans). Adds a tinybench suite under
bench/and a CodSpeed GitHub Actionsworkflow so future regressions are caught automatically.
fix: don't log "Watchpack Error (initial scan)" for unreadable entries (by @alexander-akait in #298)
inside a watched parent directory (fixes Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/...' #187).
Webpack registers every ancestor of a watched file as a watched
directory (so
/mnt/c/Users/me/projcauses watchpack to scan/mnt/c,/mnt,/). When such a parent contains entries the current processcan't
lstat—pagefile.sys/hiberfil.syson WSL,/efion Linuxwhen the EFI partition isn't mounted, protected paths on Node ≥22.17 on
Windows where libuv now reports
EINVALinstead ofEACCES— theinitial scan would print:
These entries aren't actually being watched (only their sibling, e.g.
/mnt/c/Users, is) so the log was harmless but very noisy and sent alot of users on wild goose chases.
DirectoryWatcher#doScannow treatsEACCES/ENODEV(andEINVALon Windows) the same way it already treats
EPERM/ENOENT/EBUSY: the offending entry is recorded as missing and the scancontinues silently. The same set is applied to the
readdirerror pathon the watched directory itself, so an unreadable mount point is
treated as removed instead of logged.
No public API change. If you were relying on the error appearing on
stderr, set the impacted entry up as an explicit watch so a real failure
on it surfaces through the existing
errorevent instead.fix: prevent unbounded watcher growth when a symlinked directory points (by @alexander-akait in #297)
back to one of its own ancestors (cycle protection for the
followSymlinks: truesymlink-descent path).The recent fixes for Watching a directory doesn't watch nested symlinks when followSymlinks = true #190 / Add support for watching symlinks that resolve to paths outside the watch folder #231 made
DirectoryWatcherfollowsymlinked directories whose realpath lives outside the watched real
directory, registering them as nested watched directories. That logic
short-circuits when the symlink target is a sibling in the same parent
(
dirname(realPath) === this.path), but it does not catch the casewhere the target is an ancestor of the symlink itself — for example
a/b/loop -> ... In that casereaddirfollowed the symlink, foundthe original tree again, and a new
DirectoryWatcherwas created ateach recursion level until the path exceeded
PATH_MAX(locallyobserved: ~1500 watchers within 2 s, ~2500 within 2.5 s).
DirectoryWatchernow computespath.relative(realPath, itemPath)before descending; if the relative path doesn't start with
..andisn't absolute (i.e. the symlink target is at-or-above the symlink in
the directory tree), the symlink is recorded as a plain entry instead
of being descended into. Behaviour for symlinks pointing outside the
watched tree (the case Add support for watching symlinks that resolve to paths outside the watch folder #231 fixes) is unchanged.