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:
18.19.112
->22.16.4
10.0.20
->17.0.4
v3
->v4
v3
->v4
5.3.1
->6.4.1
9.1.3
->10.0.0
6.10.0
->7.1.2
8.0.3
->9.1.7
14.0.1
->16.1.2
5.0.2
->8.0.4
5.0.5
->6.0.1
3.3.4
->4.0.0
5.1.4
->6.0.1
Release Notes
actions/checkout (actions/checkout)
v4
Compare Source
url-helper.ts
now leverages well-known environment variables by @jww3 in https://github.com/actions/checkout/pull/1941isGhes
by @jww3 in https://github.com/actions/checkout/pull/1946actions/setup-node (actions/setup-node)
v4
Compare Source
avajs/ava (ava)
v6.4.1
Compare Source
What's Changed
New Contributors
Full Changelog: avajs/ava@v6.4.0...v6.4.1
v6.4.0
Compare Source
What's Changed
Interactive watch mode filters
@mmulet did fantastic work to spearhead interactive watch mode filters. You can now filter test files by glob patterns, and tests by matching their titles. It's just like you already could from the CLI itself, but now without exiting AVA 🚀 https://github.com/avajs/ava/pull/3372
As part of this work we've removed the "sticky"
.only()
behavior https://github.com/avajs/ava/pull/3381Examples
We've been remiss in merging https://github.com/avajs/ava/pull/3335 which updates the examples to use AVA 6. It's done now, examples are up to date and it's all due to @tommy-mitchell 👏
New Contributors
Full Changelog: avajs/ava@v6.3.0...v6.4.0
v6.3.0
Compare Source
What's Changed
npm audit
warnings by @novemberborn in https://github.com/avajs/ava/pull/3377New Contributors
Full Changelog: avajs/ava@v6.2.0...v6.3.0
v6.2.0
Compare Source
What's Changed
filterNodeArgumentsForWorkerThreads
option in https://github.com/avajs/ava/pull/3336New Contributors
Full Changelog: avajs/ava@v6.1.3...v6.2.0
v6.1.3
Compare Source
What's Changed
serial
configuration option by @turadg in https://github.com/avajs/ava/pull/3321New Contributors
Full Changelog: avajs/ava@v6.1.2...v6.1.3
v6.1.2
Compare Source
What's Changed
any: true
by @gibson042 in https://github.com/avajs/ava/pull/3313Full Changelog: avajs/ava@v6.1.1...v6.1.2
v6.1.1
Compare Source
What's Changed
Full Changelog: avajs/ava@v6.1.0...v6.1.1
v6.1.0
Compare Source
What's Changed
Implement
registerCompletionHandler()
by @novemberborn in https://github.com/avajs/ava/pull/3283AVA 6 expects test code to clean up gracefully when the tests are complete, allowing the test environment (worker thread or child process) to exit. If this does not happen, AVA will report a timeout. You can use
registerCompletionHandler()
to perform any other clean up (or indeed exit the process) after AVA has completed the test execution. See the description here.Fix potential bug with watch mode when no failed test files are written by @novemberborn in https://github.com/avajs/ava/pull/3287
Fix
ava/internal
ESM type module by @codetheweb in https://github.com/avajs/ava/pull/3292Full Changelog: avajs/ava@v6.0.1...v6.1.0
v6.0.1
Compare Source
What's Changed
Full Changelog: avajs/ava@v6.0.0...v6.0.1
v6.0.0
Compare Source
Breaking Changes
AVA now requires Node.js versions 18.18, 20.8 or 21. Versions 14 and 16 are no longer supported. #3251 #3216
When tests finish, worker threads or child processes are no longer exited through
proces.exit()
. If your test file does not exit on its own, the test run will time out. #3260Changes to watch mode #3218:
ava.config.*
orpackage.json
configuration.ignoredByWatcher
configuration has moved to thewatchMode
object, under theignoreChanges
key.fs.watch()
in recursive mode. This is supported on Linux in Node.js 20 or newer, and MacOS and Windows in Node.js 18 as well. There are caveats to keep in mind.Failed assertions now throw, meaning that any subsequent code is not executed. This also impacts the type definitions. #3246
Only native errors are now considered errors by the
t.throws()
andt.throwsAsync()
assertions.Object.create(Error.prototype)
is not a native error. #3229Changes to modules loaded through the
require
configuration #3184:@ava/typescript
if necessary.Improvements
Rewritten watcher
The watcher has been rewritten. It’s now built on
fs.watch()
in recursive mode.@vercel/nft
is used to perform static dependency analysis, supporting ESM and CJS imports for JavaScript & TypeScript source files. This is a huge improvement over the previous runtime tracking of CJS imports, which did not support ESM.Integration with
@ava/typescript
has been improved. The watcher can now detect a change to a TypeScript source file, then wait for the corresponding build output to change before re-running tests.The ignoredByWatcher configuration has moved to the watchMode object, under the ignoreChanges key.
See #3218 and #3257.
Failed assertions now throw
Assertions now throw a
TestFailure
error when they fail. This error is not exported or documented and should not be used or thrown manually. You cannot catch this error in order to recover from a failure, uset.try()
instead.All assertions except for
t.throws()
andt.throwsAsync()
now returntrue
when they pass. This is useful for some of the assertions in TypeScript where they can be used as a type guard.Committing a failed
t.try()
result now also throws.See #3246.
t.throws()
andt.throwsAsync()
can now expect any errorBy default, the thrown error (or rejection reason) must be a native error. You can change the assertion to expect any kind of error by setting
any: true
in the expectation object:See #3245 by @adiSuper94.
The
require
configuration is now more powerfulIt now loads ES modules.
Local files are loaded through
@ava/typescript
if necessary, so you can also write these in TypeScript.If there is a default export function, it is invoked after loading. The function is awaited so it can do asynchronous setup before further modules are loaded. Arguments from the configuration can be passed to the function (as a [structured clone](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone)).
See #3184 by @sculpt0r.
Other changes worth noting
t.timeout.clear()
to restore a previoust.timeout()
. #3221New Contributors
Full Changelog: avajs/ava@v5.3.1...v6.0.0
babel/babel-loader (babel-loader)
v10.0.0
Compare Source
What's Changed
Breaking Changes
^18.20.0 || ^20.10.0 || >=22.0.0
and webpack requirement to>= 5.61.0
by @JLHwung in https://github.com/babel/babel-loader/pull/1026New Features
Bug Fixes
Docs
cacheIdentifier
is computed from the merged options by @JLHwung in https://github.com/babel/babel-loader/pull/1000Dependencies
find-cache-dir
byfind-up
by @JLHwung in https://github.com/babel/babel-loader/pull/1031Internal
New Contributors
Full Changelog: babel/babel-loader@v9.1.3...v10.0.0
v9.2.1
Compare Source
What's Changed
Full Changelog: babel/babel-loader@v9.2.0...v9.2.1
v9.2.0
Compare Source
What's Changed
cacheIdentifier
is computed from the merged options by @JLHwung in https://github.com/babel/babel-loader/pull/1000Full Changelog: babel/babel-loader@v9.1.3...v9.2.0
webpack-contrib/css-loader (css-loader)
v7.1.2
Compare Source
v7.1.1
Compare Source
v7.1.0
Compare Source
Features
getJSON
option to output CSS modules mapping (#1577) (af834b4)v7.0.0
Compare Source
⚠ BREAKING CHANGES
modules.namedExport
option istrue
by default if you enable theesModule
optionMigration guide:
Before:
After:
To restore 6.x behavior, please use:
Typescript migration:
Before:
After:
modules.exportLocalsConvention
has the valueas-is
when themodules.namedExport
option istrue
and you don't specify a value5.27.0
18.12.0
Features
modules.namedExports
option works fine with anymodules.exportLocalsConvention
values (f96a110)modules.exportLocalsConvention
options (40e1668)v6.11.0
Compare Source
Features
Bug Fixes
@scope
at-rule without params (#1581) (e022e3b)typicode/husky (husky)
v9.1.7
Compare Source
What's Changed
New Contributors
Full Changelog: typicode/husky@v9.1.6...v9.1.7
v9.1.6
Compare Source
What's Changed
New Contributors
Full Changelog: typicode/husky@v9.1.5...v9.1.6
v9.1.5
Compare Source
What's Changed
pre-merge-commit
hook by @RainMeoCat in https://github.com/typicode/husky/pull/1497New Contributors
Full Changelog: typicode/husky@v9.1.4...v9.1.5
v9.1.4
Compare Source
v9.1.3
Compare Source
PATH
v9.1.2
Compare Source
Show a message instead of automatically removing deprecated code.
This only concerns projects that still have the following code in their hooks:
Hooks with these lines will fail in
v10.0.0
v9.1.1
Compare Source
Super saiyan
goddog! It's over 9.0.0!What's new
You can now run package commands directly, no need for
npx
or equivalents.It makes writing hooks more intuitive and is also slightly faster 🐺⚡️
A new recipe has been added to the docs. Lint staged files without external dependencies (inspired by Prettier docs). Feel free to modify it.
For more advanced use cases, see lint-staged.
Fixes
bunx husky init
commandDeprecations
#!/usr/bin/env sh
and. "$(dirname -- "$0")/_/husky.sh"
are deprecated.husky
command will automatically remove them, no action required.~/.huskyrc
please move it to.config/husky/init.sh
Support for these will be removed in v10.
Friendly reminder
If Git hooks don't fit your workflow, you can disable Husky globally. Just add
export HUSKY=0
to.config/husky/init.sh
.I've seen some confusion about this on X, so just a heads-up!
Sponsoring
Husky is downloaded over 45M times per month and used by ~1.5M projects. If your company wants to sponsor, you can do so here: GitHub Sponsors.
Have a nice summer ☀️ I'm open to new opportunities/consulting so feel free to drop me a message 😉
v9.1.0
Compare Source
v9.0.11
Compare Source
package-lock.json
by @btea in https://github.com/typicode/husky/pull/1383export HUSKY=0
in init (fixes #1393) by @typicode in https://github.com/typicode/husky/pull/1395v9.0.10
Compare Source
v9.0.9
Compare Source
v9.0.8
Compare Source
v9.0.7
Compare Source
~/.huskyrc
correctly (compatibility with v8)v9.0.6
Compare Source
v9.0.5
Compare Source
v9.0.4
Compare Source
v9.0.3
Compare Source
v9.0.2
Compare Source
v9.0.1
Compare Source
Kicking off the year with an exciting update!
Note: install using
husky@latest
to get the bug fixes that were released after.Introducing
husky init
v8
v9
Adding husky to a project is now easier than ever. It's just a single line that does the same as above. No need to read the docs to get started anymore.
Adding a New Hook
v8
v9
Adding a hook is as simple as creating a file. This can be accomplished using your favorite editor, a script or a basic
echo
command. For example, on Linux/macOS:Further Size Reduction
v8
was already the most compact Git hooks manager at approximately6kB
.v9
takes this a step further, reducing the size to just3kB
, likely making it the smallest devDependency in your toolkit.To give you an idea of how small it is, the biggest file in the project is the MIT license 😄
More to Come
Additional features are in the pipeline for
v9
. Stay tuned 🙌Other Changes
--provenance
for safer publishing.$XDG_CONFIG_HOME
support. Move~/.huskyrc
to~/.config/husky/init.sh
for centralized configuration.husky install
. Usehusky
orhusky some/dir
for the same functionality (deprecation notice to be added)..git
is missing; it now triggers a warning instead of failure.HUSKY_DEBUG=1
withHUSKY=2
for debugging.ESM
for module usage.How to Migrate
v9
is backward compatible withv8
, allowing you to freely upgrade and migrate your hooks later.Here are the steps to migrate:
package.json
.husky/pre-commit
Note:
sh
will be used to run hooks, even if a shebang is set.If you were using
husky
as a module:lint-staged/lint-staged (lint-staged)
v16.1.2
Compare Source
Patch Changes
#1570
a7c0c88
Thanks @ItsNickBarry! - When using--diff-filter
with theD
option to include deleted staged files, lint-staged no longer tries to stage the deleted files, unless they're no longer deleted. Previously this caused an error fromgit add
likefatal: pathspec 'deleted-file' did not match any files
.38f942e
Thanks @iiroj! - Removed an extraneous log entry that printedshouldHidePArtiallyStagedFiles
to console output.v16.1.1
Compare Source
Patch Changes
#1565
3686977
Thanks @iiroj! - Lint-staged now explicitly warns about potential data loss when using--no-stash
.#1571
02299a9
Thanks @iiroj! - Function tasks (introduced in v16.0.0) only received the staged files matching the conpmnfigured glob, instead of all staged files.#1563
bc61c74
Thanks @iiroj! - This version fixes incorrect behavior where unstaged changes were committed when using the--no-stash
option. This happened because--no-stash
implied--no-hide-partially-staged
, meaning unstaged changes to files which also had other staged changes were added to the commit by lint-staged; this is no longer the case.The previous (incorrect) behavior can still be achieved by using both options
--no-stash --no-hide-partially-staged
at the same time.v16.1.0
Compare Source
Minor Changes
#1536
e729daa
Thanks @iiroj! - A new flag--no-revert
has been introduced for when task modifications should be applied to the index before aborting the commit in case of errors. By default, lint-staged will clear all task modifications and revert to the original state.#1550
b27fa3f
Thanks @iiroj! - Lint-staged now ignores symlinks and leaves them out from the list of staged files.Patch Changes
c37dc38
Thanks @iiroj! - The minimum required Node.js version is lowered to20.17
following nano-spawn@1.0.2.v16.0.0
Compare Source
Major Changes
#1546
158d15c
Thanks @iiroj! - Processes are spawned using nano-spawn instead of execa. If you are using Node.js scripts as tasks, you might need to explicitly run them withnode
, especially when using Windows:#1546
158d15c
Thanks @iiroj! - The--shell
flag has been removed and lint-staged no longer supports evaluating commands directly via a shell. To migrate existing commands, you can create a shell script and invoke it instead. Lint-staged will pass matched staged files as a list of arguments, accessible via"$@​"
:v15.5.2
Compare Source
Patch Changes
5561321
Thanks @YimingIsCOLD! - Correctly handle colon (:
) characters in staged filenames.v15.5.1
Compare Source
Patch Changes
#1533
5d53534
Thanks @iiroj! - Improve listing of staged files so that lint-staged doesn't crash when encountering an uninitialized submodule. This should result in less errors like:v15.5.0
Compare Source
Minor Changes
630af5f
Thanks @iiroj! - Lint-staged no longer resets to the original state when preventing an empty git commit. This happens when your configured tasks reset all the staged changes, typically when trying to commit formatting changes which conflict with your linter setup like ESLint or Prettier.Example with Prettier
By default Prettier prefers double quotes.
Previously
file.js
with only double quotes"
changed to'
git commit -am "I don't like double quotes"
prettier --write file.js
, converting all the'
back to"
'
are stagedNow
file.js
with only double-quotes"
changed to'
git commit -am "I don't like double quotes"
prettier --write file.js
, converting all the'
back to"
v15.4.3
Compare Source
Patch Changes
cbfed1d
Thanks @tarik02! - Adjust TypeScript types for the default export so that it can be used as a value without error TS2693.v15.4.2
Compare Source
Patch Changes
8827ebf
Thanks @iiroj! - Change lint-staged's dependencies to use caret (^
) ranges instead of tilde (~
). This makes it easier for package managers to perform dependency management when minor-level updates are also permitted instead of just patch-level.v15.4.1
Compare Source
Patch Changes
#1504
1c7a45e
Thanks @iiroj! - Default TypeScript config filenames match JS equivalents.#1504
9cc18c9
Thanks @iiroj! - Add missing conditionConfiguration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.