chore: update dependencies (#9436)
Fixed: https://github.com/puppeteer/puppeteer/issues/9372
This commit is contained in:
parent
c7a063a152
commit
3f52212fc8
@ -7,5 +7,5 @@ sidebar_label: ActionResult
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ActionResult = 'continue' | 'abort' | 'respond';
|
||||
export type ActionResult = 'continue' | 'abort' | 'respond';
|
||||
```
|
||||
|
@ -7,5 +7,5 @@ sidebar_label: Awaitable
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type Awaitable<T> = T | PromiseLike<T>;
|
||||
export type Awaitable<T> = T | PromiseLike<T>;
|
||||
```
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: ChromeReleaseChannel
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ChromeReleaseChannel =
|
||||
export type ChromeReleaseChannel =
|
||||
| 'chrome'
|
||||
| 'chrome-beta'
|
||||
| 'chrome-canary'
|
||||
|
@ -9,7 +9,7 @@ The supported types for console messages.
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ConsoleMessageType =
|
||||
export type ConsoleMessageType =
|
||||
| 'log'
|
||||
| 'debug'
|
||||
| 'info'
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: ElementFor
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ElementFor<
|
||||
export type ElementFor<
|
||||
TagName extends keyof HTMLElementTagNameMap | keyof SVGElementTagNameMap
|
||||
> = TagName extends keyof HTMLElementTagNameMap
|
||||
? HTMLElementTagNameMap[TagName]
|
||||
|
@ -16,8 +16,8 @@ class ElementHandle {
|
||||
Selector extends string,
|
||||
Params extends unknown[],
|
||||
Func extends EvaluateFunc<
|
||||
[Array<NodeFor<Selector>>, ...Params]
|
||||
> = EvaluateFunc<[Array<NodeFor<Selector>>, ...Params]>
|
||||
[HandleFor<Array<NodeFor<Selector>>>, ...Params]
|
||||
> = EvaluateFunc<[HandleFor<Array<NodeFor<Selector>>>, ...Params]>
|
||||
>(
|
||||
selector: Selector,
|
||||
pageFunction: Func | string,
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: ErrorCode
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ErrorCode =
|
||||
export type ErrorCode =
|
||||
| 'aborted'
|
||||
| 'accessdenied'
|
||||
| 'addressunreachable'
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: EvaluateFunc
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type EvaluateFunc<T extends unknown[]> = (
|
||||
export type EvaluateFunc<T extends unknown[]> = (
|
||||
...params: InnerParams<T>
|
||||
) => Awaitable<unknown>;
|
||||
```
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: FlattenHandle
|
||||
#### Signature:
|
||||
|
||||
```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)
|
||||
|
@ -7,9 +7,7 @@ sidebar_label: HandleFor
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type HandleFor<T> = T extends Node
|
||||
? ElementHandle<T>
|
||||
: JSHandle<T>;
|
||||
export type HandleFor<T> = T extends Node ? ElementHandle<T> : JSHandle<T>;
|
||||
```
|
||||
|
||||
**References:** [ElementHandle](./puppeteer.elementhandle.md), [JSHandle](./puppeteer.jshandle.md)
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: HandleOr
|
||||
#### Signature:
|
||||
|
||||
```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)
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: InnerParams
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type InnerParams<T extends unknown[]> = {
|
||||
export type InnerParams<T extends unknown[]> = {
|
||||
[K in keyof T]: FlattenHandle<T[K]>;
|
||||
};
|
||||
```
|
||||
|
@ -11,7 +11,7 @@ sidebar_label: InterceptResolutionStrategy
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type InterceptResolutionStrategy = InterceptResolutionAction;
|
||||
export type InterceptResolutionStrategy = InterceptResolutionAction;
|
||||
```
|
||||
|
||||
**References:** [InterceptResolutionAction](./puppeteer.interceptresolutionaction.md)
|
||||
|
@ -9,7 +9,7 @@ All the valid keys that can be passed to functions that take user input, such as
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type KeyInput =
|
||||
export type KeyInput =
|
||||
| '0'
|
||||
| '1'
|
||||
| '2'
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: LowerCasePaperFormat
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type LowerCasePaperFormat =
|
||||
export type LowerCasePaperFormat =
|
||||
| 'letter'
|
||||
| 'legal'
|
||||
| 'tabloid'
|
||||
|
@ -7,10 +7,5 @@ sidebar_label: MouseButton
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type MouseButton =
|
||||
| 'left'
|
||||
| 'right'
|
||||
| 'middle'
|
||||
| 'back'
|
||||
| 'forward';
|
||||
export type MouseButton = 'left' | 'right' | 'middle' | 'back' | 'forward';
|
||||
```
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: NodeFor
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type NodeFor<ComplexSelector extends string> =
|
||||
export type NodeFor<ComplexSelector extends string> =
|
||||
TypeSelectorOfComplexSelector<ComplexSelector> extends infer TypeSelector
|
||||
? TypeSelector extends
|
||||
| keyof HTMLElementTagNameMap
|
||||
|
@ -9,7 +9,7 @@ All the valid paper format types when printing a PDF.
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type PaperFormat =
|
||||
export type PaperFormat =
|
||||
| Uppercase<LowerCasePaperFormat>
|
||||
| Capitalize<LowerCasePaperFormat>
|
||||
| LowerCasePaperFormat;
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: Permission
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type Permission =
|
||||
export type Permission =
|
||||
| 'geolocation'
|
||||
| 'midi'
|
||||
| 'notifications'
|
||||
|
@ -9,5 +9,5 @@ Supported platforms.
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type Platform = 'linux' | 'mac' | 'mac_arm' | 'win32' | 'win64';
|
||||
export type Platform = 'linux' | 'mac' | 'mac_arm' | 'win32' | 'win64';
|
||||
```
|
||||
|
@ -9,5 +9,5 @@ Supported products.
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type Product = 'chrome' | 'firefox';
|
||||
export type Product = 'chrome' | 'firefox';
|
||||
```
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: ProtocolLifeCycleEvent
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ProtocolLifeCycleEvent =
|
||||
export type ProtocolLifeCycleEvent =
|
||||
| 'load'
|
||||
| 'DOMContentLoaded'
|
||||
| 'networkIdle'
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: PuppeteerLifeCycleEvent
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type PuppeteerLifeCycleEvent =
|
||||
export type PuppeteerLifeCycleEvent =
|
||||
| 'load'
|
||||
| 'domcontentloaded'
|
||||
| 'networkidle0'
|
||||
|
@ -9,7 +9,7 @@ Utility type exposed to enable users to define options that can be passed to `pu
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type PuppeteerNodeLaunchOptions = BrowserLaunchArgumentOptions &
|
||||
export type PuppeteerNodeLaunchOptions = BrowserLaunchArgumentOptions &
|
||||
LaunchOptions &
|
||||
BrowserConnectOptions;
|
||||
```
|
||||
|
@ -9,5 +9,5 @@ Resource types for HTTPRequests as perceived by the rendering engine.
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type ResourceType = Lowercase<Protocol.Network.ResourceType>;
|
||||
export type ResourceType = Lowercase<Protocol.Network.ResourceType>;
|
||||
```
|
||||
|
@ -7,7 +7,7 @@ sidebar_label: TargetFilterCallback
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare type TargetFilterCallback = (
|
||||
export type TargetFilterCallback = (
|
||||
target: Protocol.Target.TargetInfo
|
||||
) => boolean;
|
||||
```
|
||||
|
3259
package-lock.json
generated
3259
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
46
package.json
46
package.json
@ -35,36 +35,36 @@
|
||||
"test": "cross-env PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT=20000 node tools/mochaRunner/lib/main.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "17.1.2",
|
||||
"@commitlint/config-conventional": "17.1.0",
|
||||
"@microsoft/api-documenter": "7.19.14",
|
||||
"@microsoft/api-extractor": "7.31.2",
|
||||
"@microsoft/api-extractor-model": "7.24.2",
|
||||
"@commitlint/cli": "17.3.0",
|
||||
"@commitlint/config-conventional": "17.3.0",
|
||||
"@microsoft/api-documenter": "7.19.26",
|
||||
"@microsoft/api-extractor": "7.33.7",
|
||||
"@microsoft/api-extractor-model": "7.25.3",
|
||||
"@pptr/testserver": "file:packages/testserver",
|
||||
"@types/debug": "4.1.7",
|
||||
"@types/diff": "5.0.2",
|
||||
"@types/glob": "8.0.0",
|
||||
"@types/mime": "3.0.1",
|
||||
"@types/mocha": "9.1.1",
|
||||
"@types/node": "18.7.21",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/node": "18.11.17",
|
||||
"@types/pixelmatch": "5.2.4",
|
||||
"@types/pngjs": "6.0.1",
|
||||
"@types/progress": "2.0.5",
|
||||
"@types/proxy-from-env": "1.0.1",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"@types/semver": "7.3.12",
|
||||
"@types/semver": "7.3.13",
|
||||
"@types/sinon": "10.0.13",
|
||||
"@types/tar-fs": "2.0.1",
|
||||
"@types/unbzip2-stream": "1.4.0",
|
||||
"@types/ws": "8.5.3",
|
||||
"@typescript-eslint/eslint-plugin": "5.38.0",
|
||||
"@typescript-eslint/parser": "5.38.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.46.1",
|
||||
"@typescript-eslint/parser": "5.46.1",
|
||||
"c8": "7.12.0",
|
||||
"commonmark": "0.30.0",
|
||||
"cross-env": "7.0.3",
|
||||
"diff": "5.1.0",
|
||||
"esbuild": "0.15.9",
|
||||
"eslint": "8.24.0",
|
||||
"esbuild": "0.16.9",
|
||||
"eslint": "8.30.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-formatter-codeframe": "7.32.1",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
@ -77,30 +77,30 @@
|
||||
"expect": "25.2.7",
|
||||
"glob": "8.0.3",
|
||||
"gts": "4.0.0",
|
||||
"husky": "8.0.1",
|
||||
"husky": "8.0.2",
|
||||
"jpeg-js": "0.4.4",
|
||||
"mime": "3.0.0",
|
||||
"minimist": "1.2.6",
|
||||
"minimist": "1.2.7",
|
||||
"mitt": "3.0.0",
|
||||
"mocha": "10.0.0",
|
||||
"mocha": "10.2.0",
|
||||
"ncp": "2.0.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"pixelmatch": "5.3.0",
|
||||
"pngjs": "6.0.0",
|
||||
"prettier": "2.7.1",
|
||||
"prettier": "2.8.1",
|
||||
"puppeteer": "file:packages/puppeteer",
|
||||
"rollup": "2.79.1",
|
||||
"rollup-plugin-dts": "4.2.2",
|
||||
"rollup-plugin-node-resolve": "5.2.0",
|
||||
"semver": "7.3.7",
|
||||
"sinon": "14.0.0",
|
||||
"semver": "7.3.8",
|
||||
"sinon": "15.0.1",
|
||||
"source-map-support": "0.5.21",
|
||||
"text-diff": "1.0.1",
|
||||
"tsd": "0.24.1",
|
||||
"tsx": "3.9.0",
|
||||
"typescript": "4.8.3",
|
||||
"wireit": "0.7.2",
|
||||
"zod": "3.19.1"
|
||||
"tsd": "0.25.0",
|
||||
"tsx": "3.12.1",
|
||||
"typescript": "4.9.4",
|
||||
"wireit": "0.9.2",
|
||||
"zod": "3.20.2"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
|
@ -237,8 +237,8 @@ export class ElementHandle<
|
||||
Selector extends string,
|
||||
Params extends unknown[],
|
||||
Func extends EvaluateFunc<
|
||||
[Array<NodeFor<Selector>>, ...Params]
|
||||
> = EvaluateFunc<[Array<NodeFor<Selector>>, ...Params]>
|
||||
[HandleFor<Array<NodeFor<Selector>>>, ...Params]
|
||||
> = EvaluateFunc<[HandleFor<Array<NodeFor<Selector>>>, ...Params]>
|
||||
>(
|
||||
selector: Selector,
|
||||
pageFunction: Func | string,
|
||||
@ -254,9 +254,9 @@ export class ElementHandle<
|
||||
this,
|
||||
updatedSelector
|
||||
)) as Array<HandleFor<NodeFor<Selector>>>;
|
||||
const elements = await this.evaluateHandle((_, ...elements) => {
|
||||
const elements = (await this.evaluateHandle((_, ...elements) => {
|
||||
return elements;
|
||||
}, ...handles);
|
||||
}, ...handles)) as JSHandle<Array<NodeFor<Selector>>>;
|
||||
const [result] = await Promise.all([
|
||||
elements.evaluate(pageFunction, ...args),
|
||||
...handles.map(handle => {
|
||||
|
@ -167,7 +167,7 @@ export class JSHandle<T = unknown> {
|
||||
propertyName: HandleOr<K>
|
||||
): Promise<HandleFor<T[K]>> {
|
||||
return this.evaluateHandle((object, propertyName) => {
|
||||
return object[propertyName];
|
||||
return object[propertyName as K];
|
||||
}, propertyName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user