diff --git a/docs/api/puppeteer.elementfor.md b/docs/api/puppeteer.elementfor.md index b1484291204..814eced0e34 100644 --- a/docs/api/puppeteer.elementfor.md +++ b/docs/api/puppeteer.elementfor.md @@ -12,6 +12,6 @@ export type ElementFor< > = TagName extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[TagName] : TagName extends keyof SVGElementTagNameMap - ? SVGElementTagNameMap[TagName] - : never; + ? SVGElementTagNameMap[TagName] + : never; ``` diff --git a/package-lock.json b/package-lock.json index 8bcecee77f7..e5731c3fddc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "license-checker": "25.0.1", "mocha": "10.2.0", "npm-run-all": "4.1.5", - "prettier": "3.0.3", + "prettier": "3.1.0", "puppeteer": "file:packages/puppeteer", "semver": "7.5.4", "sinon": "17.0.1", @@ -5526,6 +5526,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gts/node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/gts/node_modules/rxjs": { "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", @@ -8827,9 +8842,9 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "bin": { "prettier": "bin/prettier.cjs" }, diff --git a/package.json b/package.json index 467515cc954..7502b74e064 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,7 @@ "license-checker": "25.0.1", "mocha": "10.2.0", "npm-run-all": "4.1.5", - "prettier": "3.0.3", + "prettier": "3.1.0", "puppeteer": "file:packages/puppeteer", "semver": "7.5.4", "sinon": "17.0.1", diff --git a/packages/puppeteer-core/src/bidi/ExposedFunction.ts b/packages/puppeteer-core/src/bidi/ExposedFunction.ts index b61306a2a28..6ca9f556c6c 100644 --- a/packages/puppeteer-core/src/bidi/ExposedFunction.ts +++ b/packages/puppeteer-core/src/bidi/ExposedFunction.ts @@ -67,15 +67,9 @@ export class ExposeableFunction { this.#apply = apply; this.#channels = { - args: `__puppeteer__${this.#frame._id}_page_exposeFunction_${ - this.name - }_args`, - resolve: `__puppeteer__${this.#frame._id}_page_exposeFunction_${ - this.name - }_resolve`, - reject: `__puppeteer__${this.#frame._id}_page_exposeFunction_${ - this.name - }_reject`, + args: `__puppeteer__${this.#frame._id}_page_exposeFunction_${this.name}_args`, + resolve: `__puppeteer__${this.#frame._id}_page_exposeFunction_${this.name}_resolve`, + reject: `__puppeteer__${this.#frame._id}_page_exposeFunction_${this.name}_reject`, }; } diff --git a/packages/puppeteer-core/src/cdp/CDPSession.ts b/packages/puppeteer-core/src/cdp/CDPSession.ts index 1666f8ac2e6..a29e4e50c33 100644 --- a/packages/puppeteer-core/src/cdp/CDPSession.ts +++ b/packages/puppeteer-core/src/cdp/CDPSession.ts @@ -96,9 +96,7 @@ export class CdpCDPSession extends CDPSession { if (!this.#connection) { return Promise.reject( new TargetCloseError( - `Protocol error (${method}): Session closed. Most likely the ${ - this.#targetType - } has been closed.` + `Protocol error (${method}): Session closed. Most likely the ${this.#targetType} has been closed.` ) ); } @@ -145,9 +143,7 @@ export class CdpCDPSession extends CDPSession { override async detach(): Promise { if (!this.#connection) { throw new Error( - `Session already detached. Most likely the ${ - this.#targetType - } has been closed.` + `Session already detached. Most likely the ${this.#targetType} has been closed.` ); } await this.#connection.send('Target.detachFromTarget', { diff --git a/packages/puppeteer-core/src/common/types.ts b/packages/puppeteer-core/src/common/types.ts index 572ff23a704..7fc6e6c1d1a 100644 --- a/packages/puppeteer-core/src/common/types.ts +++ b/packages/puppeteer-core/src/common/types.ts @@ -107,8 +107,8 @@ export type ElementFor< > = TagName extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[TagName] : TagName extends keyof SVGElementTagNameMap - ? SVGElementTagNameMap[TagName] - : never; + ? SVGElementTagNameMap[TagName] + : never; /** * @public diff --git a/test/src/golden-utils.ts b/test/src/golden-utils.ts index 00ad18b4404..279daa2a350 100644 --- a/test/src/golden-utils.ts +++ b/test/src/golden-utils.ts @@ -97,8 +97,8 @@ const compareText = ( text += change.added ? `${change.value}` : change.removed - ? `${change.value}` - : change.value; + ? `${change.value}` + : change.value; return text; }, `