chore: Update build dependencies (#9600)

This commit is contained in:
Nikolay Vitkov 2023-01-30 13:30:49 +01:00 committed by GitHub
parent 390685bbe5
commit aa1d1536b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 79 additions and 22 deletions

View File

@ -27,7 +27,9 @@ again.
2. Install the dependencies
```sh
npm install # or PUPPETEER_PRODUCT=firefox npm install
npm install
# Or to download Firefox
PUPPETEER_PRODUCT=firefox npm install
```
3. Build all packages
@ -61,7 +63,7 @@ again.
## Building a single package
To build a single package, you can run
To build a single package, you can run:
```sh
npm run build --workspace <package> # e.g. puppeteer
@ -72,6 +74,18 @@ packages is sufficient. This is all possible due to
[wireit](https://github.com/google/wireit) which behaves similar to
[GNU Make](https://www.gnu.org/software/make/).
### Watch mode
To continuously build a package, you can run:
```sh
npm run build --watch --workspace <package> # e.g. puppeteer
```
You have to only specify a single package to watch else things will not work as expected
As stated above because of [wireit](https://github.com/google/wireit) when a change happens
all dependencies will be build or rebuild (if needed).
## Removing stale artifacts
It's possible some generated artifacts (such as

24
package-lock.json generated
View File

@ -5617,9 +5617,9 @@
"dev": true
},
"node_modules/json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"bin": {
"json5": "lib/cli.js"
@ -8040,9 +8040,9 @@
}
},
"node_modules/tsconfig-paths/node_modules/json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"dependencies": {
"minimist": "^1.2.0"
@ -13050,9 +13050,9 @@
"dev": true
},
"json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true
},
"jsonc-parser": {
@ -14905,9 +14905,9 @@
},
"dependencies": {
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"requires": {
"minimist": "^1.2.0"

View File

@ -8,12 +8,13 @@
"scripts": {
"bisect": "tsx tools/bisect.ts",
"build": "npm run build --workspaces --if-present",
"build:docs": "npm run build:docs --workspace puppeteer --if-present",
"check:pinned-deps": "tsx tools/ensure-pinned-deps",
"check": "npm run check --workspaces --if-present && run-p check:*",
"clean": "npm run clean --workspaces --if-present && rimraf **/.wireit",
"commitlint": "commitlint --from=HEAD~1",
"debug": "mocha --inspect-brk",
"docs": "run-s build generate:markdown",
"docs": "run-s build:docs generate:markdown",
"format:eslint": "eslint --ext js --ext ts --fix .",
"format:prettier": "prettier --write .",
"format": "run-s format:*",

View File

@ -0,0 +1,15 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/lib/esm/puppeteer/puppeteer-core.d.ts",
"extends": "./api-extractor.json",
"dtsRollup": {
"enabled": false
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/../../docs/<unscopedPackageName>.api.json"
}
}

View File

@ -8,8 +8,7 @@
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/../../docs/<unscopedPackageName>.api.json"
"enabled": false
},
"dtsRollup": {

View File

@ -37,6 +37,7 @@
"build:third_party": "wireit",
"build:tsc": "wireit",
"build:types": "wireit",
"build:docs": "wireit",
"build": "wireit",
"check": "tsx tools/ensure-correct-devtools-protocol-package",
"format:types": "wireit",
@ -58,6 +59,7 @@
},
"build": {
"dependencies": [
"build:tsc",
"build:third_party",
"format:types",
"generate:package-json"
@ -83,8 +85,7 @@
],
"clean": false,
"files": [
"lib/esm/third_party/**",
"lib/cjs/third_party/**"
"third_party/**"
],
"output": [
"lib/esm/third_party/**",
@ -115,6 +116,12 @@
"lib/types.d.ts"
]
},
"build:docs": {
"command": "api-extractor run --local --config \"./api-extractor.docs.json\"",
"dependencies": [
"build:tsc"
]
},
"format:types": {
"command": "eslint --cache-location .eslintcache --cache --ext=ts --no-ignore --no-eslintrc -c=../../.eslintrc.types.cjs --fix lib/types.d.ts",
"dependencies": [

View File

@ -0,0 +1,15 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/lib/esm/puppeteer/puppeteer.d.ts",
"extends": "./api-extractor.json",
"dtsRollup": {
"enabled": false
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/../../docs/<unscopedPackageName>.api.json"
}
}

View File

@ -8,8 +8,7 @@
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/../../docs/<unscopedPackageName>.api.json"
"enabled": false
},
"dtsRollup": {

View File

@ -36,11 +36,11 @@
"scripts": {
"build:tsc": "wireit",
"build:types": "wireit",
"build:docs": "wireit",
"build": "wireit",
"clean": "tsc -b --clean && rimraf lib",
"format:types": "wireit",
"generate:package-json": "wireit",
"generate:sources": "wireit",
"postinstall": "node install.js",
"prepack": "wireit"
},
@ -56,6 +56,7 @@
},
"build": {
"dependencies": [
"build:tsc",
"format:types",
"generate:package-json"
]
@ -84,6 +85,12 @@
"lib/types.d.ts"
]
},
"build:docs": {
"command": "api-extractor run --local --config \"./api-extractor.docs.json\"",
"dependencies": [
"build:tsc"
]
},
"format:types": {
"command": "eslint --cache-location .eslintcache --cache --ext=ts --no-ignore --no-eslintrc -c=../../.eslintrc.types.cjs --fix lib/types.d.ts",
"dependencies": [