Socket
Socket
Sign inDemoInstall

@puppeteer/browsers

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@puppeteer/browsers - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

12

lib/cjs/browser-data/browser-data.js

@@ -81,3 +81,3 @@ "use strict";

case types_js_1.BrowserTag.STABLE:
throw new Error(`${tag} is not supported for ${browser}`);
throw new Error(`${tag} is not supported for ${browser}. Use 'latest' instead.`);
}

@@ -112,11 +112,8 @@ case types_js_1.Browser.CHROME:

case types_js_1.BrowserTag.LATEST:
return await chromium.resolveBuildId(platform, 'latest');
return await chromium.resolveBuildId(platform);
case types_js_1.BrowserTag.BETA:
return await chromium.resolveBuildId(platform, types_js_1.ChromeReleaseChannel.BETA);
case types_js_1.BrowserTag.CANARY:
return await chromium.resolveBuildId(platform, types_js_1.ChromeReleaseChannel.CANARY);
case types_js_1.BrowserTag.DEV:
return await chromium.resolveBuildId(platform, types_js_1.ChromeReleaseChannel.DEV);
case types_js_1.BrowserTag.STABLE:
return await chromium.resolveBuildId(platform, types_js_1.ChromeReleaseChannel.STABLE);
throw new Error(`${tag} is not supported for ${browser}. Use 'latest' instead.`);
}

@@ -148,6 +145,5 @@ }

case types_js_1.Browser.FIREFOX:
case types_js_1.Browser.CHROMIUM:
throw new Error(`System browser detection is not supported for ${browser} yet.`);
case types_js_1.Browser.CHROME:
return chromium.resolveSystemExecutablePath(platform, channel);
case types_js_1.Browser.CHROMIUM:
return chrome.resolveSystemExecutablePath(platform, channel);

@@ -154,0 +150,0 @@ }

@@ -16,8 +16,7 @@ /**

*/
import { BrowserPlatform, ChromeReleaseChannel } from './types.js';
export { resolveSystemExecutablePath } from './chrome.js';
import { BrowserPlatform } from './types.js';
export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
export declare function resolveBuildId(platform: BrowserPlatform, channel?: ChromeReleaseChannel | 'latest'): Promise<string>;
export declare function resolveBuildId(platform: BrowserPlatform): Promise<string>;
//# sourceMappingURL=chromium.d.ts.map

@@ -21,9 +21,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = exports.resolveSystemExecutablePath = void 0;
exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
const path_1 = __importDefault(require("path"));
const httpUtil_js_1 = require("../httpUtil.js");
const chrome_js_1 = require("./chrome.js");
const types_js_1 = require("./types.js");
var chrome_js_2 = require("./chrome.js");
Object.defineProperty(exports, "resolveSystemExecutablePath", { enumerable: true, get: function () { return chrome_js_2.resolveSystemExecutablePath; } });
function archive(platform, buildId) {

@@ -77,9 +74,6 @@ switch (platform) {

exports.relativeExecutablePath = relativeExecutablePath;
async function resolveBuildId(platform, channel = 'latest') {
if (channel === 'latest') {
return await (0, httpUtil_js_1.getText)(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
return (await (0, chrome_js_1.getLastKnownGoodReleaseForChannel)(channel)).revision;
async function resolveBuildId(platform) {
return await (0, httpUtil_js_1.getText)(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
exports.resolveBuildId = resolveBuildId;
//# sourceMappingURL=chromium.js.map

@@ -211,3 +211,4 @@ "use strict";

}, _CLI_parseBuildId = function _CLI_parseBuildId(version) {
return version.split('@').pop() ?? 'latest';
const parts = version.split('@');
return parts.length === 2 ? parts[1] : 'latest';
};

@@ -214,0 +215,0 @@ /**

@@ -53,3 +53,3 @@ /**

case BrowserTag.STABLE:
throw new Error(`${tag} is not supported for ${browser}`);
throw new Error(`${tag} is not supported for ${browser}. Use 'latest' instead.`);
}

@@ -84,11 +84,8 @@ case Browser.CHROME:

case BrowserTag.LATEST:
return await chromium.resolveBuildId(platform, 'latest');
return await chromium.resolveBuildId(platform);
case BrowserTag.BETA:
return await chromium.resolveBuildId(platform, ChromeReleaseChannel.BETA);
case BrowserTag.CANARY:
return await chromium.resolveBuildId(platform, ChromeReleaseChannel.CANARY);
case BrowserTag.DEV:
return await chromium.resolveBuildId(platform, ChromeReleaseChannel.DEV);
case BrowserTag.STABLE:
return await chromium.resolveBuildId(platform, ChromeReleaseChannel.STABLE);
throw new Error(`${tag} is not supported for ${browser}. Use 'latest' instead.`);
}

@@ -118,6 +115,5 @@ }

case Browser.FIREFOX:
case Browser.CHROMIUM:
throw new Error(`System browser detection is not supported for ${browser} yet.`);
case Browser.CHROME:
return chromium.resolveSystemExecutablePath(platform, channel);
case Browser.CHROMIUM:
return chrome.resolveSystemExecutablePath(platform, channel);

@@ -124,0 +120,0 @@ }

@@ -16,8 +16,7 @@ /**

*/
import { BrowserPlatform, ChromeReleaseChannel } from './types.js';
export { resolveSystemExecutablePath } from './chrome.js';
import { BrowserPlatform } from './types.js';
export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
export declare function resolveBuildId(platform: BrowserPlatform, channel?: ChromeReleaseChannel | 'latest'): Promise<string>;
export declare function resolveBuildId(platform: BrowserPlatform): Promise<string>;
//# sourceMappingURL=chromium.d.ts.map

@@ -18,5 +18,3 @@ /**

import { getText } from '../httpUtil.js';
import { getLastKnownGoodReleaseForChannel } from './chrome.js';
import { BrowserPlatform } from './types.js';
export { resolveSystemExecutablePath } from './chrome.js';
function archive(platform, buildId) {

@@ -67,8 +65,5 @@ switch (platform) {

}
export async function resolveBuildId(platform, channel = 'latest') {
if (channel === 'latest') {
return await getText(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
return (await getLastKnownGoodReleaseForChannel(channel)).revision;
export async function resolveBuildId(platform) {
return await getText(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
}
//# sourceMappingURL=chromium.js.map

@@ -181,3 +181,4 @@ /**

}, _CLI_parseBuildId = function _CLI_parseBuildId(version) {
return version.split('@').pop() ?? 'latest';
const parts = version.split('@');
return parts.length === 2 ? parts[1] : 'latest';
};

@@ -184,0 +185,0 @@ /**

{
"name": "@puppeteer/browsers",
"version": "1.4.3",
"version": "1.4.4",
"description": "Download and launch browsers",

@@ -105,3 +105,3 @@ "scripts": {

"proxy-agent": "6.2.1",
"tar-fs": "3.0.3",
"tar-fs": "3.0.4",
"unbzip2-stream": "1.4.3",

@@ -108,0 +108,0 @@ "yargs": "17.7.1"

@@ -71,3 +71,5 @@ /**

case BrowserTag.STABLE:
throw new Error(`${tag} is not supported for ${browser}`);
throw new Error(
`${tag} is not supported for ${browser}. Use 'latest' instead.`
);
}

@@ -117,22 +119,9 @@ case Browser.CHROME:

case BrowserTag.LATEST:
return await chromium.resolveBuildId(platform, 'latest');
return await chromium.resolveBuildId(platform);
case BrowserTag.BETA:
return await chromium.resolveBuildId(
platform,
ChromeReleaseChannel.BETA
);
case BrowserTag.CANARY:
return await chromium.resolveBuildId(
platform,
ChromeReleaseChannel.CANARY
);
case BrowserTag.DEV:
return await chromium.resolveBuildId(
platform,
ChromeReleaseChannel.DEV
);
case BrowserTag.STABLE:
return await chromium.resolveBuildId(
platform,
ChromeReleaseChannel.STABLE
throw new Error(
`${tag} is not supported for ${browser}. Use 'latest' instead.`
);

@@ -172,2 +161,3 @@ }

case Browser.FIREFOX:
case Browser.CHROMIUM:
throw new Error(

@@ -177,6 +167,4 @@ `System browser detection is not supported for ${browser} yet.`

case Browser.CHROME:
return chromium.resolveSystemExecutablePath(platform, channel);
case Browser.CHROMIUM:
return chrome.resolveSystemExecutablePath(platform, channel);
}
}

@@ -21,7 +21,4 @@ /**

import {getLastKnownGoodReleaseForChannel} from './chrome.js';
import {BrowserPlatform, ChromeReleaseChannel} from './types.js';
import {BrowserPlatform} from './types.js';
export {resolveSystemExecutablePath} from './chrome.js';
function archive(platform: BrowserPlatform, buildId: string): string {

@@ -93,15 +90,11 @@ switch (platform) {

export async function resolveBuildId(
platform: BrowserPlatform,
channel: ChromeReleaseChannel | 'latest' = 'latest'
platform: BrowserPlatform
): Promise<string> {
if (channel === 'latest') {
return await getText(
new URL(
`https://storage.googleapis.com/chromium-browser-snapshots/${folder(
platform
)}/LAST_CHANGE`
)
);
}
return (await getLastKnownGoodReleaseForChannel(channel)).revision;
return await getText(
new URL(
`https://storage.googleapis.com/chromium-browser-snapshots/${folder(
platform
)}/LAST_CHANGE`
)
);
}

@@ -277,3 +277,4 @@ /**

#parseBuildId(version: string): string {
return version.split('@').pop() ?? 'latest';
const parts = version.split('@');
return parts.length === 2 ? parts[1]! : 'latest';
}

@@ -280,0 +281,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc