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
57 changes: 43 additions & 14 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: "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
49 changes: 38 additions & 11 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: "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
10 changes: 10 additions & 0 deletions docs/OPERATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ Identical inputs produce byte-identical artifacts on each supported operating sy

- `libSource` records the platform package and one content hash. The update requires identical files on Linux, macOS, and Windows.
- `typescriptSource` records the exact `microsoft/TypeScript` `main` commit used by proposal preparation and integration tests. Proposal artifacts are generated from that checkout's declaration corpus.

## Failed updates

Weekly data and TypeScript toolchain updates save an `update-diagnostics` workflow artifact, including command logs, `summary.md`, and `summary.json`. The job summary shows the failed step, candidate input pins, and added, removed, or changed compat keys. Reports use the input dataset even if generation fails; existing derived files are not evidence that the candidate passed.

For registry drift, inspect each named compat key and its upstream declaration before changing `registry/compat-management.json`. Keep missing declarations separate from newly implemented declarations. Do not relax the checks just to make an update pass.

For a TypeScript layout change, update the integration adapter and its fixtures. Keep proposal generation pinned to the recorded commit. Run `npm run validate`, then run `npm run test:typescript:gate` against that commit before retrying the toolchain workflow.

Failed update jobs do not create pull requests. Repair the cause and rerun the workflow. Diagnostic collection does not change the release gates or publish a package.
Loading
Loading