Commit Graph

29 Commits

Author SHA1 Message Date
Stephan Rodemeier
11afadc680 fix: Respect the loglevel for logging (#4014)
This adds support for disabling console.log on CI and when
the loglevel asks for it.
2019-03-19 11:27:42 -07:00
jxltom
c185eeef61 feat(install): support configurations in package.json (#3449)
This PR support set ```puppeteer_skip_chromium_download```, ```puppeteer_download_host``` and ```puppeteer_chromium_revision``` in ```config``` of ```package.json```

Fixes #2262
2018-11-14 11:41:51 -08:00
Andrey Lushnikov
81d42c4688
feat: prepare for publishing puppeteer-core (#3047) 2018-08-08 15:14:23 -07:00
Joel Einbinder
c9a843baa0 chore(types): generate protocol.d.ts on install (#2625)
Previously protocol.d.ts was generated on `npm run tsc`. This was inconvenient because it meant that vscode checking was wrong until type checking was run manually, and was inefficient because it necessarily regenerated the types even if no new Chromium was downloaded. This patch generates the types when npm install is run from the github checkout, assuming a new Chromium revision was downloaded.
2018-05-29 15:23:32 -07:00
Andrey Rublev
8b0fd0ae4a feat(install): support npm config for chromium revision (#2290)
This patch:
- adds `npm_config_puppeteer_chromium_revision` support
- clarifies api documentation about variables from npm config
2018-03-30 10:49:48 -07:00
Glenn Vandamme
506103556b feat(install): introduce PUPPETEER_CHROMIUM_REVISION (#2246)
This patch introduces PUPPETEER_CHROMIUM_REVISION environment variable
to specify chromium revision to be downloaded during install step.
2018-03-29 10:46:00 -07:00
Andrey Lushnikov
a363a733b7
feat: Introduce BrowserFetcher class (#1983)
This patch introduces `BrowserFetcher` class that manages
downloaded versions of products.

This patch:
- shapes Downloader API to be minimal yet usable for our needs. This
  includes removing such methods as `Downloader.supportedPlatforms` and
  `Downloader.defaultRevision`.
- makes most of the fs-related methods in Downloader async. The only
  exception is the `Downloader.revisionInfo`: it has stay sync due to the
  `pptr.executablePath()` method being sync.
- updates `install.js` and `utils/check_availability.js` to use new API
- finally, renames `Downloader` into `BrowserFetcher`

Fixes #1748.
2018-02-07 12:31:53 -05:00
Andrey Lushnikov
f19e2ade0d
feat(install): build node6 support when installing from github (#1562)
This patch starts building node6 support if puppeteer is installed from
github directly and is run under Node 6.
2017-12-08 16:53:12 -08:00
Andrey Lushnikov
9a5086847c
refactor: move ChromiumDownloader under lib/ (#1554)
This patch:
- renames ChromiumDownloader into just Downloader (this is in
  preparation for different products download)
- moves Downloader from utils/ to lib/. This unifies all of the
  production-critical code in the lib/.

Drive-by: make Downloader a regular class.
2017-12-08 13:39:13 -08:00
Tomas Alabes
73f5b806a3 fix(install): support for npm no_proxy (#1314)
This patch adds support for npm `no_proxy` configuration for the installation script.
2017-11-07 20:16:22 -08:00
r3dDoX
945a826a0b feat(install): add environment variable to overwrite host part of url (#958)
This patch adds PUPPETEER_DOWNLOAD_HOST env variable that allows to specify a download host. Useful for downloading from mirrors.

Fixes #951
2017-10-21 18:22:13 -07:00
gordomium
2babcb0021 [feat] Support PUPPETEER_SKIP_CHROMIUM_DOWNLOAD in npmrc
This patch adds support for PUPPETEER_SKIP_CHROMIUM_DOWNLOAD
variable in npm config.

This aligns the variable with the rest of supported environment variables.
2017-09-26 11:10:46 +09:00
Andrey Lushnikov
b8bb80a089 support npm proxy configuration for the installation script (#692)
This patch starts supporting NPM proxy configuration in the installation script.
If both NPM proxy and environment proxy are set, NPM proxy settings are preferred.

Fixes #648
2017-09-08 23:37:22 -07:00
Andrey Lushnikov
e12ce802cd Output path as chromium gets successfully downloaded (#689)
Fixes #679.
2017-09-05 18:41:21 -07:00
Andrey Lushnikov
9d0ad79b47 fail installation when puppeteer errors downloading chromium (#654)
This patch starts failing npm installation when puppeteer errors downloading chromium.
2017-09-01 20:59:28 -07:00
Andrey Lushnikov
9d7929cd36 Add environment variable to skip download (#606)
This patch:
- starts skipping chromium download if `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` env variable is set
- adds description of support env variables to the `docs/api.md`.

References #603
2017-08-30 21:40:15 -07:00
Eric Bidelman
1f9b4fb4c8 Change let into const (#457)
This patch:
- changes `let` into `const` throughout codebase
- adds eslint check to prefer const over let
2017-08-21 16:39:04 -07:00
Andrey Lushnikov
c1731dd5d7 Fail gracefully when chromium failed to download (#430)
Fail gracefully when chromium failed to download

This patch changes both install.js and Launcher.js to inform how
chromium could be downloaded manually.
2017-08-21 13:34:10 -07:00
Piper Chester
ad1b292b6d install.js: refactor to template string (#340) 2017-08-17 11:56:11 -07:00
JoelEinbinder
5d647bf1fa Use const a lot fo places (#188) 2017-08-02 12:06:47 -07:00
Andrey Lushnikov
20fb1f6b9b [Downloader] Remove previous chromium revisions after roll
Currently, after the chromium was rolled to a new revision, the
previsious revision is kept downloaded in the puppeteer folder.

Since every revision is ~70Mb, it quickly piles up.

This patch removes previous downloaded chromium revisions after
a new one is successfully installed.
2017-07-12 14:48:42 -07:00
Andrey Lushnikov
819fa355f4 Convert var's to let's
This patch:
- converts all var's to let's throughout the codebase
- enforces the let's over var's via the eslint rule
2017-06-22 14:58:39 -07:00
Pavel Feldman
437a93b26e Reformat code using 2 spaces 2017-06-21 14:11:52 -07:00
Pavel Feldman
84bc09bce1 Revert "Reformat codebase into 2-spaces"
This reverts commit d0d1ee303e.
2017-06-21 14:11:52 -07:00
Andrey Lushnikov
448ac4ce64 Reformat codebase into 2-spaces
This patch:
- reformats codebase to use 2-spaces instead of 4. This will
  align the project with other codebases (e.g. DevTools and Lighthouse)
- enables eslint indentation checking

References #19
2017-06-21 14:11:52 -07:00
Andrey Lushnikov
1f51384918 Introduce Eslint to validate style
This patch introduces eslint and fixes multiple minor code
style issues.
2017-06-11 01:32:59 -07:00
Andrey Lushnikov
2b50d8cc32 Introduce utils/check_availability.js utility
This patch introduces check_availability.js utility which looks for
available chromium binaries for different revisions and platforms.

This patch also re-factors the chromium downloader scripts so that
it can operate different platforms.
2017-06-08 11:22:21 -07:00
Andrey Lushnikov
c08f1447bb Slight code restructuring
This patch:
- moves phantom shim shell into a bin/ folder
- introduces a new root index.js which exposes Browser to the
  dependent modules
- adds forgotten LICENSE header to the install.js
2017-05-14 23:28:00 -07:00
Andrey Lushnikov
2cda8c18d1 Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00