Skip to content

Commit 02f626f

Browse files
authored
Update dependencies
Exclude Acorn stack traces from reporter logs. Export types not interfaces.
1 parent 14061be commit 02f626f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+958
-906
lines changed

.xo-config.cjs

+8-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ module.exports = {
6464
files: 'test/**',
6565
rules: {
6666
'import/no-anonymous-default-export': 'off',
67-
'node/prefer-global/process': 'off',
67+
'n/prefer-global/process': 'off',
68+
},
69+
},
70+
{
71+
files: 'test/**/fixtures/**',
72+
rules: {
73+
'n/file-extension-in-import': 'off',
6874
},
6975
},
7076
{
@@ -79,7 +85,7 @@ module.exports = {
7985
files: 'test-tap/**',
8086
rules: {
8187
'import/no-anonymous-default-export': 'off',
82-
'node/prefer-global/process': 'off',
88+
'n/prefer-global/process': 'off',
8389
'unicorn/error-message': 'off',
8490
},
8591
},

entrypoints/plugin.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {URL} from 'node:url';
1+
import type {URL} from 'node:url';
22

33
export namespace SharedWorker {
44
export type ProtocolIdentifier = 'ava-4';

lib/cli.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import process from 'node:process';
55

66
import arrify from 'arrify';
77
import ciParallelVars from 'ci-parallel-vars';
8-
import del from 'del';
8+
import {deleteAsync} from 'del';
99
import figures from 'figures';
1010
import yargs from 'yargs';
11-
import {hideBin} from 'yargs/helpers'; // eslint-disable-line node/file-extension-in-import
11+
import {hideBin} from 'yargs/helpers'; // eslint-disable-line n/file-extension-in-import
1212

1313
import Api from './api.js';
1414
import {chalk} from './chalk.js';
@@ -124,7 +124,7 @@ export default async function loadCli() { // eslint-disable-line complexity
124124
// run AVA with the debug command, though it's allowed.
125125
let activeInspector = false;
126126
try {
127-
const {default: inspector} = await import('node:inspector'); // eslint-disable-line node/no-unsupported-features/es-syntax
127+
const {default: inspector} = await import('node:inspector');
128128

129129
activeInspector = inspector.url() !== undefined;
130130
} catch {}
@@ -242,11 +242,11 @@ export default async function loadCli() { // eslint-disable-line complexity
242242

243243
const chalkOptions = {level: 0};
244244
if (combined.color !== false) {
245-
const {supportsColor: {level}} = await import('chalk'); // eslint-disable-line node/no-unsupported-features/es-syntax, unicorn/import-style
245+
const {supportsColor: {level}} = await import('chalk'); // eslint-disable-line unicorn/import-style
246246
chalkOptions.level = level;
247247
}
248248

249-
const {set: setChalk} = await import('./chalk.js'); // eslint-disable-line node/no-unsupported-features/es-syntax
249+
const {set: setChalk} = await import('./chalk.js');
250250
setChalk(chalkOptions);
251251

252252
if (confError) {
@@ -262,7 +262,7 @@ export default async function loadCli() { // eslint-disable-line complexity
262262
const cacheDir = path.join(projectDir, 'node_modules', '.cache', 'ava');
263263

264264
try {
265-
const deletedFilePaths = await del('*', {cwd: cacheDir});
265+
const deletedFilePaths = await deleteAsync('*', {cwd: cacheDir});
266266

267267
if (deletedFilePaths.length === 0) {
268268
console.log(`\n${chalk.green(figures.tick)} No cache files to remove`);

lib/load-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const MISSING_DEFAULT_EXPORT = Symbol('missing default export');
1111
const EXPERIMENTS = new Set();
1212

1313
const importConfig = async ({configFile, fileForErrorMessage}) => {
14-
const {default: config = MISSING_DEFAULT_EXPORT} = await import(url.pathToFileURL(configFile)); // eslint-disable-line node/no-unsupported-features/es-syntax
14+
const {default: config = MISSING_DEFAULT_EXPORT} = await import(url.pathToFileURL(configFile));
1515
if (config === MISSING_DEFAULT_EXPORT) {
1616
throw new Error(`${fileForErrorMessage} must have a default export`);
1717
}

lib/plugin-support/shared-worker-loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function broadcastMessage(data) {
156156
}
157157

158158
async function loadFactory() {
159-
const {default: factory} = await import(workerData.filename); // eslint-disable-line node/no-unsupported-features/es-syntax
159+
const {default: factory} = await import(workerData.filename);
160160
return factory;
161161
}
162162

lib/provider-manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const levelsByProtocol = {
1515

1616
async function load(providerModule, projectDir) {
1717
const ava = {version: pkg.version};
18-
const {default: makeProvider} = await import(providerModule); // eslint-disable-line node/no-unsupported-features/es-syntax
18+
const {default: makeProvider} = await import(providerModule);
1919

2020
let fatal;
2121
let level;

lib/worker/base.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const run = async options => {
141141

142142
for (const extension of extensionsToLoadAsModules) {
143143
if (ref.endsWith(`.${extension}`)) {
144-
return import(pathToFileURL(ref)); // eslint-disable-line node/no-unsupported-features/es-syntax
144+
return import(pathToFileURL(ref));
145145
}
146146
}
147147

@@ -161,7 +161,7 @@ const run = async options => {
161161
if (options.debug && options.debug.port !== undefined && options.debug.host !== undefined) {
162162
// If an inspector was active when the main process started, and is
163163
// already active for the worker process, do not open a new one.
164-
const {default: inspector} = await import('node:inspector'); // eslint-disable-line node/no-unsupported-features/es-syntax
164+
const {default: inspector} = await import('node:inspector');
165165
if (!options.debug.active || inspector.url() === undefined) {
166166
inspector.open(options.debug.port, options.debug.host, true);
167167
}

lib/worker/channel.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let pEvent = async (emitter, event, options) => {
1515
emitter.on(event, addToBuffer);
1616

1717
try {
18-
({pEvent} = await import('p-event')); // eslint-disable-line node/no-unsupported-features/es-syntax
18+
({pEvent} = await import('p-event'));
1919
} finally {
2020
emitter.off(event, addToBuffer);
2121
}

0 commit comments

Comments
 (0)