Name Description Size
api-extractor.json 849
CHANGELOG.md 16402
cjs-entry-core.js We use `export default puppeteer` in `src/index.ts` to expose the library But TypeScript in CJS mode compiles that to `exports.default = `. This means that our CJS Node users would have to use `require('puppeteer').default` which isn't very nice. So instead we expose this file as our entry point. This requires the compiled Puppeteer output and re-exports the `default` export via `module.exports.` This means that we can publish to CJS and ESM whilst maintaining the expected import behaviour for CJS and ESM users. 1289
cjs-entry.js We use `export default puppeteer` in `src/index.ts` to expose the library But TypeScript in CJS mode compiles that to `exports.default = `. This means that our CJS Node users would have to use `require('puppeteer').default` which isn't very nice. So instead we expose this file as our entry point. This requires the compiled Puppeteer output and re-exports the `default` export via `module.exports.` This means that we can publish to CJS and ESM whilst maintaining the expected import behaviour for CJS and ESM users. 1274
commitlint.config.js 801
CONTRIBUTING.md 12943
examples # Running the examples 11
install.js This file is part of public API. By default, the `puppeteer` package runs this script during the installation process unless one of the env flags is provided. `puppeteer-core` package doesn't include this step at all. However, it's still possible to install a supported browser using this script when necessary. 2792
json-mocha-reporter.js This is a copy of https://github.com/mochajs/mocha/blob/master/lib/reporters/json-stream.js with more event hooks. mocha does not support extending reporters or using multiple reporters so a custom reporter is needed and it must be local to the project. 1711
LICENSE 11344
mocha-config 4
moz.yaml 224
package-lock.json 297541
package.json /*.d.ts", "lib/* 4531
prettier.config.js 81
README.md # Puppeteer 22189
scripts 5
src 13
test # Puppeteer unit tests 53
test-browser 3
test-ts-types 7
tsconfig.base.json 264
tsconfig.json This configuration only exists for the API Extractor tool and for VSCode to use. It is NOT the tsconfig used for compilation. For CJS builds, `tsconfig.cjs.json` is used, and for ESM, it's `tsconfig.esm.json`. See the details in CONTRIBUTING.md that describes our TypeScript setup. 550
typescript-if-required.js Now Puppeteer is built with TypeScript, we need to ensure that locally we have the generated output before trying to install. For users installing puppeteer this is fine, they will have the generated lib/ directory as we ship it when we publish to npm. However, if you're cloning the repo to contribute, you won't have the generated lib/ directory so this script checks if we need to run TypeScript first to ensure the output exists and is in the right place. 2053
utils 9
vendor # Vendoring third party dependencies 4
versions.js 1420
web-test-runner.config.js 1403
.editorconfig 147
.eslintignore 392
.eslintrc.js this setting doesn't impact things as we use Prettier to format our code and hence dictate the line length. Prettier aims for 80 but sometimes makes the decision to go just over 80 chars as it decides that's better than wrapping. ESLint's rule defaults to 80 but therefore conflicts with Prettier. So we set it to something far higher than Prettier would allow to avoid it causing issues and conflicting with Prettier. 5033
.github 1
.npmrc 14
.prettierignore 82
.versionrc.js 879