This way we generate these types right away, without duplicating them everywhere.
|2 days ago|
|common||2 days ago|
|installation-tests||7 days ago|
|playwright-chromium||11 months ago|
|playwright-core||8 months ago|
|playwright-firefox||11 months ago|
|playwright-test||2 days ago|
|playwright-webkit||11 months ago|
|.gitignore||11 months ago|
|README.md||2 weeks ago|
|build_package.js||2 weeks ago|
Managing and Publishing Playwright Packages
- Playwright ships multiple packages to NPM. All packages that are published to NPM are listed as folders under
- Playwright's root package.json is never published to NPM. It is only used for devmode, e.g. when running
npm installwith no arguments or installing from github.
- Playwright dependencies for all packages are the same and are managed with the
- Playwright browser versions for all packages are the same and are managed with the
NOTE As of May 20, 2020, the only exception is the
playwright-electronpackage that doesn't follow the pack and is published manually. This is due to it's pre-1.0 status.
Building NPM package
To build a package that will be shipped to NPM, use
The script populates package folder with contents, and then uses
npm pack to archive the folder.
As of May 20, 2020,
//packages/build_package.js does the following:
- copies certain files and folders from
playwright-internalto the subpackage (e.g.
package.jsonand puts it in the subpackage
browsers.jsonand puts it in the subpackage
npm packto pack the subpackage folder
- removes all the files that were added during the process
playwright package and save result as
./packages/build_package.js playwright ./playwright.tgz
To debug what files are put into the folder, use
--no-cleanup flag and inspect the package folder:
./packages/build_package.js playwright ./playwright.tgz --no-cleanup ls ./packages/playwright # inspect the folder
To test packages, use
All package publishing happens exclusively over CI/CD using the