mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: remove "module" from @puppeteer/browsers (#10986)
This commit is contained in:
parent
4ca36454c3
commit
86c28edadd
2
.github/workflows/issue-analyzer.yml
vendored
2
.github/workflows/issue-analyzer.yml
vendored
@ -94,7 +94,7 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
- name: Install dependencies Firefox
|
||||
run: node ./node_modules/puppeteer/install.js
|
||||
run: node ./node_modules/puppeteer/install.mjs
|
||||
env:
|
||||
PUPPETEER_PRODUCT: firefox
|
||||
- name: Verify issue
|
||||
|
1
package-lock.json
generated
1
package-lock.json
generated
@ -11015,6 +11015,7 @@
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"tools/mocha-runner": {
|
||||
"name": "@puppeteer/mocha-runner",
|
||||
"version": "0.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
|
@ -8,15 +8,12 @@
|
||||
"clean": "../../tools/clean.js",
|
||||
"test": "wireit"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"bin": "lib/cjs/main-cli.js",
|
||||
"main": "./lib/cjs/main.js",
|
||||
"module": "./lib/esm/main.js",
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./lib/esm/main.js",
|
||||
"require": "./lib/cjs/main.js"
|
||||
}
|
||||
},
|
||||
"wireit": {
|
||||
"build": {
|
||||
|
22
packages/puppeteer/install.js → packages/puppeteer/install.mjs
Normal file → Executable file
22
packages/puppeteer/install.js → packages/puppeteer/install.mjs
Normal file → Executable file
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Copyright 2017 Google Inc. All rights reserved.
|
||||
*
|
||||
@ -24,20 +26,18 @@
|
||||
* necessary.
|
||||
*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Need to ensure TS is compiled before loading the installer
|
||||
if (!fs.existsSync(path.join(__dirname, 'lib'))) {
|
||||
try {
|
||||
const {downloadBrowser} = await (async () => {
|
||||
try {
|
||||
return await import('puppeteer/internal/node/install.js');
|
||||
} catch {
|
||||
console.warn(
|
||||
'Skipping browser installation because the Puppeteer build is not available. Run `npm install` again after you have re-built Puppeteer.'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
try {
|
||||
const {downloadBrowser} = require('puppeteer/internal/node/install.js');
|
||||
}
|
||||
})();
|
||||
downloadBrowser();
|
||||
} catch (err) {
|
||||
console.warn('Browser download failed', err);
|
||||
} catch (error) {
|
||||
console.warn('Browser download failed', error);
|
||||
}
|
@ -37,7 +37,7 @@
|
||||
"build:docs": "wireit",
|
||||
"build": "wireit",
|
||||
"clean": "../../tools/clean.js",
|
||||
"postinstall": "node install.js",
|
||||
"postinstall": "node install.mjs",
|
||||
"prepack": "wireit"
|
||||
},
|
||||
"wireit": {
|
||||
@ -111,7 +111,7 @@
|
||||
"files": [
|
||||
"lib",
|
||||
"src",
|
||||
"install.js",
|
||||
"install.mjs",
|
||||
"!*.test.js",
|
||||
"!*.test.d.ts",
|
||||
"!*.test.js.map",
|
||||
|
Loading…
Reference in New Issue
Block a user