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.18.9
10.0.20
->17.0.4
v3
->v5
v3
->v5
5.3.1
->6.4.1
9.1.3
->10.0.0
7.0.3
->10.1.0
6.10.0
->7.1.2
8.0.3
->9.1.7
26.1.0
->27.0.0
14.0.1
->16.2.3
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)
v5
Compare Source
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)
v5
Compare Source
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 🚀 #3372
As part of this work we've removed the "sticky"
.only()
behavior #3381Examples
We've been remiss in merging #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 #3377New Contributors
Full Changelog: avajs/ava@v6.2.0...v6.3.0
v6.2.0
Compare Source
What's Changed
filterNodeArgumentsForWorkerThreads
option in #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 #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 #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 #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 #3287
Fix
ava/internal
ESM type module by @codetheweb in #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 #1026New Features
Bug Fixes
Docs
cacheIdentifier
is computed from the merged options by @JLHwung in #1000Dependencies
find-cache-dir
byfind-up
by @JLHwung in #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 #1000Full Changelog: babel/babel-loader@v9.1.3...v9.2.0
kentcdodds/cross-env (cross-env)
v10.1.0
Compare Source
Features
For example:
If
PORT
is already set, use that value, otherwise fallback to8787
.Learn more about Shell Parameter Expansion
v10.0.0
Compare Source
TL;DR: You should probably not have to change anything if:
In this release (which should have been v8 except I had some issues with automated releases 🙈), I've updated all the things and modernized the package. This happened in #261
Was this needed? Not really, but I just thought it'd be fun to modernize this package.
Here's the highlights of what was done.
The tool maintains its original functionality while being completely modernized with the latest tooling and best practices
BREAKING CHANGES
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 #1383export HUSKY=0
in init (fixes #1393) by @typicode in #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:jsdom/jsdom (jsdom)
v27.0.0
Compare Source
Changes since 26.1.0
BeforeUnloadEvent
,BlobEvent
,DeviceMotionEvent
(omittingrequestPermission()
),DeviceOrientationEvent
(omittingrequestPermission()
),PointerEvent
,PromiseRejectionEvent
, andTransitionEvent
.movementX
andmovementY
toMouseEvent
. (These are from the Pointer Lock specification, the rest of which is not implemented.)customElements.getName()
. (mash-graz)"jsdomError"
events are now documented, with specifictype
properties and other properties that depend on the type.sendTo()
was renamed toforwardTo()
.jsdomErrors
option toforwardTo()
can be used to control which errors are sent to the Node.js console. This replaces the previousomitJSDOMErrors
boolean option."jsdomError"
s for failedXMLHttpRequest
fetches are no longer emitted."jsdomError"
s to the Node.js console are streamlined.nwsapi
to@asamuzakjp/dom-selector
, closing over 20 selector-related bugs.tough-cookie
, which now considers URLs likehttp://localhost/
to be secure contexts (per the spec), and thus will returnSecure
-flagged cookies for such URLs. (colincasey)cssstyle
, which brings along many improvements and fixes to theCSSStyleDeclaration
object and its properties.element.click()
to fire aPointerEvent
instead of aMouseEvent
.<input>
element'spattern=""
attribute to use thev
regular expression flag, instead ofu
.Window
object, including named properties and changing various data properties to accessor properties.document.createEvent()
to accept a more correct set of event names.ElementInternals
accessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.)Object.defineProperty()
on certain objects, such asHTMLSelectElement
instances.jsdom.reconfigure({ url })
not updatingdocument.baseURI
or properties derived from it. (This regressed in v26.1.0.)initial
,inherit
, andunset
keywords, to resolve correctly. (asamuzaK)display
style resolution. (asamuzaK)Changes since 27.0.0-beta.3
cssstyle
, which brings along various CSS parsing fixes.lint-staged/lint-staged (lint-staged)
v16.2.3
Compare Source
Patch Changes
27cd541
Thanks @iiroj! - When using--fail-on-changes
, automatically hidden (partially) unstaged changes are no longer counted to make lint-staged fail.v16.2.2
Compare Source
Patch Changes
#1667
699f95d
Thanks @iiroj! - The backup stash will not be dropped when using--fail-on-changes
and there are errors. When reverting to original state is disabled (via--no-revert
or--fail-on-changes
), hidden (partially) unstaged changes are still restored automatically so that it's easier to resolve the situation manually.Additionally, the example for using the backup stash manually now uses the correct backup hash, if available:
v16.2.1
Compare Source
Patch Changes
#1664
8277b3b
Thanks @iiroj! - The built-in TypeScript types have been updated to more closely match the implementation. Notably, the list of staged files supplied to task functions isreadonly string[]
and can't be mutated. Thanks @outslept!#1654
70b9af3
Thanks @iiroj! - This version has been published from GitHub Actions using Trusted Publishing for npm packages.#1659
4996817
Thanks @iiroj! - Fix searching configuration files when the working directory is a subdirectory of a git repository, and there arepackage.json
files in the working directory. This situation might happen when running lint-staged for a single package in a monorepo.#1654
7021f0a
Thanks @iiroj! - Return the caret semver range (^
) to direct dependencies so that future patch and minor versions are allowed. This enables projects to better mConfiguration
📅 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.