Skip to content

Commit

Permalink
Merge pull request microsoft#1034 from microsoft/merge_types_web
Browse files Browse the repository at this point in the history
Merge types_web back into TypeScript DOM lib generator
  • Loading branch information
Orta Therox committed Jul 2, 2021
2 parents 28298bd + 01e8285 commit 5d11d38
Show file tree
Hide file tree
Showing 273 changed files with 30,183 additions and 115,371 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Basic dependabot.yml file
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-and-disabling-version-updates

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check the npm registry for updates every month
schedule:
interval: "monthly"
# Bump versions in package.json
# https://github.com/dependabot/dependabot-core/issues/3103
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#versioning-strategy
versioning-strategy: "increase"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
with:
node-version: '15'

- run: npm install
- run: npm ci
- run: npm run build
- run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/test_typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
git diff > baseline-changes.diff
- name: Danger
run: npm run danger -- ci
run: npx danger -- ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

33 changes: 33 additions & 0 deletions .github/workflows/update-core-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update core dependencies
on:
workflow_dispatch:
schedule:
# https://crontab.guru/#5_8_*_*_*
- cron: "5 8 * * *"

# Conditional runs
# https://stackoverflow.com/a/61832535/2460034
jobs:
update-webref:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '15'

- run: npm i -g npm-check-updates
- run: ncu -u
- run: npm i
- run: npm run build && npm run baseline-accept
- id: git-diff
run: git diff --quiet HEAD baselines
continue-on-error: true
- uses: peter-evans/create-pull-request@v3
if: ${{ steps.git-diff.outcome == 'failure' }}
with:
commit-message: "chore(package): update core dependencies"
title: "chore(package): update core dependencies"
branch: update-core-deps
token: ${{ secrets.TS_GITHUB_BOT_AUTH }}

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ lib/
inputfiles/browser.webidl.json
.vscode/*
!.vscode/launch.template.json
package-lock.json
yarn.lock
TypeScript
deploy/generated
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-lock=false
message="chore(package): bump version number to v%s"
1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# TypeScript and JavaScript lib generator

Travis CI Status: [![Build Status](https://travis-ci.org/Microsoft/TSJS-lib-generator.svg?branch=master)](https://travis-ci.org/Microsoft/TSJS-lib-generator)
This tool is used to generate the web-based `lib.dom.d.ts` file which is included with TypeScript releases, and as the `@types/web` package.

This tool is used to generate `dom.generated.d.ts`, `webworker.generated.d.ts` and `dom.iterable.generated.d.ts` for TypeScript.
The input file is the JSON webidl file generated by the Microsoft Edge browser.
## Why is my fancy API still not available here?

A feature needs to be supported by more than two major browser engines to be included here, to make sure there is a good consensus among vendors: __Gecko__ (Firefox), __Blink__ (Chrome/Edge), and __WebKit__ (Safari).

If the condition is met but still is not available here, please [file an issue](hthttps://github.com/microsoft/TypeScript-DOM-lib-generator/issues/new).

## Build Instructions

Expand Down Expand Up @@ -53,11 +56,10 @@ The format of each file can be inferred from their existing content.

The common steps to send a pull request are:

0. Open or refer to an issue in the [TypeScript repo](https://github.com/Microsoft/TypeScript).
1. Add missing elements to `inputfiles/addedTypes.json`, overriding elements to `inputfiles/overridingTypes.json`, or elements to remove to `inputfiles/removedTypes.json`.
0. Open or refer to an issue in the [TypeScript repo](https://github.com/Microsoft/TypeScript) which might get moved back to this repo.
1. Update an IDL or add missing elements to `inputfiles/addedTypes.json`, overriding elements to `inputfiles/overridingTypes.json`, or elements to remove to `inputfiles/removedTypes.json`.
2. Run the build script locally to obtain new `dom.generated.d.ts` and `webworker.generated.d.ts`.
3. Update the files in the `baselines` folder using the newly generated files
under `generated` folder (`npm run baseline-accept`).
3. Update the files in the `baselines` folder using the newly generated files under `generated` folder (`npm run baseline-accept`).

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

Expand Down Expand Up @@ -95,6 +97,8 @@ To give you a sense of whether we will accept changes, you can use these heurist
- Does an internet search for the fields show results in blogs/recommendations?
- When was the deprecation (this can be hard to find) but was it at least 2 years ago if so?

## Build Instructions

# This repo

## Code Structure
Expand Down
Loading

0 comments on commit 5d11d38

Please sign in to comment.