Skip to content

Commit 0829719

Browse files
authored
Add generate command for faster build and baseline acceptance (#1968)
1 parent cf36eff commit 0829719

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/update-core-deps.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
# Example: https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1463
2828
- run: npm i
2929
- id: build
30-
run: npm run build && npm run baseline-accept
30+
run: npm run generate
3131
continue-on-error: true
3232
- if: ${{ steps.build.outcome == 'failure' }}
3333
run: node deploy/onUpdateFailure.js

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ In order to make the tests pass, please update the baseline as well in any pull
6464

6565
It's possible that the automated algorithm decided that it's not well supported by browsers and thus removed it. Say we want to add a new interface named `Foo`. Check if there is a document about that interface in [MDN](https://developer.mozilla.org/). If there is, see the browser compatibility section and check whether it's supported by two or more browser engines. (Note that Chromium-based browsers use the same browser engine and thus support from them counts as a single support.)
6666

67-
If all the conditions are fulfilled, it could be that the type is incorrectly removed by `inputfiles/removedTypes.jsonc`. Try finding and removing the relevant item there and run `npm run build && npm run baseline-accept`.
67+
If all the conditions are fulfilled, it could be that the type is incorrectly removed by `inputfiles/removedTypes.jsonc`. Try finding and removing the relevant item there and run `npm run generate`.
6868

6969
If conditions are not fulfilled but you think MDN is wrong, please file an issue at https://github.com/mdn/browser-compat-data/issues/. The type will be automatically added in a few weeks when MDN fixes their data.
7070

7171
### When the type exists but is wrong
7272

73-
It's possible that the type is too specific or too general. First you need to check whether `inputfiles/overridingTypes.jsonc` or `inputfiles/addedTypes.jsonc` have a relevant item, which can be fixed if exists. If they don't, add one in `overridingTypes.jsonc`. Run `npm run build && npm run baseline-accept` to make sure the resulting changes are what you want.
73+
It's possible that the type is too specific or too general. First you need to check whether `inputfiles/overridingTypes.jsonc` or `inputfiles/addedTypes.jsonc` have a relevant item, which can be fixed if exists. If they don't, add one in `overridingTypes.jsonc`. Run `npm run generate` to make sure the resulting changes are what you want.
7474

7575
If you are familiar with Web IDL, you may also want to check whether the upstream IDL itself can be made more specific. Doing so will reduce the need for manual overrides in this repository and thus can be more helpful.
7676

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"changelog": "tsc && node ./lib/changelog.js",
2121
"ts-changelog": "node ./deploy/versionChangelog.js",
2222
"migrate": "node ./deploy/migrate.js",
23-
"version": "npm i && tsc && node ./lib/version.js"
23+
"version": "npm i && tsc && node ./lib/version.js",
24+
"generate": "npm run build && npm run baseline-accept"
2425
},
2526
"author": {
2627
"name": "Kagami Sascha Rosylight",

0 commit comments

Comments
 (0)