fix: add browsers entry point (#9846)

This commit is contained in:
Alex Rudenko 2023-03-14 13:23:42 +01:00 committed by GitHub
parent dec48a9592
commit 1a1e79d046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -11,6 +11,13 @@
"bin": {
"@puppeteer/browsers": "lib/cjs/browsers.js"
},
"main": "./lib/cjs/main.js",
"exports": {
".": {
"import": "./lib/esm/main.js",
"require": "./lib/cjs/main.js"
}
},
"wireit": {
"build": {
"command": "tsc -b && chmod a+x lib/cjs/browsers.js lib/esm/browsers.js",

View File

@ -21,8 +21,7 @@ import https from 'https';
import os from 'os';
import path from 'path';
import {Browser, BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
import {fetch, canFetch} from '../../lib/cjs/fetch.js';
import {fetch, canFetch, Browser, BrowserPlatform} from '../../lib/cjs/main.js';
import {testChromeBuildId, testFirefoxBuildId} from './versions.js';

View File

@ -19,13 +19,14 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
import {Browser, BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
import {fetch} from '../../lib/cjs/fetch.js';
import {
CDP_WEBSOCKET_ENDPOINT_REGEX,
computeExecutablePath,
launch,
} from '../../lib/cjs/launcher.js';
fetch,
Browser,
BrowserPlatform,
} from '../../lib/cjs/main.js';
import {testChromeBuildId, testFirefoxBuildId} from './versions.js';