chore(deps): update dependency watchexec to v2 #962
Merged
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 contains the following updates:
1.25.1
->2.1.1
Release Notes
watchexec/watchexec (watchexec)
v2.1.1
: CLI v2.1.1-w, --watch
was accidentally set to behave as-W
(#828)v2.1.0
: CLI v2.1.0-W
,--watch-non-recursive
for watching paths without also watching subfolders..git
is a file rather than a folder)v2.0.0
: CLI v2.0.0This is the first breaking release. Most of it is cleaning up a number of deprecated options, and changing some defaults. The idea, however, is to start a new era of Watchexec releases, where breaking changes are allowed more easily (to give an idea of how breaking-change-averse the project has been: this release was planned in January 2022! and ever-delayed since).
Fear not! The cadence of breaking releases will be at most once or twice a year, and whenever possible a deprecation will precede a break by at least three months. Watchexec will remain a stable part of your workflow, while allowing ourselves some evolution.
$SHELL
when it is present. (#210)Use
--shell=sh
to switch back if your$SHELL
is something else.Use
--shell=cmd
to switch back to CMD.EXE, or set theSHELL
environment variable.A reminder that Windows 7 is not supported, and hasn't been for years.
--on-busy-update
defaults todo-nothing
now (wasqueue
).Events received while a command is running won't trigger a run of the command immediately following this one.
-W
/--watch-when-idle
is removed, as it is now the default.--stop-timeout
is now 10 seconds.--debounce
,--delay-run
,--poll
, and--stop-timeout
now prefer durations with a unit, and warn if given unit-less durations. The default units for these are millisecond for--debounce
and--poll
, and seconds for--delay-run
and--stop-timeout
, which is a source of confusion. Unit-less durations will be removed in a future breaking release.--no-shell
is removed.Use
--shell=none
instead. The-n
short option remains as an alias to--shell=none
.-k
/--kill
is removed.Use
--signal=KILL
instead.--changes-only
is removed.Use
--print-events
instead.--emit-events-to
defaults tonone
, and theenvironment
mode is deprecated.--emit-events-to
no longer acceptsstdin
(deprecated alias forstdio
) andjson-stdin
(deprecated alias forjson-stdio
).--no-ignore
is removed.Use
--no-project-ignore
instead.--no-environment
is deprecated.--clear=reset
will reset the screen on graceful shutdown. (#797)--no-process-group
is deprecated.WATCHEXEC_FILTERER
environment variable.Improvements
--wrap-process=MODE
lets you choose between using process groups, process sessions, or nothing at all. (#794)WATCHEXEC_TMPDIR
environment variable can be used to customize where Watchexec will write temporary files, if for some reason your$TMPDIR
is unwritable. (#814)Experimental new feature
As a treat, this release also features an experimental new option:
-j
or--filter-prog
, which lets you write filter programs.-j
,--filter-prog EXPRESSION
Provide your own custom filter programs in jaq (similar to jq) syntax. Programs are given an event in the same format as described in
--emit-events-to
and must return a boolean. In addition to the jaq stdlib, watchexec adds some custom filter definitions:path | file_meta
returns file metadata or null if the file does not exist.path | file_size
returns the size of the file at path, or null if it does not exist.path | file_read(bytes)
returns a string with the first n bytes of the file at path. If the file is smaller than n bytes, the whole file is returned. There is no filter to read the whole file at once to encourage limiting the amount of data read and processed.string | hash
, andpath | file_hash
return the hash of the string or file at path. No guarantee is made about the algorithm used: treat it as an opaque value.any | kv_store(key)
,kv_fetch(key)
, andkv_clear
provide a simple key-value store. Data is kept in memory only, there is no persistence. Consistency is not guaranteed.any | printout
,any | printerr
, andany | log(level)
will print or log any given value to stdout, stderr, or the log (levels = error, warn, info, debug, trace), and pass the value through (so[1] | log("debug") | .[]
will produce a1
and log[1]
).All filtering done with such programs, and especially those using kv or filesystem access, is much slower than the other filtering methods. If filtering is too slow, events will back up and stall watchexec. Take care when designing your filters.
If the argument to this option starts with an '@', the rest of the argument is taken to be the path to a file containing a jaq program.
Jaq programs are run in order, after all other filters, and short-circuit: if a filter (jaq or not) rejects an event, execution stops there, and no other filters are run. Additionally, they stop after outputting the first value, so you'll want to use 'any' or 'all' when iterating, otherwise only the first item will be processed, which can be quite confusing!
Examples:
Regexp ignore filter on paths:
Pass any event that creates a file:
Pass events that touch executable files:
Ignore files that start with shebangs:
More examples can be found and contributed in the discussion thread
Configuration
📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.