fix: update dependencies (#9781)

This commit is contained in:
jrandolf 2023-03-06 13:43:37 +01:00 committed by GitHub
parent 299d44477d
commit 364b23f8b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 934 additions and 1466 deletions

2307
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -115,8 +115,8 @@
}, },
"devDependencies": { "devDependencies": {
"@actions/core": "1.10.0", "@actions/core": "1.10.0",
"@commitlint/cli": "17.3.0", "@commitlint/cli": "17.4.4",
"@commitlint/config-conventional": "17.3.0", "@commitlint/config-conventional": "17.4.4",
"@microsoft/api-documenter": "7.21.5", "@microsoft/api-documenter": "7.21.5",
"@microsoft/api-extractor": "7.34.4", "@microsoft/api-extractor": "7.34.4",
"@microsoft/api-extractor-model": "7.26.4", "@microsoft/api-extractor-model": "7.26.4",
@ -127,7 +127,7 @@
"@types/diff": "5.0.2", "@types/diff": "5.0.2",
"@types/mime": "3.0.1", "@types/mime": "3.0.1",
"@types/mocha": "10.0.1", "@types/mocha": "10.0.1",
"@types/node": "18.11.17", "@types/node": "18.14.6",
"@types/pixelmatch": "5.2.4", "@types/pixelmatch": "5.2.4",
"@types/pngjs": "6.0.1", "@types/pngjs": "6.0.1",
"@types/progress": "2.0.5", "@types/progress": "2.0.5",
@ -136,49 +136,49 @@
"@types/sinon": "10.0.13", "@types/sinon": "10.0.13",
"@types/tar-fs": "2.0.1", "@types/tar-fs": "2.0.1",
"@types/unbzip2-stream": "1.4.0", "@types/unbzip2-stream": "1.4.0",
"@types/ws": "8.5.3", "@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "5.46.1", "@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.46.1", "@typescript-eslint/parser": "5.54.0",
"c8": "7.12.0", "c8": "7.13.0",
"commitlint": "17.4.4", "commitlint": "17.4.4",
"commonmark": "0.30.0", "commonmark": "0.30.0",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"diff": "5.1.0", "diff": "5.1.0",
"esbuild": "0.16.9", "esbuild": "0.17.11",
"eslint": "8.30.0", "eslint": "8.35.0",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.7.0",
"eslint-formatter-codeframe": "7.32.1", "eslint-formatter-codeframe": "7.32.1",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.27.5",
"eslint-plugin-local": "1.0.0", "eslint-plugin-local": "1.0.0",
"eslint-plugin-mocha": "10.1.0", "eslint-plugin-mocha": "10.1.0",
"eslint-plugin-prettier": "4.2.1", "eslint-plugin-prettier": "4.2.1",
"eslint-plugin-tsdoc": "0.2.17", "eslint-plugin-tsdoc": "0.2.17",
"eslint-plugin-unused-imports": "2.0.0", "eslint-plugin-unused-imports": "2.0.0",
"esprima": "4.0.1", "esprima": "4.0.1",
"expect": "25.2.7", "expect": "29.4.3",
"glob": "9.2.1", "glob": "9.2.1",
"gts": "4.0.0", "gts": "4.0.0",
"husky": "8.0.3", "husky": "8.0.3",
"jpeg-js": "0.4.4", "jpeg-js": "0.4.4",
"mime": "3.0.0", "mime": "3.0.0",
"minimist": "1.2.7", "minimist": "1.2.8",
"mocha": "10.2.0", "mocha": "10.2.0",
"ncp": "2.0.0", "ncp": "2.0.0",
"npm-run-all": "4.1.5", "npm-run-all": "4.1.5",
"pixelmatch": "5.3.0", "pixelmatch": "5.3.0",
"pngjs": "6.0.0", "pngjs": "7.0.0",
"prettier": "2.8.1", "prettier": "2.8.4",
"puppeteer": "file:packages/puppeteer", "puppeteer": "file:packages/puppeteer",
"rollup": "3.12.1", "rollup": "3.18.0",
"semver": "7.3.8", "semver": "7.3.8",
"sinon": "15.0.1", "sinon": "15.0.1",
"source-map-support": "0.5.21", "source-map-support": "0.5.21",
"text-diff": "1.0.1", "text-diff": "1.0.1",
"tsd": "0.25.0", "tsd": "0.26.0",
"tsx": "3.12.1", "tsx": "3.12.3",
"typescript": "4.9.4", "typescript": "4.9.5",
"wireit": "0.9.2", "wireit": "0.9.5",
"zod": "3.20.2" "zod": "3.21.2"
}, },
"workspaces": [ "workspaces": [
"packages/*", "packages/*",

View File

@ -140,7 +140,7 @@
"proxy-from-env": "1.1.0", "proxy-from-env": "1.1.0",
"tar-fs": "2.1.1", "tar-fs": "2.1.1",
"unbzip2-stream": "1.4.3", "unbzip2-stream": "1.4.3",
"ws": "8.11.0" "ws": "8.12.1"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": ">= 4.7.4" "typescript": ">= 4.7.4"

View File

@ -1523,7 +1523,7 @@ const knownDevices = [
] as const; ] as const;
const knownDevicesByName = {} as Record< const knownDevicesByName = {} as Record<
typeof knownDevices[number]['name'], (typeof knownDevices)[number]['name'],
Device Device
>; >;

View File

@ -1,4 +1,5 @@
{ {
"separate-pull-requests": true,
"last-release-sha": "30e5b1a58edb8b1d94acdff00d64c76e76cf02a3", "last-release-sha": "30e5b1a58edb8b1d94acdff00d64c76e76cf02a3",
"packages": { "packages": {
"packages/puppeteer": { "packages/puppeteer": {

View File

@ -7,15 +7,9 @@
"build": "wireit", "build": "wireit",
"build:packages": "wireit", "build:packages": "wireit",
"clean": "tsc -b --clean && rm -rf build", "clean": "tsc -b --clean && rm -rf build",
"test": "wireit" "test": "mocha"
}, },
"wireit": { "wireit": {
"test": {
"command": "mocha",
"dependencies": [
"build"
]
},
"build": { "build": {
"command": "tsc -b", "command": "tsc -b",
"clean": "if-file-deleted", "clean": "if-file-deleted",

View File

@ -21,6 +21,7 @@ import {TestServer} from '@pptr/testserver';
import {Protocol} from 'devtools-protocol'; import {Protocol} from 'devtools-protocol';
import expect from 'expect'; import expect from 'expect';
import * as Mocha from 'mocha'; import * as Mocha from 'mocha';
import puppeteer from 'puppeteer/lib/cjs/puppeteer/puppeteer.js';
import {Browser} from 'puppeteer-core/internal/api/Browser.js'; import {Browser} from 'puppeteer-core/internal/api/Browser.js';
import {BrowserContext} from 'puppeteer-core/internal/api/BrowserContext.js'; import {BrowserContext} from 'puppeteer-core/internal/api/BrowserContext.js';
import {Page} from 'puppeteer-core/internal/api/Page.js'; import {Page} from 'puppeteer-core/internal/api/Page.js';
@ -33,7 +34,6 @@ import {
PuppeteerNode, PuppeteerNode,
} from 'puppeteer-core/internal/node/PuppeteerNode.js'; } from 'puppeteer-core/internal/node/PuppeteerNode.js';
import {isErrorLike} from 'puppeteer-core/internal/util/ErrorLike.js'; import {isErrorLike} from 'puppeteer-core/internal/util/ErrorLike.js';
import puppeteer from 'puppeteer/lib/cjs/puppeteer/puppeteer.js';
import sinon from 'sinon'; import sinon from 'sinon';
import {extendExpectWithToBeGolden} from './utils.js'; import {extendExpectWithToBeGolden} from './utils.js';
@ -118,12 +118,6 @@ const defaultBrowserOptions = Object.assign(
} }
})(); })();
declare module 'expect/build/types' {
interface Matchers<R> {
toBeGolden(x: string): R;
}
}
const setupGoldenAssertions = (): void => { const setupGoldenAssertions = (): void => {
let suffix = product.toLowerCase(); let suffix = product.toLowerCase();
if (suffix === 'chrome') { if (suffix === 'chrome') {

View File

@ -31,7 +31,7 @@ describe('Operation', () => {
values.push(3); values.push(3);
}); });
expect(values).toMatchObject([2, 3, 1]); expect(values).toEqual([2, 3, 1]);
}); });
it('should work with error on operation', async () => { it('should work with error on operation', async () => {
@ -53,7 +53,7 @@ describe('Operation', () => {
} }
expect(errored).toBe('test'); expect(errored).toBe('test');
expect(values).toMatchObject([1, 2]); expect(values).toEqual([1, 2]);
}); });
it('should work with error on effect', async () => { it('should work with error on effect', async () => {
@ -75,7 +75,7 @@ describe('Operation', () => {
} }
expect(errored).toBe('test'); expect(errored).toBe('test');
expect(values).toMatchObject([2, 1]); expect(values).toEqual([2, 1]);
}); });
it('should work with error on both operation and effect', async () => { it('should work with error on both operation and effect', async () => {
@ -97,7 +97,7 @@ describe('Operation', () => {
} }
expect(errored).toBe('test1'); expect(errored).toBe('test1');
expect(values).toMatchObject([1]); expect(values).toEqual([1]);
}); });
it('should work with delayed error on operation', async () => { it('should work with delayed error on operation', async () => {
@ -123,7 +123,7 @@ describe('Operation', () => {
} }
expect(errored).toBe('test1'); expect(errored).toBe('test1');
expect(values).toMatchObject([1]); expect(values).toEqual([1]);
}); });
it('should work with async error on effects', async () => { it('should work with async error on effects', async () => {
@ -145,7 +145,7 @@ describe('Operation', () => {
} }
expect(errored).toBe('test'); expect(errored).toBe('test');
expect(values).toMatchObject([2, 1]); expect(values).toEqual([2, 1]);
}); });
it('should work with then', async () => { it('should work with then', async () => {
@ -166,7 +166,7 @@ describe('Operation', () => {
await operation; await operation;
expect(operation).toBeInstanceOf(Operation); expect(operation).toBeInstanceOf(Operation);
expect(values).toMatchObject([2, 3, 1, 4]); expect(values).toEqual([2, 3, 1, 4]);
}); });
it('should work with catch', async () => { it('should work with catch', async () => {
@ -187,7 +187,7 @@ describe('Operation', () => {
await operation; await operation;
expect(operation).toBeInstanceOf(Operation); expect(operation).toBeInstanceOf(Operation);
expect(values).toMatchObject([1, 2, 3]); expect(values).toEqual([1, 2, 3]);
}); });
it('should work with finally', async () => { it('should work with finally', async () => {
@ -208,7 +208,7 @@ describe('Operation', () => {
await operation; await operation;
expect(operation).toBeInstanceOf(Operation); expect(operation).toBeInstanceOf(Operation);
expect(values).toMatchObject([2, 3, 1, 4]); expect(values).toEqual([2, 3, 1, 4]);
}); });
it('should throw when adding effects on on awaited operation', async () => { it('should throw when adding effects on on awaited operation', async () => {
@ -229,6 +229,6 @@ describe('Operation', () => {
) )
); );
expect(operation).toBeInstanceOf(Operation); expect(operation).toBeInstanceOf(Operation);
expect(values).toMatchObject([1]); expect(values).toEqual([1]);
}); });
}); });

View File

@ -25,6 +25,12 @@ import {compare} from './golden-utils.js';
const PROJECT_ROOT = path.join(__dirname, '..', '..'); const PROJECT_ROOT = path.join(__dirname, '..', '..');
declare module 'expect' {
interface Matchers<R> {
toBeGolden(pathOrBuffer: string | Buffer): R;
}
}
export const extendExpectWithToBeGolden = ( export const extendExpectWithToBeGolden = (
goldenDir: string, goldenDir: string,
outputDir: string outputDir: string
@ -42,7 +48,7 @@ export const extendExpectWithToBeGolden = (
return { return {
pass: true, pass: true,
message: () => { message: () => {
return void 0; return '';
}, },
}; };
} else { } else {

View File

@ -15,8 +15,8 @@ import {
import Translate, {translate} from '@docusaurus/Translate'; import Translate, {translate} from '@docusaurus/Translate';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout'; import Layout from '@theme/Layout';
import algoliaSearchHelper from 'algoliasearch-helper';
import algoliaSearch from 'algoliasearch/lite'; import algoliaSearch from 'algoliasearch/lite';
import algoliaSearchHelper from 'algoliasearch-helper';
import clsx from 'clsx'; import clsx from 'clsx';
import React, {useEffect, useState, useReducer, useRef} from 'react'; import React, {useEffect, useState, useReducer, useRef} from 'react';