Update dependencies; supported Node.js versions
* Remove Node.js 13 support * Denote Node.js 12.17 as the future minimal Node.js 12 version * Update dev dependencies * Upgrade XO * Update dependencies * Rebuild lockfile
This commit is contained in:
parent
27d2c6a31a
commit
f06c506d32
13 changed files with 405 additions and 526 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [^10.18.0, ^12.14.0, ^13.5.0, ^14.0.0]
|
||||
node-version: [^10.18.0, ^12.14.0, ^14.0.0]
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
|
|
|||
4
index.d.ts
vendored
4
index.d.ts
vendored
|
|
@ -130,7 +130,7 @@ export interface DeepEqualAssertion {
|
|||
|
||||
export interface LikeAssertion {
|
||||
/** Assert that `value` is like `selector`. */
|
||||
(value: any, selector: object, message?: string): void;
|
||||
(value: any, selector: Record<string, unknown>, message?: string): void;
|
||||
|
||||
/** Skip this assertion. */
|
||||
skip(value: any, selector: any, message?: string): void;
|
||||
|
|
@ -433,7 +433,7 @@ export interface CbExecutionContext<Context = unknown> extends ExecutionContext<
|
|||
end(error?: any): void;
|
||||
}
|
||||
|
||||
export type ImplementationResult = PromiseLike<void> | Subscribable | void;
|
||||
export type ImplementationResult = PromiseLike<void> | Subscribable | void; // eslint-disable-line @typescript-eslint/no-invalid-void-type
|
||||
export type Implementation<Context = unknown> = (t: ExecutionContext<Context>) => ImplementationResult;
|
||||
export type CbImplementation<Context = unknown> = (t: CbExecutionContext<Context>) => ImplementationResult;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ module.exports = (source, options = {}) => {
|
|||
let contents;
|
||||
try {
|
||||
contents = fs.readFileSync(file, 'utf8');
|
||||
} catch (_) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ function dumpError(error) {
|
|||
}
|
||||
|
||||
if (error.values.length > 0) {
|
||||
object.values = error.values.reduce((acc, value) => {
|
||||
object.values = error.values.reduce((acc, value) => { // eslint-disable-line unicorn/no-reduce
|
||||
acc[value.label] = stripAnsi(value.formatted);
|
||||
return acc;
|
||||
}, {});
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ class Runner extends Emittery {
|
|||
};
|
||||
|
||||
let waitForSerial = Promise.resolve();
|
||||
await runnables.reduce((previous, runnable) => {
|
||||
await runnables.reduce((previous, runnable) => { // eslint-disable-line unicorn/no-reduce
|
||||
if (runnable.metadata.serial || this.serial) {
|
||||
waitForSerial = previous.then(() => {
|
||||
// Serial runnables run as long as there was no previous failure, unless
|
||||
|
|
@ -451,7 +451,7 @@ class Runner extends Emittery {
|
|||
return false;
|
||||
}
|
||||
|
||||
return serialTests.reduce(async (previous, task) => {
|
||||
return serialTests.reduce(async (previous, task) => { // eslint-disable-line unicorn/no-reduce
|
||||
const previousOk = await previous;
|
||||
// Don't start tests after an interrupt.
|
||||
if (this.interrupted) {
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ ipc.options.then(async options => {
|
|||
if (Reflect.has(mod, Symbol.for('esm:package'))) {
|
||||
requireFn = mod(module);
|
||||
}
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
// Install dependency tracker after the require configuration has been evaluated
|
||||
|
|
|
|||
882
package-lock.json
generated
882
package-lock.json
generated
File diff suppressed because it is too large
Load diff
20
package.json
20
package.json
|
|
@ -7,7 +7,7 @@
|
|||
"homepage": "https://avajs.dev",
|
||||
"bin": "cli.js",
|
||||
"engines": {
|
||||
"node": ">=10.18.0 <11 || >=12.14.0 <12.16.0 || >=12.16.0 <13 || >=13.5.0 <14 || >=14.0.0"
|
||||
"node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && tsd && c8 --report=none tap && c8 --report=none --no-clean test-ava && c8 report"
|
||||
|
|
@ -56,13 +56,13 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"@concordance/react": "^2.0.0",
|
||||
"acorn": "^7.2.0",
|
||||
"acorn": "^7.3.1",
|
||||
"acorn-walk": "^7.1.1",
|
||||
"ansi-styles": "^4.2.1",
|
||||
"arrgv": "^1.0.2",
|
||||
"arrify": "^2.0.1",
|
||||
"callsites": "^3.1.0",
|
||||
"chalk": "^4.0.0",
|
||||
"chalk": "^4.1.0",
|
||||
"chokidar": "^3.4.0",
|
||||
"chunkd": "^2.0.1",
|
||||
"ci-info": "^2.0.0",
|
||||
|
|
@ -80,8 +80,8 @@
|
|||
"emittery": "^0.7.0",
|
||||
"equal-length": "^1.0.0",
|
||||
"figures": "^3.2.0",
|
||||
"globby": "^11.0.0",
|
||||
"ignore-by-default": "^1.0.0",
|
||||
"globby": "^11.0.1",
|
||||
"ignore-by-default": "^2.0.0",
|
||||
"import-local": "^3.0.2",
|
||||
"indent-string": "^4.0.0",
|
||||
"is-error": "^2.2.2",
|
||||
|
|
@ -114,15 +114,15 @@
|
|||
"devDependencies": {
|
||||
"@ava/babel": "^1.0.1",
|
||||
"@ava/test": "github:avajs/test",
|
||||
"@babel/plugin-proposal-do-expressions": "^7.8.3",
|
||||
"@babel/plugin-proposal-do-expressions": "^7.10.1",
|
||||
"@sinonjs/fake-timers": "^6.0.1",
|
||||
"ansi-escapes": "^4.3.1",
|
||||
"c8": "^7.1.2",
|
||||
"c8": "^7.2.0",
|
||||
"delay": "^4.3.0",
|
||||
"esm": "^3.2.25",
|
||||
"execa": "^4.0.2",
|
||||
"get-stream": "^5.1.0",
|
||||
"p-event": "^4.1.0",
|
||||
"p-event": "^4.2.0",
|
||||
"proxyquire": "^2.1.3",
|
||||
"react": "^16.13.1",
|
||||
"react-test-renderer": "^16.13.1",
|
||||
|
|
@ -134,8 +134,8 @@
|
|||
"tempy": "^0.5.0",
|
||||
"touch": "^3.1.0",
|
||||
"tsd": "^0.11.0",
|
||||
"typescript": "^3.9.3",
|
||||
"xo": "^0.30.0",
|
||||
"typescript": "^3.9.5",
|
||||
"xo": "^0.32.0",
|
||||
"zen-observable": "^0.8.15"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const test = require('../../..');
|
|||
test('test', t => {
|
||||
try {
|
||||
t.throws(throwSync());
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
function throwSync() {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ exports.assert = (t, logFile, buffer) => {
|
|||
let existing = null;
|
||||
try {
|
||||
existing = fs.readFileSync(logFile);
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
|
||||
if (existing === null || process.env.UPDATE_REPORTER_LOG) {
|
||||
fs.writeFileSync(logFile, buffer);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class TTYStream extends stream.Writable {
|
|||
this.spinnerActivity = [];
|
||||
}
|
||||
|
||||
const string = this.sanitizers.reduce((string_, sanitizer) => sanitizer(string_), chunk.toString('utf8'));
|
||||
const string = this.sanitizers.reduce((string_, sanitizer) => sanitizer(string_), chunk.toString('utf8')); // eslint-disable-line unicorn/no-reduce
|
||||
// Ignore the chunk if it was scrubbed completely. Still count 0-length
|
||||
// chunks.
|
||||
if (string !== '' || chunk.length === 0) {
|
||||
|
|
@ -40,7 +40,7 @@ class TTYStream extends stream.Writable {
|
|||
}
|
||||
|
||||
for (const object of chunks) {
|
||||
this.chunks.push(Buffer.from(this.sanitizers.reduce((string, sanitizer) => sanitizer(string), object.chunk.toString('utf8')), 'utf8'));
|
||||
this.chunks.push(Buffer.from(this.sanitizers.reduce((string, sanitizer) => sanitizer(string), object.chunk.toString('utf8')), 'utf8')); // eslint-disable-line unicorn/no-reduce
|
||||
}
|
||||
|
||||
this.chunks.push(TTYStream.SEPARATOR);
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ test('snapshots infer their location and name from sourcemaps', t => {
|
|||
path.join(snapPath, 'test.ts.snap')
|
||||
];
|
||||
})
|
||||
.reduce((a, b) => a.concat(b), []);
|
||||
.reduce((a, b) => a.concat(b), []); // eslint-disable-line unicorn/no-reduce
|
||||
const removeExistingSnapFixtureFiles = snapPath => {
|
||||
try {
|
||||
fs.unlinkSync(snapPath);
|
||||
|
|
@ -186,7 +186,7 @@ test('snapshots resolved location from "snapshotDir" in AVA config', t => {
|
|||
path.join(snapPath, 'test.js.snap')
|
||||
];
|
||||
})
|
||||
.reduce((a, b) => a.concat(b), []);
|
||||
.reduce((a, b) => a.concat(b), []); // eslint-disable-line unicorn/no-reduce
|
||||
const removeExistingSnapFixtureFiles = snapPath => {
|
||||
try {
|
||||
fs.unlinkSync(snapPath);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ module.exports = {
|
|||
'test-tap/fixture/report/edgecases/ast-syntax-error.js'
|
||||
],
|
||||
rules: {
|
||||
'import/no-anonymous-default-export': 'off',
|
||||
'import/no-unresolved': ['error', {commonjs: true}],
|
||||
'no-use-extend-native/no-use-extend-native': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off'
|
||||
|
|
|
|||
Loading…
Reference in a new issue