Skip to content

Commit

Permalink
Upgrade: Bump ava from 3.15.0 to 4.0.1
Browse files Browse the repository at this point in the history
Bumps [ava](https://github.com/avajs/ava) from 3.15.0 to 4.0.1.
- [Release notes](https://github.com/avajs/ava/releases)
- [Commits](avajs/ava@v3.15.0...v4.0.1)

---
updated-dependencies:
- dependency-name: ava
  dependency-type: direct:production
  update-type: version-update:semver-major
...

* Fix types and handle renames
* Disable worker threads to support canvas

- - - - - - - - - - - - - - - - - - - -

Close #5001

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony Ross <[email protected]>
Co-authored-by: Jack Lynch <[email protected]>
  • Loading branch information
3 people committed Mar 3, 2022
1 parent 81f5e3d commit 682dd7e
Show file tree
Hide file tree
Showing 135 changed files with 718 additions and 495 deletions.
5 changes: 3 additions & 2 deletions packages/connector-jsdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"dependencies": {
"@hint/utils": "^7.0.13",
Expand All @@ -28,7 +29,7 @@
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/connector-jsdom/tests/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as path from 'path';
import { URL } from 'url';

import * as sinon from 'sinon';
import anyTest, { TestInterface, ExecutionContext } from 'ava';
import anyTest, { TestFn, ExecutionContext } from 'ava';

import { generateHTMLPage, ServerConfiguration, Server } from '@hint/utils-create-server';
import { Engine, Events, IConnector, IConnectorConstructor } from 'hint';
Expand All @@ -20,7 +20,7 @@ type CollectContext = {
engineEmitAsyncSpy: sinon.SinonSpy<any, any>;
};

const test = anyTest as TestInterface<CollectContext>;
const test = anyTest as TestFn<CollectContext>;

test.beforeEach((t) => {
const engine: Engine<Events> = {
Expand Down
5 changes: 3 additions & 2 deletions packages/connector-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"dependencies": {
"@hint/utils": "^7.0.13",
Expand All @@ -27,7 +28,7 @@
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/connector-local/tests/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Stream } from 'stream';

import * as Chokidar from 'chokidar';
import * as sinon from 'sinon';
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';
import * as proxyquire from 'proxyquire';
import { EventEmitter2 } from 'eventemitter2';

Expand All @@ -20,7 +20,7 @@ type SandboxContext = {
sandbox: sinon.SinonSandbox;
};

const test = anyTest as TestInterface<SandboxContext>;
const test = anyTest as TestFn<SandboxContext>;

const mockContext = (context: SandboxContext) => {
const engine = new EventEmitter2({
Expand Down
5 changes: 3 additions & 2 deletions packages/connector-puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"dependencies": {
"@hint/utils": "^7.0.13",
Expand All @@ -32,7 +33,7 @@
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
12 changes: 6 additions & 6 deletions packages/connector-puppeteer/tests/chromium-finder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import anyTest, { TestInterface, ExecutionContext } from 'ava';
import anyTest, { TestFn, ExecutionContext } from 'ava';
import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
import * as fsUtils from '@hint/utils-fs';
Expand Down Expand Up @@ -55,7 +55,7 @@ const loadDependency = (context: ChromiumFinderContext) => {
});
};

const test = anyTest as TestInterface<ChromiumFinderContext>;
const test = anyTest as TestFn<ChromiumFinderContext>;

test.beforeEach(initContext);

Expand Down Expand Up @@ -123,7 +123,7 @@ test(`Invalid custom path throws an exception`, (t) => {
chromiumFinder.getInstallationPath({ browserPath: 'invalid' });
});

t.is(error.message, 'The provided path is not accessible: "invalid"', `Error message is not the expected one`);
t.is(error?.message, 'The provided path is not accessible: "invalid"', `Error message is not the expected one`);
});

test(`Searches with the right priorities and throws an exception when nothing is found`, (t) => {
Expand Down Expand Up @@ -195,7 +195,7 @@ test(`(Linux) Does not have any information for Edge`, (t) => {
chromiumFinder.getInstallationPath({ browser: 'Edge' });
});

t.is(error.message, 'The provided browser ("Edge") is not supported in this platform');
t.is(error?.message, 'The provided browser ("Edge") is not supported in this platform');
});

test(`Unsupported platform throws an Error`, (t) => {
Expand All @@ -211,7 +211,7 @@ test(`Unsupported platform throws an Error`, (t) => {
chromiumFinder.getInstallationPath({ browser: 'Chrome' });
});

t.is(error.message, `Unsupported platform: "unsupported"`);
t.is(error?.message, `Unsupported platform: "unsupported"`);
});

test(`No installation found throws an Error`, (t) => {
Expand All @@ -221,5 +221,5 @@ test(`No installation found throws an Error`, (t) => {
chromiumFinder.getInstallationPath();
});

t.is(error.message, 'No installation found for: "Any supported browsers"');
t.is(error?.message, 'No installation found for: "Any supported browsers"');
});
4 changes: 2 additions & 2 deletions packages/connector-puppeteer/tests/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as path from 'path';
import { URL } from 'url';

import * as sinon from 'sinon';
import anyTest, { TestInterface, ExecutionContext } from 'ava';
import anyTest, { TestFn, ExecutionContext } from 'ava';

import { generateHTMLPage, Server, ServerConfiguration } from '@hint/utils-create-server';
import { Engine, Events, IConnectorConstructor } from 'hint';
Expand All @@ -20,7 +20,7 @@ type CollectContext = {
engineEmitAsyncSpy: sinon.SinonSpy<any, any>;
};

const test = anyTest as TestInterface<CollectContext>;
const test = anyTest as TestFn<CollectContext>;

test.beforeEach((t) => {
const engine: Engine<Events> = {
Expand Down
4 changes: 2 additions & 2 deletions packages/connector-puppeteer/tests/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as sinon from 'sinon';
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';
import { Engine, Events } from 'hint';

import { LifecycleLaunchOptions } from '../src/lib/lifecycle';
Expand All @@ -15,7 +15,7 @@ type ConfigurationContext = {
launch: sinon.SinonSpy<[LifecycleLaunchOptions], never>;
};

const test = anyTest as TestInterface<SandboxContext>;
const test = anyTest as TestFn<SandboxContext>;

const mockContext = (context: SandboxContext): ConfigurationContext => {

Expand Down
4 changes: 2 additions & 2 deletions packages/connector-puppeteer/tests/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { URL } from 'url';

import groupBy = require('lodash/groupBy');
import * as sinon from 'sinon';
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';
import { Server } from '@hint/utils-create-server';
import { Engine, Events, IConnector } from 'hint';

Expand All @@ -25,7 +25,7 @@ type EventsContext = {
engineEmitAsyncSpy: sinon.SinonSpy<any, any>;
};

const test = anyTest as TestInterface<EventsContext>;
const test = anyTest as TestFn<EventsContext>;

const name = 'puppeteer';

Expand Down
5 changes: 3 additions & 2 deletions packages/create-hint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"bin": {
"create-hint": "./dist/src/create-hint.js"
Expand All @@ -26,7 +27,7 @@
"@types/node": "^17.0.14",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^10.0.11",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-hint/tests/create-hint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';

import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
import anyTest, { TestInterface, ExecutionContext } from 'ava';
import anyTest, { TestFn, ExecutionContext } from 'ava';

import * as utilsFs from '@hint/utils-fs';

Expand Down Expand Up @@ -38,7 +38,7 @@ type CreateHintContext = {
writeFileAsyncModule: WriteFileAsyncModule;
}

const test = anyTest as TestInterface<CreateHintContext>;
const test = anyTest as TestFn<CreateHintContext>;

const initContext = (t: ExecutionContext<CreateHintContext>) => {
t.context.cwd = (): string => {
Expand Down
5 changes: 3 additions & 2 deletions packages/create-hintrc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"bin": {
"create-hintrc": "./dist/src/create-hintrc.js"
Expand All @@ -26,7 +27,7 @@
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-hintrc/tests/browserslist.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';

type Inquirer = {
prompt: () => Promise<any>;
Expand All @@ -16,7 +16,7 @@ type BrowserslistContext = {
logger: Logger;
};

const test = anyTest as TestInterface<BrowserslistContext>;
const test = anyTest as TestFn<BrowserslistContext>;

const defaultOption = { targetBy: 'default' };
const multipleQueries = {
Expand Down
4 changes: 2 additions & 2 deletions packages/create-hintrc/tests/create-hintrc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isEqual = require('lodash/isEqual');
import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
import anyTest, { TestInterface, ExecutionContext } from 'ava';
import anyTest, { TestFn, ExecutionContext } from 'ava';

import * as utils from '@hint/utils';

Expand Down Expand Up @@ -59,7 +59,7 @@ type CreateHintRCContext = {
promisifyObject: PromisifyObject;
};

const test = anyTest as TestInterface<CreateHintRCContext>;
const test = anyTest as TestFn<CreateHintRCContext>;

const formatters = [
'formatter1',
Expand Down
5 changes: 3 additions & 2 deletions packages/create-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"bin": {
"create-parser": "./dist/src/create-parser.js"
Expand All @@ -24,7 +25,7 @@
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-parser/src/templates/tests.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
import anyTest, { TestInterface } from 'ava';
import anyTest, { TestFn } from 'ava';
import { EventEmitter2 } from 'eventemitter2';

type SandboxContext = {
sandbox: sinon.SinonSandbox;
};

const test = anyTest as TestInterface<SandboxContext>;
const test = anyTest as TestFn<SandboxContext>;

const mockContext = () => {
const engine = new EventEmitter2({
Expand Down
4 changes: 2 additions & 2 deletions packages/create-parser/tests/new-parser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
import * as proxyquire from 'proxyquire';
import * as sinon from 'sinon';
import anyTest, { TestInterface, ExecutionContext } from 'ava';
import anyTest, { TestFn, ExecutionContext } from 'ava';
import * as InquirerTypes from 'inquirer';

import * as handlebarsUtils from '../src/handlebars-utils';
Expand Down Expand Up @@ -42,7 +42,7 @@ type NewParserContext = {
writeFileAsyncDefaultStub: sinon.SinonStub<[], void>;
};

const test = anyTest as TestInterface<NewParserContext>;
const test = anyTest as TestFn<NewParserContext>;

const initContext = (t: ExecutionContext<NewParserContext>) => {
const sandbox = sinon.createSandbox();
Expand Down
5 changes: 3 additions & 2 deletions packages/extension-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"!dist/tests/**/fixtures/**/*.js",
"!dist/tests/helpers/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"browserslist": "last 2 chrome versions, last 2 firefox versions",
"bundleSize": 735000,
Expand Down Expand Up @@ -62,7 +63,7 @@
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"assert": "^2.0.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"axe-core": "4.4.0",
"browserslist": "^4.19.3",
"copyfiles": "^2.4.1",
Expand Down
5 changes: 3 additions & 2 deletions packages/extension-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"bundleSize": 135000,
"categories": [
Expand All @@ -34,7 +35,7 @@
"@types/vscode": "^1.64.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
5 changes: 3 additions & 2 deletions packages/formatter-codeframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dist/tests/**/*.js",
"!dist/tests/**/fixtures/**/*.js"
],
"timeout": "1m"
"timeout": "1m",
"workerThreads": false
},
"description": "hint formatter that prints the results using the codeframe style",
"dependencies": {
Expand All @@ -25,7 +26,7 @@
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"ava": "^3.15.0",
"ava": "^4.0.1",
"copyfiles": "^2.4.1",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.4",
Expand Down
Loading

0 comments on commit 682dd7e

Please sign in to comment.