chore: update dependencies (#9436)

Fixed: https://github.com/puppeteer/puppeteer/issues/9372
This commit is contained in:
jrandolf 2022-12-19 15:26:58 +01:00 committed by GitHub
parent c7a063a152
commit 3f52212fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 1681 additions and 1777 deletions

View File

@ -7,5 +7,5 @@ sidebar_label: ActionResult
#### Signature: #### Signature:
```typescript ```typescript
export declare type ActionResult = 'continue' | 'abort' | 'respond'; export type ActionResult = 'continue' | 'abort' | 'respond';
``` ```

View File

@ -7,5 +7,5 @@ sidebar_label: Awaitable
#### Signature: #### Signature:
```typescript ```typescript
export declare type Awaitable<T> = T | PromiseLike<T>; export type Awaitable<T> = T | PromiseLike<T>;
``` ```

View File

@ -7,7 +7,7 @@ sidebar_label: ChromeReleaseChannel
#### Signature: #### Signature:
```typescript ```typescript
export declare type ChromeReleaseChannel = export type ChromeReleaseChannel =
| 'chrome' | 'chrome'
| 'chrome-beta' | 'chrome-beta'
| 'chrome-canary' | 'chrome-canary'

View File

@ -9,7 +9,7 @@ The supported types for console messages.
#### Signature: #### Signature:
```typescript ```typescript
export declare type ConsoleMessageType = export type ConsoleMessageType =
| 'log' | 'log'
| 'debug' | 'debug'
| 'info' | 'info'

View File

@ -7,7 +7,7 @@ sidebar_label: ElementFor
#### Signature: #### Signature:
```typescript ```typescript
export declare type ElementFor< export type ElementFor<
TagName extends keyof HTMLElementTagNameMap | keyof SVGElementTagNameMap TagName extends keyof HTMLElementTagNameMap | keyof SVGElementTagNameMap
> = TagName extends keyof HTMLElementTagNameMap > = TagName extends keyof HTMLElementTagNameMap
? HTMLElementTagNameMap[TagName] ? HTMLElementTagNameMap[TagName]

View File

@ -16,8 +16,8 @@ class ElementHandle {
Selector extends string, Selector extends string,
Params extends unknown[], Params extends unknown[],
Func extends EvaluateFunc< Func extends EvaluateFunc<
[Array<NodeFor<Selector>>, ...Params] [HandleFor<Array<NodeFor<Selector>>>, ...Params]
> = EvaluateFunc<[Array<NodeFor<Selector>>, ...Params]> > = EvaluateFunc<[HandleFor<Array<NodeFor<Selector>>>, ...Params]>
>( >(
selector: Selector, selector: Selector,
pageFunction: Func | string, pageFunction: Func | string,

View File

@ -7,7 +7,7 @@ sidebar_label: ErrorCode
#### Signature: #### Signature:
```typescript ```typescript
export declare type ErrorCode = export type ErrorCode =
| 'aborted' | 'aborted'
| 'accessdenied' | 'accessdenied'
| 'addressunreachable' | 'addressunreachable'

View File

@ -7,7 +7,7 @@ sidebar_label: EvaluateFunc
#### Signature: #### Signature:
```typescript ```typescript
export declare type EvaluateFunc<T extends unknown[]> = ( export type EvaluateFunc<T extends unknown[]> = (
...params: InnerParams<T> ...params: InnerParams<T>
) => Awaitable<unknown>; ) => Awaitable<unknown>;
``` ```

View File

@ -7,7 +7,7 @@ sidebar_label: FlattenHandle
#### Signature: #### Signature:
```typescript ```typescript
export declare type FlattenHandle<T> = T extends HandleOr<infer U> ? U : never; export type FlattenHandle<T> = T extends HandleOr<infer U> ? U : never;
``` ```
**References:** [HandleOr](./puppeteer.handleor.md) **References:** [HandleOr](./puppeteer.handleor.md)

View File

@ -7,9 +7,7 @@ sidebar_label: HandleFor
#### Signature: #### Signature:
```typescript ```typescript
export declare type HandleFor<T> = T extends Node export type HandleFor<T> = T extends Node ? ElementHandle<T> : JSHandle<T>;
? ElementHandle<T>
: JSHandle<T>;
``` ```
**References:** [ElementHandle](./puppeteer.elementhandle.md), [JSHandle](./puppeteer.jshandle.md) **References:** [ElementHandle](./puppeteer.elementhandle.md), [JSHandle](./puppeteer.jshandle.md)

View File

@ -7,7 +7,7 @@ sidebar_label: HandleOr
#### Signature: #### Signature:
```typescript ```typescript
export declare type HandleOr<T> = HandleFor<T> | JSHandle<T> | T; export type HandleOr<T> = HandleFor<T> | JSHandle<T> | T;
``` ```
**References:** [HandleFor](./puppeteer.handlefor.md), [JSHandle](./puppeteer.jshandle.md) **References:** [HandleFor](./puppeteer.handlefor.md), [JSHandle](./puppeteer.jshandle.md)

View File

@ -7,7 +7,7 @@ sidebar_label: InnerParams
#### Signature: #### Signature:
```typescript ```typescript
export declare type InnerParams<T extends unknown[]> = { export type InnerParams<T extends unknown[]> = {
[K in keyof T]: FlattenHandle<T[K]>; [K in keyof T]: FlattenHandle<T[K]>;
}; };
``` ```

View File

@ -11,7 +11,7 @@ sidebar_label: InterceptResolutionStrategy
#### Signature: #### Signature:
```typescript ```typescript
export declare type InterceptResolutionStrategy = InterceptResolutionAction; export type InterceptResolutionStrategy = InterceptResolutionAction;
``` ```
**References:** [InterceptResolutionAction](./puppeteer.interceptresolutionaction.md) **References:** [InterceptResolutionAction](./puppeteer.interceptresolutionaction.md)

View File

@ -9,7 +9,7 @@ All the valid keys that can be passed to functions that take user input, such as
#### Signature: #### Signature:
```typescript ```typescript
export declare type KeyInput = export type KeyInput =
| '0' | '0'
| '1' | '1'
| '2' | '2'

View File

@ -7,7 +7,7 @@ sidebar_label: LowerCasePaperFormat
#### Signature: #### Signature:
```typescript ```typescript
export declare type LowerCasePaperFormat = export type LowerCasePaperFormat =
| 'letter' | 'letter'
| 'legal' | 'legal'
| 'tabloid' | 'tabloid'

View File

@ -7,10 +7,5 @@ sidebar_label: MouseButton
#### Signature: #### Signature:
```typescript ```typescript
export declare type MouseButton = export type MouseButton = 'left' | 'right' | 'middle' | 'back' | 'forward';
| 'left'
| 'right'
| 'middle'
| 'back'
| 'forward';
``` ```

View File

@ -7,7 +7,7 @@ sidebar_label: NodeFor
#### Signature: #### Signature:
```typescript ```typescript
export declare type NodeFor<ComplexSelector extends string> = export type NodeFor<ComplexSelector extends string> =
TypeSelectorOfComplexSelector<ComplexSelector> extends infer TypeSelector TypeSelectorOfComplexSelector<ComplexSelector> extends infer TypeSelector
? TypeSelector extends ? TypeSelector extends
| keyof HTMLElementTagNameMap | keyof HTMLElementTagNameMap

View File

@ -9,7 +9,7 @@ All the valid paper format types when printing a PDF.
#### Signature: #### Signature:
```typescript ```typescript
export declare type PaperFormat = export type PaperFormat =
| Uppercase<LowerCasePaperFormat> | Uppercase<LowerCasePaperFormat>
| Capitalize<LowerCasePaperFormat> | Capitalize<LowerCasePaperFormat>
| LowerCasePaperFormat; | LowerCasePaperFormat;

View File

@ -7,7 +7,7 @@ sidebar_label: Permission
#### Signature: #### Signature:
```typescript ```typescript
export declare type Permission = export type Permission =
| 'geolocation' | 'geolocation'
| 'midi' | 'midi'
| 'notifications' | 'notifications'

View File

@ -9,5 +9,5 @@ Supported platforms.
#### Signature: #### Signature:
```typescript ```typescript
export declare type Platform = 'linux' | 'mac' | 'mac_arm' | 'win32' | 'win64'; export type Platform = 'linux' | 'mac' | 'mac_arm' | 'win32' | 'win64';
``` ```

View File

@ -9,5 +9,5 @@ Supported products.
#### Signature: #### Signature:
```typescript ```typescript
export declare type Product = 'chrome' | 'firefox'; export type Product = 'chrome' | 'firefox';
``` ```

View File

@ -7,7 +7,7 @@ sidebar_label: ProtocolLifeCycleEvent
#### Signature: #### Signature:
```typescript ```typescript
export declare type ProtocolLifeCycleEvent = export type ProtocolLifeCycleEvent =
| 'load' | 'load'
| 'DOMContentLoaded' | 'DOMContentLoaded'
| 'networkIdle' | 'networkIdle'

View File

@ -7,7 +7,7 @@ sidebar_label: PuppeteerLifeCycleEvent
#### Signature: #### Signature:
```typescript ```typescript
export declare type PuppeteerLifeCycleEvent = export type PuppeteerLifeCycleEvent =
| 'load' | 'load'
| 'domcontentloaded' | 'domcontentloaded'
| 'networkidle0' | 'networkidle0'

View File

@ -9,7 +9,7 @@ Utility type exposed to enable users to define options that can be passed to `pu
#### Signature: #### Signature:
```typescript ```typescript
export declare type PuppeteerNodeLaunchOptions = BrowserLaunchArgumentOptions & export type PuppeteerNodeLaunchOptions = BrowserLaunchArgumentOptions &
LaunchOptions & LaunchOptions &
BrowserConnectOptions; BrowserConnectOptions;
``` ```

View File

@ -9,5 +9,5 @@ Resource types for HTTPRequests as perceived by the rendering engine.
#### Signature: #### Signature:
```typescript ```typescript
export declare type ResourceType = Lowercase<Protocol.Network.ResourceType>; export type ResourceType = Lowercase<Protocol.Network.ResourceType>;
``` ```

View File

@ -7,7 +7,7 @@ sidebar_label: TargetFilterCallback
#### Signature: #### Signature:
```typescript ```typescript
export declare type TargetFilterCallback = ( export type TargetFilterCallback = (
target: Protocol.Target.TargetInfo target: Protocol.Target.TargetInfo
) => boolean; ) => boolean;
``` ```

3341
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,36 +35,36 @@
"test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js" "test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "17.1.2", "@commitlint/cli": "17.3.0",
"@commitlint/config-conventional": "17.1.0", "@commitlint/config-conventional": "17.3.0",
"@microsoft/api-documenter": "7.19.14", "@microsoft/api-documenter": "7.19.26",
"@microsoft/api-extractor": "7.31.2", "@microsoft/api-extractor": "7.33.7",
"@microsoft/api-extractor-model": "7.24.2", "@microsoft/api-extractor-model": "7.25.3",
"@pptr/testserver": "file:packages/testserver", "@pptr/testserver": "file:packages/testserver",
"@types/debug": "4.1.7", "@types/debug": "4.1.7",
"@types/diff": "5.0.2", "@types/diff": "5.0.2",
"@types/glob": "8.0.0", "@types/glob": "8.0.0",
"@types/mime": "3.0.1", "@types/mime": "3.0.1",
"@types/mocha": "9.1.1", "@types/mocha": "10.0.1",
"@types/node": "18.7.21", "@types/node": "18.11.17",
"@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",
"@types/proxy-from-env": "1.0.1", "@types/proxy-from-env": "1.0.1",
"@types/rimraf": "3.0.2", "@types/rimraf": "3.0.2",
"@types/semver": "7.3.12", "@types/semver": "7.3.13",
"@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.3",
"@typescript-eslint/eslint-plugin": "5.38.0", "@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.38.0", "@typescript-eslint/parser": "5.46.1",
"c8": "7.12.0", "c8": "7.12.0",
"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.15.9", "esbuild": "0.16.9",
"eslint": "8.24.0", "eslint": "8.30.0",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.5.0",
"eslint-formatter-codeframe": "7.32.1", "eslint-formatter-codeframe": "7.32.1",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.26.0",
@ -77,30 +77,30 @@
"expect": "25.2.7", "expect": "25.2.7",
"glob": "8.0.3", "glob": "8.0.3",
"gts": "4.0.0", "gts": "4.0.0",
"husky": "8.0.1", "husky": "8.0.2",
"jpeg-js": "0.4.4", "jpeg-js": "0.4.4",
"mime": "3.0.0", "mime": "3.0.0",
"minimist": "1.2.6", "minimist": "1.2.7",
"mitt": "3.0.0", "mitt": "3.0.0",
"mocha": "10.0.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": "6.0.0",
"prettier": "2.7.1", "prettier": "2.8.1",
"puppeteer": "file:packages/puppeteer", "puppeteer": "file:packages/puppeteer",
"rollup": "2.79.1", "rollup": "2.79.1",
"rollup-plugin-dts": "4.2.2", "rollup-plugin-dts": "4.2.2",
"rollup-plugin-node-resolve": "5.2.0", "rollup-plugin-node-resolve": "5.2.0",
"semver": "7.3.7", "semver": "7.3.8",
"sinon": "14.0.0", "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.24.1", "tsd": "0.25.0",
"tsx": "3.9.0", "tsx": "3.12.1",
"typescript": "4.8.3", "typescript": "4.9.4",
"wireit": "0.7.2", "wireit": "0.9.2",
"zod": "3.19.1" "zod": "3.20.2"
}, },
"workspaces": [ "workspaces": [
"packages/*", "packages/*",

View File

@ -237,8 +237,8 @@ export class ElementHandle<
Selector extends string, Selector extends string,
Params extends unknown[], Params extends unknown[],
Func extends EvaluateFunc< Func extends EvaluateFunc<
[Array<NodeFor<Selector>>, ...Params] [HandleFor<Array<NodeFor<Selector>>>, ...Params]
> = EvaluateFunc<[Array<NodeFor<Selector>>, ...Params]> > = EvaluateFunc<[HandleFor<Array<NodeFor<Selector>>>, ...Params]>
>( >(
selector: Selector, selector: Selector,
pageFunction: Func | string, pageFunction: Func | string,
@ -254,9 +254,9 @@ export class ElementHandle<
this, this,
updatedSelector updatedSelector
)) as Array<HandleFor<NodeFor<Selector>>>; )) as Array<HandleFor<NodeFor<Selector>>>;
const elements = await this.evaluateHandle((_, ...elements) => { const elements = (await this.evaluateHandle((_, ...elements) => {
return elements; return elements;
}, ...handles); }, ...handles)) as JSHandle<Array<NodeFor<Selector>>>;
const [result] = await Promise.all([ const [result] = await Promise.all([
elements.evaluate(pageFunction, ...args), elements.evaluate(pageFunction, ...args),
...handles.map(handle => { ...handles.map(handle => {

View File

@ -167,7 +167,7 @@ export class JSHandle<T = unknown> {
propertyName: HandleOr<K> propertyName: HandleOr<K>
): Promise<HandleFor<T[K]>> { ): Promise<HandleFor<T[K]>> {
return this.evaluateHandle((object, propertyName) => { return this.evaluateHandle((object, propertyName) => {
return object[propertyName]; return object[propertyName as K];
}, propertyName); }, propertyName);
} }