chore: clarify build instructions (#9000)
This commit is contained in:
parent
3939d5510f
commit
a6f4584a74
@ -42,7 +42,7 @@ Puppeteer has two configurations for building:
|
|||||||
|
|
||||||
- `npm run build` (or `npm run build:prod`) - Builds Puppeteer and artifacts
|
- `npm run build` (or `npm run build:prod`) - Builds Puppeteer and artifacts
|
||||||
used in production.
|
used in production.
|
||||||
- `npm run build:dev` - Builds Puppeteer, tests, and artifacts used in
|
- `npm run build:dev` - Builds Puppeteer, test runner, tests, and artifacts used in
|
||||||
production.
|
production.
|
||||||
|
|
||||||
## Testing Puppeteer
|
## Testing Puppeteer
|
||||||
@ -274,7 +274,7 @@ The following steps are needed to update the Chromium version.
|
|||||||
1. Update `versions.js` with the new Chromium-to-Puppeteer version mapping and update `lastMaintainedChromiumVersion` with the latest stable Chrome version.
|
1. Update `versions.js` with the new Chromium-to-Puppeteer version mapping and update `lastMaintainedChromiumVersion` with the latest stable Chrome version.
|
||||||
1. Run `npm run check:protocol-revision`.
|
1. Run `npm run check:protocol-revision`.
|
||||||
If it fails, update `package.json` with the expected `devtools-protocol` version.
|
If it fails, update `package.json` with the expected `devtools-protocol` version.
|
||||||
1. Run `npm run build` and `npm install`.
|
1. Run `npm run build && npm run build:dev` and `npm install`.
|
||||||
1. Run `npm test` and ensure that all tests pass. If a test fails, [bisect](#bisecting-upstream-changes) the upstream cause of the failure, and either update the test expectations accordingly (if it was an intended change) or work around the changes in Puppeteer (if it’s not desirable to change Puppeteer’s observable behavior).
|
1. Run `npm test` and ensure that all tests pass. If a test fails, [bisect](#bisecting-upstream-changes) the upstream cause of the failure, and either update the test expectations accordingly (if it was an intended change) or work around the changes in Puppeteer (if it’s not desirable to change Puppeteer’s observable behavior).
|
||||||
1. Commit and push your changes and open a pull request.
|
1. Commit and push your changes and open a pull request.
|
||||||
The commit message must contain the version in `Chromium <version> (<revision>)` format to ensure that [pptr.dev](https://pptr.dev/) can parse it correctly, e.g. `'feat(chromium): roll to Chromium 90.0.4427.0 (r856583)'`.
|
The commit message must contain the version in `Chromium <version> (<revision>)` format to ensure that [pptr.dev](https://pptr.dev/) can parse it correctly, e.g. `'feat(chromium): roll to Chromium 90.0.4427.0 (r856583)'`.
|
||||||
|
@ -46,7 +46,7 @@ npm test
|
|||||||
- **Important**: don't forget to first build the code if you're testing local changes:
|
- **Important**: don't forget to first build the code if you're testing local changes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build && npm test
|
npm run build:dev && npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
- To run a specific test, substitute the `it` with `it.only`:
|
- To run a specific test, substitute the `it` with `it.only`:
|
||||||
|
2
vendor/README.md
vendored
2
vendor/README.md
vendored
@ -9,5 +9,5 @@ The process for updating a vendored dependency is:
|
|||||||
1. `npm install {DEP NAME HERE}`
|
1. `npm install {DEP NAME HERE}`
|
||||||
2. `cp -r node_modules/DEP vendor`
|
2. `cp -r node_modules/DEP vendor`
|
||||||
3. Update `eslintrc.js` to forbid importing DEP directly (see the `Mitt` rule already defined in there).
|
3. Update `eslintrc.js` to forbid importing DEP directly (see the `Mitt` rule already defined in there).
|
||||||
4. Use the new DEP, and run `npm run build` to check everything compiles successfully.
|
4. Use the new DEP, and run `npm run build && npm run build:dev` to check everything compiles successfully.
|
||||||
5. If the dep ships as compiled JS, you may need to disable TypeScript checking the file. Add an entry to the `excludes` property of the TSConfig files in `vendor`. (again, see the entry that's already there for Mitt as an example). Don't forget to update both the ESM and CJS config files.
|
5. If the dep ships as compiled JS, you may need to disable TypeScript checking the file. Add an entry to the `excludes` property of the TSConfig files in `vendor`. (again, see the entry that's already there for Mitt as an example). Don't forget to update both the ESM and CJS config files.
|
||||||
|
Loading…
Reference in New Issue
Block a user