Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/package-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
node-version: "24"
cache: "npm"
- run: npm ci

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
node-version: "24"
cache: "npm"
- run: npm ci

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .tmp/TypeScript
key: typescript-source-${{ steps.ts-pin.outputs.commit }}-node22-v1
key: typescript-source-${{ steps.ts-pin.outputs.commit }}-node24-v2

- name: Reset cached TypeScript working tree
if: steps.ts-cache.outputs.cache-hit == 'true'
Expand Down
59 changes: 44 additions & 15 deletions .github/workflows/typescript-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,45 +24,67 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- id: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- id: setup-node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
node-version: "24"
cache: "npm"
- run: npm ci
- id: install
run: node scripts/update-diagnostics.mjs run install -- npm ci

- name: Run static JS checks
run: npm run lint
id: lint
run: node scripts/update-diagnostics.mjs run lint -- npm run lint

- name: Pin latest TypeScript toolchain
run: npm run update:typescript-toolchain
id: update-toolchain
run: node scripts/update-diagnostics.mjs run update-toolchain -- npm run update:typescript-toolchain

- name: Verify pinned web-features dataset
run: npm run verify:dataset
id: verify-dataset
run: node scripts/update-diagnostics.mjs run verify-dataset -- npm run verify:dataset

- name: Regenerate baseline
run: npm run generate
id: generate
run: node scripts/update-diagnostics.mjs run generate -- npm run generate

- name: Run standalone validation
run: npm test
id: test
run: node scripts/update-diagnostics.mjs run test -- npm test

- name: Checkout updated TypeScript source
run: npm run checkout:typescript-source -- --out .tmp/TypeScript --force
id: checkout-typescript
run: node scripts/update-diagnostics.mjs run checkout-typescript -- npm run checkout:typescript-source -- --out .tmp/TypeScript --force

- name: Read required Go version
id: go-version
run: echo "version=$(awk '/^go / { print $2; exit }' .tmp/TypeScript/tsc/go.mod)" >> "$GITHUB_OUTPUT"

- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
- id: setup-go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version: "${{ steps.go-version.outputs.version }}"
cache-dependency-path: .tmp/TypeScript/tsc/go.sum

- name: Test updated TypeScript source
run: npm run test:typescript:gate -- --typescript-dir ./.tmp/TypeScript
id: integration
run: node scripts/update-diagnostics.mjs run integration -- npm run test:typescript:gate -- --typescript-dir ./.tmp/TypeScript

- name: Check latest TypeScript major against the peer range
id: peer-range
run: node scripts/update-diagnostics.mjs run peer-range -- npm run check:typescript-peer-latest

- name: Prepare pull request body
run: npm run write:update-pr-body -- --out .tmp/typescript-toolchain-update-pr.md --summary-out .tmp/typescript-toolchain-update-summary.json
id: pr-body
run: node scripts/update-diagnostics.mjs run pr-body -- npm run write:update-pr-body -- --out .tmp/typescript-toolchain-update-pr.md --summary-out .tmp/typescript-toolchain-update-summary.json

- name: Write update diagnostics
if: always()
env:
UPDATE_WORKFLOW_STEPS: ${{ toJSON(steps) }}
run: node scripts/update-diagnostics.mjs report

# By GitHub design, PRs opened with the default GITHUB_TOKEN don't trigger
# any pull_request workflow (validate / test-typescript / package-dry-run).
Expand All @@ -80,6 +102,7 @@ jobs:
fi

- name: Create pull request
id: pull-request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.AUTOMATION_TOKEN || github.token }}
Expand All @@ -89,5 +112,11 @@ jobs:
title: "chore: update TypeScript toolchain snapshot"
body-path: .tmp/typescript-toolchain-update-pr.md

- name: Check latest TypeScript major against the peer range
run: npm run check:typescript-peer-latest
- name: Upload update diagnostics
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: update-diagnostics
path: .tmp/update-diagnostics
include-hidden-files: true
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
node-version: "24"
cache: "npm"
- run: npm ci

Expand Down
51 changes: 39 additions & 12 deletions .github/workflows/weekly-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,53 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- id: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- id: setup-node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
node-version: "24"
cache: "npm"
- run: npm ci
- id: install
run: node scripts/update-diagnostics.mjs run install -- npm ci

- name: Run static JS checks
run: npm run lint
id: lint
run: node scripts/update-diagnostics.mjs run lint -- npm run lint

- name: Pin latest web-features release
run: npm install --save-exact "web-features@$(npm view web-features dist-tags.latest)"
id: pin-web-features
run: node scripts/update-diagnostics.mjs run pin-web-features -- bash -e -o pipefail -c 'npm install --save-exact "web-features@$(npm view web-features dist-tags.latest)"'

- name: Update manifest and dataset
run: npm run update:web-features -- --snapshot-date "$(date -u +%F)"
id: update-dataset
run: node scripts/update-diagnostics.mjs run update-dataset -- npm run update:web-features -- --snapshot-date "$(date -u +%F)"

- name: Validate compat-management schema
run: npm run validate:registry
id: validate-registry
run: node scripts/update-diagnostics.mjs run validate-registry -- npm run validate:registry

- name: Verify pinned web-features dataset
run: npm run verify:dataset
id: verify-dataset
run: node scripts/update-diagnostics.mjs run verify-dataset -- npm run verify:dataset

- name: Regenerate baseline
run: npm run generate
id: generate
run: node scripts/update-diagnostics.mjs run generate -- npm run generate

- name: Run standalone validation
run: npm test
id: test
run: node scripts/update-diagnostics.mjs run test -- npm test

- name: Prepare pull request body
run: npm run write:update-pr-body -- --out .tmp/baseline-lib-update-pr.md --summary-out .tmp/baseline-lib-update-summary.json
id: pr-body
run: node scripts/update-diagnostics.mjs run pr-body -- npm run write:update-pr-body -- --out .tmp/baseline-lib-update-pr.md --summary-out .tmp/baseline-lib-update-summary.json

- name: Write update diagnostics
if: always()
env:
UPDATE_WORKFLOW_STEPS: ${{ toJSON(steps) }}
run: node scripts/update-diagnostics.mjs report

# By GitHub design, PRs opened with the default GITHUB_TOKEN don't trigger
# any pull_request workflow (validate / test-typescript / package-dry-run).
Expand All @@ -71,6 +88,7 @@ jobs:
fi

- name: Create pull request
id: pull-request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.AUTOMATION_TOKEN || github.token }}
Expand All @@ -79,3 +97,12 @@ jobs:
commit-message: "chore: update web-features baseline snapshot"
title: "chore: update web-features baseline snapshot"
body-path: .tmp/baseline-lib-update-pr.md

- name: Upload update diagnostics
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: update-diagnostics
path: .tmp/update-diagnostics
include-hidden-files: true
if-no-files-found: error
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The command must pass before you open a pull request.

Use the Node.js version in the `engines` field. The project supports macOS, Linux, and WSL.

If you run the TypeScript 7 integration gate, install the Go toolchain.
The upstream TypeScript integration gate requires Node.js 24 and the Go version in the pinned checkout's `tsc/go.mod`.

## How the generator works

Expand All @@ -33,6 +33,10 @@ Git tracks the artifacts in `derived/current/` and `generated/current/`. If your

If the tracked artifacts differ from the generated artifacts, CI fails.

A compat key can belong to more than one web-features feature. The dataset stores one row per key. Overlapping rows include a sorted `featureMemberships` array with each feature's name, snapshots, and groups. The existing scalar feature fields describe the first membership; use `getCompatFeatureMemberships` to read all memberships.

Inclusion uses the key's own Baseline status and dates. All memberships must agree on those facts, but their feature metadata may differ. Conflicting facts and repeated keys within one feature stop generation. Allowlist entries remain tied to compat keys rather than feature IDs.

## Change the compat-management registry

`registry/compat-management.json` is the ledger for special compat rows. The generator uses a fail-closed policy.
Expand Down
17 changes: 10 additions & 7 deletions derived/current/classification.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"compatManagementRegistrySummary": {
"kind": "typescript-baseline-lib/compat-management-registry",
"schemaVersion": 1,
"sourceHash": "sha256-11588342536d409110b0237bcfe2a83a7588c122398f0bc6168217cd786b4603",
"sourceHash": "sha256-5aad0f5fa9d5a6b4b43e7ccc9ee8220eaf5d617bdfe3f6b31edebae55d7cb9c6",
"groupCount": 20,
"managedCompatCount": 61
},
Expand Down Expand Up @@ -9918,16 +9918,17 @@
"category": "actionable_upstream_gap",
"delivery": "defer-upstream",
"upstreamState": "tracked",
"reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.",
"reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.",
"sourceUrls": [
"https://github.com/microsoft/TypeScript/issues/61330",
"https://github.com/microsoft/TypeScript/pull/64096",
"https://github.com/tc39/proposal-json-parse-with-source"
],
"externalAction": {
"kind": "watch-existing",
"repo": "microsoft/TypeScript",
"targetUrl": "https://github.com/microsoft/TypeScript/issues/61330",
"note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands."
"note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs."
},
"expectedResolutionKinds": [
"not-modeled-upstream",
Expand Down Expand Up @@ -9994,16 +9995,17 @@
"category": "actionable_upstream_gap",
"delivery": "defer-upstream",
"upstreamState": "tracked",
"reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.",
"reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.",
"sourceUrls": [
"https://github.com/microsoft/TypeScript/issues/61330",
"https://github.com/microsoft/TypeScript/pull/64096",
"https://github.com/tc39/proposal-json-parse-with-source"
],
"externalAction": {
"kind": "watch-existing",
"repo": "microsoft/TypeScript",
"targetUrl": "https://github.com/microsoft/TypeScript/issues/61330",
"note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands."
"note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs."
},
"expectedResolutionKinds": [
"not-modeled-upstream",
Expand Down Expand Up @@ -10032,16 +10034,17 @@
"category": "actionable_upstream_gap",
"delivery": "defer-upstream",
"upstreamState": "tracked",
"reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.",
"reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.",
"sourceUrls": [
"https://github.com/microsoft/TypeScript/issues/61330",
"https://github.com/microsoft/TypeScript/pull/64096",
"https://github.com/tc39/proposal-json-parse-with-source"
],
"externalAction": {
"kind": "watch-existing",
"repo": "microsoft/TypeScript",
"targetUrl": "https://github.com/microsoft/TypeScript/issues/61330",
"note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands."
"note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs."
},
"expectedResolutionKinds": [
"not-modeled-upstream",
Expand Down
7 changes: 4 additions & 3 deletions derived/current/compat-management-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"kind": "typescript-baseline-lib/compat-management-registry",
"schemaVersion": 1,
"sourcePath": "registry/compat-management.json",
"sourceHash": "sha256-11588342536d409110b0237bcfe2a83a7588c122398f0bc6168217cd786b4603",
"sourceHash": "sha256-5aad0f5fa9d5a6b4b43e7ccc9ee8220eaf5d617bdfe3f6b31edebae55d7cb9c6",
"groupCount": 20,
"managedCompatCount": 61
},
Expand Down Expand Up @@ -513,16 +513,17 @@
"not-modeled-upstream",
"already-excluded-upstream"
],
"reason": "proposal-json-parse-with-source is tracked upstream, but the current TypeScript lib still lacks JSON.rawJSON, JSON.isRawJSON, and the reviver context parameter surface required by web-features.",
"reason": "TypeScript 7.0 lacks these declarations. The pinned upstream source includes all three in lib.es2026.json.d.ts.",
"sourceUrls": [
"https://github.com/microsoft/TypeScript/issues/61330",
"https://github.com/microsoft/TypeScript/pull/64096",
"https://github.com/tc39/proposal-json-parse-with-source"
],
"externalAction": {
"kind": "watch-existing",
"repo": "microsoft/TypeScript",
"targetUrl": "https://github.com/microsoft/TypeScript/issues/61330",
"note": "Watch the existing Domain: lib.d.ts issue and promote once the canonical lib surface lands."
"note": "Watch the next TypeScript release and remove the source-specific expectation once the published declarations include these APIs."
},
"compatKeyCount": 3,
"compatKeys": [
Expand Down
12 changes: 6 additions & 6 deletions derived/current/generation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@
{
"year": 2020,
"outputPath": "generated/current/year/2020/index.d.ts",
"contentHash": "sha256-37070d861cfe386653cb7f2174009f9040e1e38e7dd8c42a271c90d03221c8cc",
"contentHash": "sha256-9a8752a75a8c7c57a43174e986f2e43f0ac05526b739d5b71488b365e743d59c",
"includedCompatKeys": [
"javascript.builtins.AggregateError",
"javascript.builtins.AggregateError.AggregateError",
Expand Down Expand Up @@ -1702,7 +1702,7 @@
{
"year": 2021,
"outputPath": "generated/current/year/2021/index.d.ts",
"contentHash": "sha256-bef6c646f03e1822bb699a80525ad3f00b716a48f804964a5febdec4a3a73c17",
"contentHash": "sha256-879c5fc01ab387aa8081fba4aa26383de44c332ead05b04ca6bacfd250a21305",
"includedCompatKeys": [
"javascript.builtins.AggregateError",
"javascript.builtins.AggregateError.AggregateError",
Expand Down Expand Up @@ -2397,7 +2397,7 @@
{
"year": 2022,
"outputPath": "generated/current/year/2022/index.d.ts",
"contentHash": "sha256-b15e474041af2d6b95db413bf3e9e4953f89ead33679df763f4ad8275245000f",
"contentHash": "sha256-a6a79f10683753856da19a492ee1451c01123d23abd7cb5d68a23735cba6a5f3",
"includedCompatKeys": [
"javascript.builtins.AggregateError",
"javascript.builtins.AggregateError.AggregateError",
Expand Down Expand Up @@ -3102,7 +3102,7 @@
{
"year": 2023,
"outputPath": "generated/current/year/2023/index.d.ts",
"contentHash": "sha256-7fe871afdc5ba183c2942cf3642461df4cffba6ac808c7cb5c5391a7e0d014a4",
"contentHash": "sha256-3d740e009e79d6e8996dfbf9fdfe70f0445027627d4e9d99d87f3a4de9d48784",
"includedCompatKeys": [
"javascript.builtins.AggregateError",
"javascript.builtins.AggregateError.AggregateError",
Expand Down Expand Up @@ -3829,7 +3829,7 @@
{
"year": 2024,
"outputPath": "generated/current/year/2024/index.d.ts",
"contentHash": "sha256-fc090f5baf6146ade06fca1d78f99cb38602c202e1f3a9820110e815bbb36732",
"contentHash": "sha256-b53954e6dc67ee1c8d942aad4ca0d76bbff9a42d8dd03b7fa7ca78dcdf93f83d",
"includedCompatKeys": [
"javascript.builtins.AggregateError",
"javascript.builtins.AggregateError.AggregateError",
Expand Down Expand Up @@ -4586,7 +4586,7 @@
{
"year": 2025,
"outputPath": "generated/current/year/2025/index.d.ts",
"contentHash": "sha256-ca9e417cbda66904a277ae025e3cc7383a7268571ffcc5aec4a751eff7d01169",
"contentHash": "sha256-139fdb314cddf099a5ce5a0e74752afa0a1b60bace01f25dddac09c3a12698f4",
"includedCompatKeys": [
"javascript.builtins.AggregateError",
"javascript.builtins.AggregateError.AggregateError",
Expand Down
Loading
Loading