API: add getChildren and token getters to Node #35874
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, main-ts7, ts7-release, 'release-*'] | |
| pull_request: | |
| branches: [main, main-ts7, ts7-release, 'release-*'] | |
| merge_group: | |
| branches: [main, main-ts7, ts7-release, 'release-*'] | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| large-packages: false | |
| docker-images: false | |
| swap-storage: false | |
| dotnet: false | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: ./.github/actions/setup-go | |
| - run: npm ci | |
| - run: npx hereby build | |
| - run: npx hereby build:api | |
| release-build: | |
| if: ${{ github.repository == 'microsoft/TypeScript' && github.event_name != 'merge_group' }} | |
| runs-on: | |
| - self-hosted | |
| - 1ES.Pool=TypeScript-1ES-GitHub-Large | |
| - 1ES.ImageOverride=azure-linux-3 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable | |
| - uses: ./.github/actions/setup-go | |
| - run: npm ci | |
| - run: npx hereby typescript:release --forRelease --setPrerelease dev.0.0 | |
| extension: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - run: npm ci | |
| - run: npm run extension:build | |
| test: | |
| strategy: | |
| fail-fast: ${{ github.event_name == 'merge_group' }} | |
| matrix: | |
| config: | |
| - runner: ubuntu-latest | |
| os: linux | |
| coverage: true | |
| main: true | |
| - runner: windows-latest | |
| os: windows | |
| coverage: true | |
| skip: ${{ github.event_name == 'merge_group' }} | |
| - runner: macos-latest | |
| os: macos | |
| coverage: true | |
| skip: ${{ github.event_name == 'merge_group' || github.event_name == 'pull_request' }} | |
| - runner: | |
| - self-hosted | |
| - 1ES.Pool=TypeScript-1ES-GitHub-Large | |
| - 1ES.ImageOverride=azure-linux-3 | |
| os: linux | |
| name: 'race mode' | |
| race: true | |
| skip: ${{ github.event_name == 'merge_group' || github.repository != 'microsoft/TypeScript' }} | |
| - runner: ubuntu-latest | |
| os: linux | |
| name: 'noembed' | |
| noembed: true | |
| - runner: ubuntu-latest | |
| os: linux | |
| name: 'concurrent test programs' | |
| concurrent-test-programs: true | |
| coverage: true | |
| exclude: | |
| - config: | |
| skip: true | |
| name: test (${{ matrix.config.name || matrix.config.runner }}) | |
| runs-on: ${{ matrix.config.runner }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| TSGO_HEREBY_RACE: ${{ (matrix.config.race && 'true') || 'false' }} | |
| TSGO_HEREBY_NOEMBED: ${{ (matrix.config.noembed && 'true') || 'false' }} | |
| TSGO_HEREBY_CONCURRENT_TEST_PROGRAMS: ${{ (matrix.config.concurrent-test-programs && 'true') || 'false' }} | |
| TSGO_HEREBY_COVERAGE: ${{ (matrix.config.coverage && 'true') || 'false' }} | |
| steps: | |
| - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| large-packages: false | |
| docker-images: false | |
| swap-storage: false | |
| dotnet: false | |
| - run: git config --system core.longpaths true | |
| if: ${{ matrix.config.os == 'windows' }} | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: ./.github/actions/setup-go | |
| - if: ${{ !matrix.config.main }} | |
| name: Disable PR annotations | |
| run: | | |
| echo "::remove-matcher owner=eslint-compact::" | |
| echo "::remove-matcher owner=eslint-stylish::" | |
| echo "::remove-matcher owner=tsc::" | |
| echo "::remove-matcher owner=go::" | |
| - run: npm ci | |
| - run: go install gotest.tools/gotestsum@latest | |
| if: ${{ matrix.config.os != 'windows' && !matrix.config.race }} | |
| - name: Tests | |
| id: test | |
| run: npx hereby test | |
| - name: Benchmarks | |
| run: npx hereby test:benchmarks | |
| - name: Tools Tests | |
| run: npx hereby test:tools | |
| - name: API Tests | |
| run: npx hereby test:api | |
| - run: git add . | |
| - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| if: ${{ always() && matrix.config.coverage && github.event_name != 'merge_group' }} | |
| with: | |
| use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} | |
| name: ${{ matrix.config.name || matrix.config.runner }} | |
| directory: ./coverage | |
| - run: git diff --staged --exit-code --stat | |
| - name: Print baseline diff on failure | |
| if: ${{ failure() && steps.test.conclusion == 'failure' }} | |
| run: | | |
| npx hereby baseline-accept | |
| git add tsc/testdata/baselines/reference | |
| git diff --staged --exit-code | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ failure() && steps.test.conclusion == 'failure' }} | |
| with: | |
| name: ${{ matrix.config.name || matrix.config.os }}-new-baselines | |
| path: tsc/testdata/baselines/local | |
| lint: | |
| strategy: | |
| fail-fast: ${{ github.event_name == 'merge_group' }} | |
| matrix: | |
| config: | |
| - runner: ubuntu-latest | |
| os: linux | |
| main: true | |
| - runner: windows-latest | |
| os: windows | |
| skip: ${{ github.event_name == 'merge_group' }} | |
| - runner: ubuntu-latest | |
| os: linux | |
| name: 'noembed' | |
| noembed: true | |
| skip: ${{ github.event_name == 'merge_group' }} | |
| exclude: | |
| - config: | |
| skip: true | |
| name: lint (${{ matrix.config.name || matrix.config.runner }}) | |
| runs-on: ${{ matrix.config.runner }} | |
| env: | |
| TSGO_HEREBY_NOEMBED: ${{ (matrix.config.noembed && 'true') || 'false' }} | |
| steps: | |
| - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| large-packages: false | |
| docker-images: false | |
| swap-storage: false | |
| dotnet: false | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: ./.github/actions/setup-go | |
| - if: ${{ !matrix.config.main }} | |
| name: Disable PR annotations | |
| run: | | |
| echo "::remove-matcher owner=eslint-compact::" | |
| echo "::remove-matcher owner=eslint-stylish::" | |
| echo "::remove-matcher owner=tsc::" | |
| echo "::remove-matcher owner=go::" | |
| - run: npm ci | |
| - run: npx hereby lint | |
| format: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: ./.github/actions/setup-go | |
| - run: npm ci | |
| - run: npx hereby check:format | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| large-packages: false | |
| docker-images: false | |
| swap-storage: false | |
| dotnet: false | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '>=22.16.0' | |
| - uses: ./.github/actions/setup-go | |
| - run: npm ci | |
| - run: npx hereby generate | |
| - run: npx hereby generate:enums | |
| - run: npx hereby generate:ast | |
| - run: npx hereby generate:vendor | |
| - run: node --experimental-strip-types ./tsc/internal/lsp/lsproto/_generate/fetchModel.mts | |
| - run: node --experimental-strip-types ./tsc/internal/lsp/lsproto/_generate/generate.mts | |
| - run: npx hereby generate:extension | |
| - run: npx hereby check:scripts | |
| - run: git add . | |
| - run: git diff --staged --exit-code --stat | |
| tidy: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ./.github/actions/setup-go | |
| - run: go -C ./tsc mod tidy -diff | |
| - run: go -C ./tools mod tidy -diff | |
| - run: go work sync | |
| - run: git diff --exit-code | |
| smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| large-packages: false | |
| docker-images: false | |
| swap-storage: false | |
| dotnet: false | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| repository: microsoft/TypeScript | |
| ref: v6.0.3 | |
| path: smoke/typescript-6.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: ./.github/actions/setup-go | |
| - run: npm ci | |
| - run: npx hereby build --race | |
| - run: npm ci | |
| working-directory: smoke/typescript-6.0 | |
| - run: npx hereby generate-diagnostics | |
| working-directory: smoke/typescript-6.0 | |
| - run: ./built/local/tsc -p ./smoke/typescript-6.0/src/compiler --singleThreaded | |
| - run: ./built/local/tsc -p ./smoke/typescript-6.0/src/compiler | |
| misc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 'lts/*' | |
| - uses: ./.github/actions/setup-go | |
| - run: npm ci | |
| - run: go -C ./tools run ./cmd/checkmodpaths "$PWD" | |
| - run: npx hereby check:scripts | |
| - run: npx hereby typescript:check-platforms | |
| required: | |
| runs-on: ubuntu-slim | |
| if: ${{ always() }} | |
| needs: | |
| - build | |
| - release-build | |
| - extension | |
| - format | |
| - generate | |
| - lint | |
| - misc | |
| - smoke | |
| - test | |
| - tidy | |
| steps: | |
| - name: Check required jobs | |
| env: | |
| NEEDS: ${{ toJson(needs) }} | |
| run: | | |
| ! echo "$NEEDS" | jq -e 'to_entries[] | { job: .key, result: .value.result } | select((.result == "success" or .result == "skipped") | not)' |