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"
|
"test": "wireit"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"@puppeteer/browsers": "lib/cjs/browsers.js"
|
"@puppeteer/browsers": "lib/cjs/main-cli.js"
|
||||||
},
|
},
|
||||||
"main": "./lib/cjs/main.js",
|
"main": "./lib/cjs/main.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"wireit": {
|
"wireit": {
|
||||||
"build": {
|
"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": [
|
"files": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
"tsconfig.json"
|
"tsconfig.json"
|
||||||
|
@ -18,12 +18,12 @@ import ProgressBar from 'progress';
|
|||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
import {hideBin} from 'yargs/helpers';
|
import {hideBin} from 'yargs/helpers';
|
||||||
|
|
||||||
import {resolveBuildId} from './browsers/browsers.js';
|
|
||||||
import {
|
import {
|
||||||
|
resolveBuildId,
|
||||||
Browser,
|
Browser,
|
||||||
BrowserPlatform,
|
BrowserPlatform,
|
||||||
ChromeReleaseChannel,
|
ChromeReleaseChannel,
|
||||||
} from './browsers/types.js';
|
} from './browser-data/browser-data.js';
|
||||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||||
import {fetch} from './fetch.js';
|
import {fetch} from './fetch.js';
|
||||||
import {
|
import {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import path from 'path';
|
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:
|
* The cache used by Puppeteer relies on the following structure:
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
|
||||||
import {BrowserPlatform} from './browsers/browsers.js';
|
import {BrowserPlatform} from './browser-data/browser-data.js';
|
||||||
|
|
||||||
export function detectBrowserPlatform(): BrowserPlatform | undefined {
|
export function detectBrowserPlatform(): BrowserPlatform | undefined {
|
||||||
const platform = os.platform();
|
const platform = os.platform();
|
||||||
|
@ -20,7 +20,11 @@ import {mkdir, unlink} from 'fs/promises';
|
|||||||
import os from 'os';
|
import os from 'os';
|
||||||
import path from 'path';
|
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 {CacheStructure} from './CacheStructure.js';
|
||||||
import {debug} from './debug.js';
|
import {debug} from './debug.js';
|
||||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||||
|
@ -25,8 +25,8 @@ import {
|
|||||||
BrowserPlatform,
|
BrowserPlatform,
|
||||||
executablePathByBrowser,
|
executablePathByBrowser,
|
||||||
resolveSystemExecutablePath,
|
resolveSystemExecutablePath,
|
||||||
} from './browsers/browsers.js';
|
ChromeReleaseChannel,
|
||||||
import {ChromeReleaseChannel} from './browsers/types.js';
|
} from './browser-data/browser-data.js';
|
||||||
import {CacheStructure} from './CacheStructure.js';
|
import {CacheStructure} from './CacheStructure.js';
|
||||||
import {debug} from './debug.js';
|
import {debug} from './debug.js';
|
||||||
import {detectBrowserPlatform} from './detectPlatform.js';
|
import {detectBrowserPlatform} from './detectPlatform.js';
|
||||||
|
@ -27,4 +27,5 @@ export {
|
|||||||
Browser,
|
Browser,
|
||||||
BrowserPlatform,
|
BrowserPlatform,
|
||||||
ChromeReleaseChannel,
|
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 assert from 'assert';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import {BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
|
import {
|
||||||
|
BrowserPlatform,
|
||||||
|
ChromeReleaseChannel,
|
||||||
|
} from '../../lib/cjs/browser-data/browser-data.js';
|
||||||
import {
|
import {
|
||||||
resolveDownloadUrl,
|
resolveDownloadUrl,
|
||||||
relativeExecutablePath,
|
relativeExecutablePath,
|
||||||
resolveSystemExecutablePath,
|
resolveSystemExecutablePath,
|
||||||
} from '../../lib/cjs/browsers/chrome.js';
|
} from '../../lib/cjs/browser-data/chrome.js';
|
||||||
import {ChromeReleaseChannel} from '../../lib/cjs/browsers/types.js';
|
|
||||||
|
|
||||||
describe('Chrome', () => {
|
describe('Chrome', () => {
|
||||||
it('should resolve download URLs', () => {
|
it('should resolve download URLs', () => {
|
||||||
|
@ -21,12 +21,12 @@ import path from 'path';
|
|||||||
|
|
||||||
import rimraf from 'rimraf';
|
import rimraf from 'rimraf';
|
||||||
|
|
||||||
import {BrowserPlatform} from '../../lib/cjs/browsers/browsers.js';
|
import {BrowserPlatform} from '../../lib/cjs/browser-data/browser-data.js';
|
||||||
import {
|
import {
|
||||||
createProfile,
|
createProfile,
|
||||||
relativeExecutablePath,
|
relativeExecutablePath,
|
||||||
resolveDownloadUrl,
|
resolveDownloadUrl,
|
||||||
} from '../../lib/cjs/browsers/firefox.js';
|
} from '../../lib/cjs/browser-data/firefox.js';
|
||||||
|
|
||||||
describe('Firefox', () => {
|
describe('Firefox', () => {
|
||||||
it('should resolve download URLs', () => {
|
it('should resolve download URLs', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user