Skip to content

Commit

Permalink
Update dependencies; supported Node.js versions
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
novemberborn committed Jun 14, 2020
1 parent 27d2c6a commit f06c506
Show file tree
Hide file tree
Showing 13 changed files with 407 additions and 528 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions index.d.ts
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/code-excerpt.js
Expand Up @@ -19,7 +19,7 @@ module.exports = (source, options = {}) => {
let contents;
try {
contents = fs.readFileSync(file, 'utf8');
} catch (_) {
} catch {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/reporters/tap.js
Expand Up @@ -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;
}, {});
Expand Down
4 changes: 2 additions & 2 deletions lib/runner.js
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/worker/subprocess.js
Expand Up @@ -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
Expand Down
886 changes: 382 additions & 504 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion test-tap/fixture/improper-t-throws/caught.js
Expand Up @@ -3,7 +3,7 @@ const test = require('../../..');
test('test', t => {
try {
t.throws(throwSync());
} catch (_) {}
} catch {}
});

function throwSync() {
Expand Down
2 changes: 1 addition & 1 deletion test-tap/helper/report.js
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test-tap/helper/tty-stream.js
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test-tap/integration/snapshots.js
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions xo.config.js
Expand Up @@ -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'
Expand Down

0 comments on commit f06c506

Please sign in to comment.