mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: upgrade and pin prettier dependencies (#7232)
We're seeing odd failures with Prettier on some CI branches; my hunch is that they are installing different versions of the package and therefore getting formatting conflicts. This PR updates them all and pins them to specific versions - something we should probably consider generally, or remove our `package-lock.json` from the gitignore.
This commit is contained in:
@@ -222,11 +222,9 @@ function loadFromJSONV1(json) {
|
||||
|
||||
const result = {};
|
||||
result.type = /** @type {string} */ (parseValue(json, 'type', 'string'));
|
||||
result.userAgent = /** @type {string} */ (parseValue(
|
||||
json,
|
||||
'user-agent',
|
||||
'string'
|
||||
));
|
||||
result.userAgent = /** @type {string} */ (
|
||||
parseValue(json, 'user-agent', 'string')
|
||||
);
|
||||
|
||||
const capabilities = parseValue(json, 'capabilities', 'object', []);
|
||||
if (!Array.isArray(capabilities))
|
||||
@@ -238,11 +236,9 @@ function loadFromJSONV1(json) {
|
||||
result.capabilities.push(capabilities[i]);
|
||||
}
|
||||
|
||||
result.deviceScaleFactor = /** @type {number} */ (parseValue(
|
||||
json['screen'],
|
||||
'device-pixel-ratio',
|
||||
'number'
|
||||
));
|
||||
result.deviceScaleFactor = /** @type {number} */ (
|
||||
parseValue(json['screen'], 'device-pixel-ratio', 'number')
|
||||
);
|
||||
if (result.deviceScaleFactor < 0 || result.deviceScaleFactor > 100)
|
||||
throw new Error(
|
||||
'Emulated device has wrong deviceScaleFactor: ' + result.deviceScaleFactor
|
||||
|
||||
Reference in New Issue
Block a user