mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: rename browsers folders and files (#9866)
This commit is contained in:
parent
16b39de5ca
commit
64cf9db602
@ -9,7 +9,7 @@
|
||||
"test": "wireit"
|
||||
},
|
||||
"bin": {
|
||||
"@puppeteer/browsers": "lib/cjs/browsers.js"
|
||||
"@puppeteer/browsers": "lib/cjs/main-cli.js"
|
||||
},
|
||||
"main": "./lib/cjs/main.js",
|
||||
"exports": {
|
||||
@ -20,7 +20,7 @@
|
||||
},
|
||||
"wireit": {
|
||||
"build": {
|
||||
"command": "tsc -b && chmod a+x lib/cjs/browsers.js lib/esm/browsers.js",
|
||||
"command": "tsc -b && chmod a+x lib/cjs/main-cli.js lib/esm/main-cli.js",
|
||||
"files": [
|
||||
"src/**/*.ts",
|
||||
"tsconfig.json"
|
||||
|
@ -18,12 +18,12 @@ import ProgressBar from 'progress';
|
||||
import yargs from 'yargs';
|
||||
import {hideBin} from 'yargs/helpers';
|
||||
|
||||
import {resolveBuildId} from './browsers/browsers.js';
|
||||
import {
|
||||
resolveBuildId,
|
||||
Browser,
|
||||
BrowserPlatform,
|
||||
ChromeReleaseChannel,
|
||||
} from './browsers/types.js';
|
||||
} from './browser-data/browser-data.js';
|
||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||
import {fetch} from './fetch.js';
|
||||
import {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import {Browser, BrowserPlatform} from './browsers/types.js';
|
||||
import {Browser, BrowserPlatform} from './browser-data/browser-data.js';
|
||||
|
||||
/**
|
||||
* The cache used by Puppeteer relies on the following structure:
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import os from 'os';
|
||||
|
||||
import {BrowserPlatform} from './browsers/browsers.js';
|
||||
import {BrowserPlatform} from './browser-data/browser-data.js';
|
||||
|
||||
export function detectBrowserPlatform(): BrowserPlatform | undefined {
|
||||
const platform = os.platform();
|
||||
|
@ -20,7 +20,11 @@ import {mkdir, unlink} from 'fs/promises';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
import {Browser, BrowserPlatform, downloadUrls} from './browsers/browsers.js';
|
||||
import {
|
||||
Browser,
|
||||
BrowserPlatform,
|
||||
downloadUrls,
|
||||
} from './browser-data/browser-data.js';
|
||||
import {CacheStructure} from './CacheStructure.js';
|
||||
import {debug} from './debug.js';
|
||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||
|
@ -25,8 +25,8 @@ import {
|
||||
BrowserPlatform,
|
||||
executablePathByBrowser,
|
||||
resolveSystemExecutablePath,
|
||||
} from './browsers/browsers.js';
|
||||
import {ChromeReleaseChannel} from './browsers/types.js';
|
||||
ChromeReleaseChannel,
|
||||
} from './browser-data/browser-data.js';
|
||||
import {CacheStructure} from './CacheStructure.js';
|
||||
import {debug} from './debug.js';
|
||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||
|
@ -27,4 +27,5 @@ export {
|
||||
Browser,
|
||||
BrowserPlatform,
|
||||
ChromeReleaseChannel,
|
||||
} from './browsers/browsers.js';
|
||||
} from './browser-data/browser-data.js';
|
||||
export {CLI} from './CLI.js';
|
||||
|
@ -17,13 +17,15 @@
|
||||
import assert from 'assert';
|
||||
import path from 'path';
|
||||
|
||||
import {BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
|
||||
import {
|
||||
BrowserPlatform,
|
||||
ChromeReleaseChannel,
|
||||
} from '../../lib/cjs/browser-data/browser-data.js';
|
||||
import {
|
||||
resolveDownloadUrl,
|
||||
relativeExecutablePath,
|
||||
resolveSystemExecutablePath,
|
||||
} from '../../lib/cjs/browsers/chrome.js';
|
||||
import {ChromeReleaseChannel} from '../../lib/cjs/browsers/types.js';
|
||||
} from '../../lib/cjs/browser-data/chrome.js';
|
||||
|
||||
describe('Chrome', () => {
|
||||
it('should resolve download URLs', () => {
|
||||
|
@ -21,12 +21,12 @@ import path from 'path';
|
||||
|
||||
import rimraf from 'rimraf';
|
||||
|
||||
import {BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
|
||||
import {BrowserPlatform} from '../../lib/cjs/browser-data/browser-data.js';
|
||||
import {
|
||||
createProfile,
|
||||
relativeExecutablePath,
|
||||
resolveDownloadUrl,
|
||||
} from '../../lib/cjs/browsers/firefox.js';
|
||||
} from '../../lib/cjs/browser-data/firefox.js';
|
||||
|
||||
describe('Firefox', () => {
|
||||
it('should resolve download URLs', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user