Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore: remove puppeteer-web (#5750)
We don't support it and v3 shipped without including puppeteer-web in the browser. People are welcome to manually use Browserify to try to get Puppeteer running in a browser but it ultimately isn't our primary focus right now.

Getting puppeteer-core able to run in a browser is something we'll be looking at in the future so we'll revisit this soon.
  • Loading branch information
jackfranklin committed Apr 27, 2020
1 parent 1358b45 commit 3ed2f6b
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 141 deletions.
2 changes: 0 additions & 2 deletions index.js
Expand Up @@ -18,15 +18,13 @@ const {helper} = require('./lib/helper');
const api = require('./lib/api');
const {Page} = require('./lib/Page');
for (const className in api) {
// Puppeteer-web excludes certain classes from bundle, e.g. BrowserFetcher.
if (typeof api[className] === 'function')
helper.installAsyncStackHooks(api[className]);
}

// Expose alias for deprecated method.
Page.prototype.emulateMedia = Page.prototype.emulateMediaType;

// If node does not support async await, use the compiled version.
const Puppeteer = require('./lib/Puppeteer');
const packageJson = require('./package.json');
let preferredRevision = packageJson.puppeteer.chromium_revision;
Expand Down
6 changes: 0 additions & 6 deletions mocha-config/browser-bundle-tests.js

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -27,9 +27,7 @@
"doc": "node utils/doclint/cli.js",
"tsc": "tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/",
"apply-next-version": "node utils/apply_next_version.js",
"bundle": "npm run tsc && npx browserify -r ./index.js:puppeteer -o utils/browser/puppeteer-web.js",
"test-types": "node utils/doclint/generate_types && tsc --version && tsc -p utils/doclint/generate_types/test/",
"unit-bundle": "mocha --config mocha-config/browser-bundle-tests.js",
"update-protocol-d-ts": "node utils/protocol-types-generator",
"test-install": "scripts/test-install.sh"
},
Expand Down
4 changes: 1 addition & 3 deletions travis/chromium.sh
Expand Up @@ -3,6 +3,4 @@
npm run lint &&
npm run coverage &&
npm run test-doclint &&
npm run test-types &&
npm run bundle &&
npm run unit-bundle
npm run test-types
37 changes: 0 additions & 37 deletions utils/browser/README.md

This file was deleted.

1 change: 0 additions & 1 deletion utils/browser/WebSocket.js

This file was deleted.

90 changes: 0 additions & 90 deletions utils/browser/browser.spec.js

This file was deleted.

0 comments on commit 3ed2f6b

Please sign in to comment.