Skip to content

Commit 923d7a2

Browse files
author
Your Name
committed
Merge branch 'master' of https://github.com/microsoft/TypeScript-DOM-lib-generator into SukantPal-master
2 parents 37cbe46 + 1776cdd commit 923d7a2

File tree

64 files changed

+3216
-2181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3216
-2181
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
steps:
99
- uses: actions/checkout@v2
1010
- uses: actions/setup-node@v1
11+
with:
12+
node-version: '15'
1113

1214
- run: npm install
1315
- run: npm run build

.github/workflows/test_typescript.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Runs with TypeScript Tests
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: '15'
13+
14+
- name: Run TypeScript Compiler Tests with new dom.d.ts
15+
run: |
16+
# Get local dependencies
17+
npm install
18+
# Make our new dom APIs
19+
npm run build
20+
21+
# Clone TypeScript, set it up
22+
git clone https://github.com/microsoft/TypeScript --depth 1
23+
24+
# Migrate the generated files into the repo
25+
npm run migrate
26+
27+
cd TypeScript
28+
npm i
29+
30+
31+
# Run TypeScript's tests with the new DOM libs, but don't fail
32+
npm test || true
33+
gulp baseline-accept
34+
35+
# The git diff now is the difference between tests
36+
git diff > baseline-changes.diff
37+
38+
- name: Danger
39+
run: npm run danger -- ci
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ __pycache__/
281281
generated/
282282
lib/
283283
inputfiles/browser.webidl.json
284-
.vscode
284+
.vscode/*
285+
!.vscode/launch.template.json
285286
package-lock.json
286287
yarn.lock
288+
TypeScript

README.md

+14-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ To test:
2525
npm run test
2626
```
2727

28+
To deploy:
29+
30+
```sh
31+
npm run migrate
32+
```
33+
34+
The script will look in for a clone of the TypeScript repo in "../TypeScript", or "./TypeScript" to move the generated files in.
35+
2836
## Contribution Guidelines
2937

3038
The `dom.generated.d.ts`, `webworker.generated.d.ts` and `dom.iterable.generated.d.ts` files from the TypeScript repo are used as baselines.
@@ -53,9 +61,9 @@ The common steps to send a pull request are:
5361

5462
### What are the TypeScript team's heuristics for PRs to the DOM APIs
5563

56-
Changes to this repo can have pretty drastic ecosystem effects, because these types are included by default in TypeScript.
64+
Changes to this repo can have pretty drastic ecosystem effects, because these types are included by default in TypeScript.
5765
Due to this, we tend to be quite conservative with our approach to introducing changes.
58-
To give you a sense of whether we will accept changes, you can use these heuristics to know up-front if we'll be open to merging.
66+
To give you a sense of whether we will accept changes, you can use these heuristics to know up-front if we'll be open to merging.
5967

6068
#### Fixes
6169

@@ -71,9 +79,9 @@ To give you a sense of whether we will accept changes, you can use these heurist
7179
> For example, adding a new spec or subsection via a new or updated IDL file
7280
7381
- Does the new objects or fields show up in [mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)? If not, it's likely too soon.
74-
- Is the IDL source from WHATWG?
75-
- Are the additions available in at least two of Firefox, Safari and Chromium?
76-
- Is the IDL source from W3C?
82+
- Is the IDL source from WHATWG?
83+
- Are the additions available in at least two of [Firefox](https://searchfox.org/mozilla-central/search?q=&path=), [Safari](https://webkit-search.igalia.com/webkit/search?q=&path=) and Chromium?
84+
- Is the IDL source from W3C?
7785
- What stage of the [W3C process](https://en.wikipedia.org/wiki/World_Wide_Web_Consortium#Specification_maturation) is the proposal for these changes: We aim for Proposed recommendation, but can accept Candidate recommendation for stable looking proposals.
7886
- If it's at Working draft the additions available in all three of Firefox, Safari and Chromium
7987
- Could any types added at the global scope have naming conflicts?
@@ -103,3 +111,4 @@ To give you a sense of whether we will accept changes, you can use these heurist
103111
- `overridingTypes.json`: types that are defined in the spec file but has a better or more up-to-date definitions in the json files.
104112
- `removedTypes.json`: types that are defined in the spec file but should be removed.
105113
- `comments.json`: comment strings to be embedded in the generated .js files.
114+
- `deprecatedMessage.json`: the reason why one type is deprecated. The reason why it is a separate file rather than merge in comment.json is mdn/apiDescriptions.json would also possibly be deprecated.

0 commit comments

Comments
 (0)