Skip to content

build(deps): update dependency ava to v8 (main) - #128

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/main-ava-8.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/main-ava-8.x

Conversation

@renovate

@renovate renovate Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ava (source) 6.4.0 → 8.6.0 age adoption passing confidence

Release Notes

avajs/ava (ava)

v8.6.0

Compare Source

Support setup-function teardowns and disposable resources

By @​novemberborn in #​3524

Extends t.teardown() to accept (async) disposables.

Allows t.teardown() to be used in before and beforeEach setup functions. The teardowns are invoked after the corresponding test postconditions, including .always variants.

For these teardowns, the execution context t of the setup function is rebound to the teardown invocation. This means assertions, logs, plans and timeouts affect the teardown rather than the completed setup function.

after and afterEach are now presented as postconditions. Any resources created during setup (before and beforeEach) should be cleaned up using a teardown, not a postcondition.

import {once} from 'node:events';
import {createServer} from 'node:http';
import test from 'ava';

test.beforeEach(async t => {
  let requests = 0;
  const server = createServer((request, response) => {
    requests++;
    response.end('Hello!');
  });

  t.teardown(server); // Closes the server via Symbol.asyncDispose.
  await once(server.listen(0, '127.0.0.1'), 'listening');

  t.context = {server, getRequests: () => requests};
});

test('responds to a request', async t => {
  const {port} = t.context.server.address();
  const response = await fetch(`http://127.0.0.1:${port}`);

  t.is(await response.text(), 'Hello!');
});

test.afterEach('handled one request', t => {
  t.is(t.context.getRequests(), 1); // The server is still available here.
});

And a teardown using t:

test.beforeEach(async t => {
  let requests = 0;
  const server = createServer((request, response) => {
    requests++;
    response.end('Hello!');
  });

  t.teardown(async () => {
    await server[Symbol.asyncDispose]();
    t.log('closed server'); // Logged under the teardown.
  });
  await once(server.listen(0, '127.0.0.1'), 'listening');

  t.context = {server, getRequests: () => requests};
});

The HookSkipFn is deprecated in favor of LifecycleSkipFn.

Other Changes

Full Changelog: avajs/ava@v8.5.0...v8.6.0

v8.5.0

Compare Source

What's Changed

  • Handle worker thread arguments that Node.js rejects by @​novemberborn in #​3517

    • Add explicitlyForwardNodeArguments configuration

      Worker threads reject certain arguments (such as --title) when they are passed explicitly via execArgv, even if the parent process was started with them. AVA prepends process.execArgv to the arguments it passes to workers, which triggers ERR_WORKER_INVALID_EXEC_ARGV.

      Setting explicitlyForwardNodeArguments to false stops AVA from prepending process.execArgv. The option defaults to true and is intended to be removed in the next major release, when AVA will stop explicitly forwarding the arguments.

    • Deprecate filterNodeArgumentsForWorkerThreads

      The filterNodeArgumentsForWorkerThreads option will be removed in the next major release. Instead compute nodeArguments from process.execArgv in a config file. You can do this today by setting explicitlyForwardNodeArguments to false.

  • Run TAP reporter in a worker thread, in preparation for moving it out of AVA itself, by @​novemberborn in #​3521

Full Changelog: avajs/ava@v8.4.0...v8.5.0

v8.4.0

Compare Source

What's Changed

New Contributors

Full Changelog: avajs/ava@v8.3.0...v8.4.0

v8.3.0

Compare Source

What's Changed

New Contributors

Full Changelog: avajs/ava@v8.2.0...v8.3.0

v8.2.0

Compare Source

What's Changed

New Contributors

Full Changelog: avajs/ava@v8.1.2...v8.2.0

v8.1.2

Compare Source

This is a patch release to fix some npm metadata.

What's Changed

Full Changelog: avajs/ava@v8.1.1...v8.1.2

v8.1.1

Compare Source

This is a patch release to fix some npm metadata. I've included a wider dependency update, but there's no changed functionality.

What's Changed

Full Changelog: avajs/ava@v8.1.0...v8.1.1

v8.1.0

Compare Source

Code block formatting for string snapshots

This release adds an overload for t.snapshot():

t.snapshot(expected, {formatAsCodeBlock}, message?)

The overload is only accepted when expected is a string. The string is stored verbatim and rendered as a fenced code block in the resulting .snap.md file. Set formatAsCodeBlock to true for a generic code block, or a non-empty language identifier string for syntax highlighting:

test('generates code', t => {
	const code = generate();
	t.snapshot(code, {formatAsCodeBlock: 'js'});
});

The resulting snapshots can only be read with AVA 8.1 or newer, but snapshots that do not contain code blocks are backwards compatible. And existing snapshots can still be read, of course.

Performance improvements

  • ~40% faster for many small test files (startup-bound)
  • ~30% faster for a single file with thousands of tests
  • ~50% faster for many files run concurrently

What's Changed

Full Changelog: avajs/ava@v8.0.2...v8.1.0

v8.0.2

Compare Source

This is a patch release to get CI green again. More goodies are coming.

What's Changed

Full Changelog: avajs/ava@v8.0.1...v8.0.2

v8.0.1

Compare Source

What's Changed

This release officially adds Node.js 26 support, with thanks to @​novemberborn in #​3450.

Per our policy, support for Node.js 25 has been removed.

Full Changelog: avajs/ava@v8.0.0...v8.0.1

v8.0.0

Compare Source

Breaking Changes

AVA now expects Node.js 22.20, 24.12 or newer.

Internally AVA is now fully ESM. This is possible now that Node.js supports loading ES modules using require() calls and simplifies AVA's types and internals.

If you use AVA from a CommonJS project you'll have to update your imports:

-const test = require('ava');
+const {default: test} = require('ava');

We expect an increasing number of projects to be ESM only. As per the above, CommonJS is still supported, but we don't expect cjs extensions to be used. The default file extensions are now js and mjs. Specify extensions: ['cjs', 'js', 'mjs'] for AVA to run test files with the cjs extension.

All test files (and those loaded through AVA's require config) are now loaded via import(). Use customization hooks for transpilation. The object form of the extensions configuration is no longer supported.

If you use AVA with @​ava/typescript you must upgrade that package to v7.

New Features

There's two new test modifiers courtesy of @​sindresorhus: test.skipIf() to skip a test based on a runtime condition. test.runIf() is the inverse: the test only runs when the condition is true.

test.skipIf(process.platform === 'win32')('not on Windows', t => {
	t.pass();
});

test.runIf(process.platform === 'linux')('Linux only', t => {
	t.pass();
});

These work with other modifiers like .serial and .failing:

test.serial.skipIf(process.platform === 'win32')('serial, not on Windows', t => {
	t.pass();
});

test.failing.skipIf(process.platform === 'win32')('expected failure, not on Windows', t => {
	t.fail();
});

Other Changes

  • Watch mode now ignores changes to *.tsbuildinfo files
  • TAP reporter is more defensive when restoring the original error name, thanks to @​ninper00 in #​3415
  • Reported errors when throwsAsync/notThrowsAsync are not awaited have been improved by @​sindresorhus in #​3436

New Contributors

Full Changelog: avajs/ava@v7.0.0...v8.0.0

v7.0.0

Compare Source

What's Changed

  • Replace strip-ansi with node:util.stripVTControlCharacters by @​fisker in #​3403
  • Remove support for Node.js 18 and 23; require 20.19 or newer, 22.20 or newer or 24,12 or newer; update dependencies including transitive glob by @​novemberborn in #​3416

Full Changelog: avajs/ava@v6.4.1...v7.0.0

v6.4.1

Compare Source

What's Changed

New Contributors

Full Changelog: avajs/ava@v6.4.0...v6.4.1


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from 6da2c7c to 1039472 Compare July 16, 2026 18:55
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from b32ef9b to c50e2ee Compare July 24, 2026 22:52
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch from c50e2ee to 653fc84 Compare July 30, 2026 19:21
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from 8e13071 to caf04d4 Compare August 14, 2026 21:35
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch from caf04d4 to 9ed598c Compare August 26, 2026 23:03
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from c636ebc to 31a0cd6 Compare September 9, 2026 15:46
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch from 31a0cd6 to 8586026 Compare September 15, 2026 09:50
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from aed949a to 3010c29 Compare September 30, 2026 21:47
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch from 3010c29 to 624f7a7 Compare October 5, 2026 19:51
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 3 times, most recently from ce7a331 to 36b80e5 Compare October 18, 2026 22:17
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 4 times, most recently from 4b42018 to 013a892 Compare October 26, 2026 19:32
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from 5792d85 to 047264f Compare October 31, 2026 22:46
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 3 times, most recently from 31f6079 to 3a9c640 Compare November 11, 2026 16:03
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from ffdb6e0 to 648392a Compare November 21, 2026 01:47
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch 2 times, most recently from dbd3151 to fb295dc Compare November 25, 2026 22:53
@renovate
renovate Bot force-pushed the renovate/main-ava-8.x branch from fb295dc to 69a3556 Compare November 29, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants