Skip to content

Commit

Permalink
Revert "fix(puppeteer): export internals (#7991)"
Browse files Browse the repository at this point in the history
This reverts commit 448118c.
  • Loading branch information
OrKoN committed Feb 10, 2022
1 parent 448118c commit 499f692
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
10 changes: 2 additions & 8 deletions package.json
Expand Up @@ -5,14 +5,8 @@
"type": "commonjs",
"main": "./cjs-entry.js",
"exports": {
".": {
"import": "./lib/esm/puppeteer/node.js",
"require": "./cjs-entry.js"
},
"./*": {
"import": "./*",
"require": "./*"
}
"import": "./lib/esm/puppeteer/node.js",
"require": "./cjs-entry.js"
},
"types": "lib/types.d.ts",
"repository": "github:puppeteer/puppeteer",
Expand Down
9 changes: 2 additions & 7 deletions scripts/test-install.sh
Expand Up @@ -14,9 +14,6 @@ cd $TMPDIR
# 3. Requiring Puppeteer from Node works.
npm install --loglevel silent "${tarball}"
node --eval="require('puppeteer')"
node --eval="
require('puppeteer/lib/cjs/puppeteer/revisions.js');
"
ls $TMPDIR/node_modules/puppeteer/.local-chromium/

# Testing ES module features
Expand All @@ -25,9 +22,8 @@ cd $TMPDIR
echo '{"type":"module"}' >>$TMPDIR/package.json
npm install --loglevel silent "${tarball}"
node --input-type="module" --eval="import puppeteer from 'puppeteer'"
node --input-type="module" --eval="
import 'puppeteer/lib/esm/puppeteer/revisions.js';
"
ls $TMPDIR/node_modules/puppeteer/.local-chromium/

node --input-type="module" --eval="
import puppeteer from 'puppeteer';
Expand All @@ -39,7 +35,6 @@ import puppeteer from 'puppeteer';
await browser.close();
})();
"
ls $TMPDIR/node_modules/puppeteer/.local-chromium/

# Again for Firefox
TMPDIR="$(mktemp -d)"
Expand Down
3 changes: 1 addition & 2 deletions utils/prepare_puppeteer_core.js
Expand Up @@ -25,6 +25,5 @@ delete json.scripts.install;

json.name = 'puppeteer-core';
json.main = './cjs-entry-core.js';
json.exports['.'].imports = './lib/esm/puppeteer/node-puppeteer-core.js';
json.exports['.'].require = './cjs-entry-core.js';
json.exports.import = './lib/esm/puppeteer/node-puppeteer-core.js';
fs.writeFileSync(packagePath, JSON.stringify(json, null, ' '));

0 comments on commit 499f692

Please sign in to comment.