Skip to content

[Deps] update es-iterator-helpers #103

[Deps] update es-iterator-helpers

[Deps] update es-iterator-helpers #103

Workflow file for this run

name: "Types: check published types"
on: [pull_request, push]
permissions:
contents: read
jobs:
test:
name: TS ${{ matrix.ts_version }}, "${{ matrix.ts_lib }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ts_version:
# The official ESLint types are not compatible with TS 3.9
# - 3.9
- '4.0'
- 4.1
- 4.2
- 4.3
- 4.4
- 4.5
- '5.0'
- 5.5
- 5.6
ts_lib:
- es2015
- es2015,dom
- es2020
- esnext
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
skip-ls-check: true
- name: build types
run: npm run build-types
# Pack the lib into a tarball so that when we install the lib later in the
# test-published-types directory, it's only install `dependencies` of the
# lib.
- name: pack the lib
run: npm pack --pack-destination /tmp/
- name: find the packed lib
run: echo "ESLINT_PLUGIN_REACT_PATH=$(ls /tmp/eslint-plugin-react*.tgz | tail -n 1)" >> $GITHUB_ENV
- name: show the path to the packed lib
run: echo "$ESLINT_PLUGIN_REACT_PATH"
- name: npm install working directory
run: npm install
working-directory: test-published-types
- name: install eslint-plugin-react and typescript version ${{ matrix.ts_version }}
run: npm install --no-save "$ESLINT_PLUGIN_REACT_PATH" typescript@${{ matrix.ts_version }}
working-directory: test-published-types
- name: show installed typescript version
run: npm list typescript --depth=0
working-directory: test-published-types
- name: show installed eslint-plugin-react version
run: npm list eslint-plugin-react --depth=0
working-directory: test-published-types
- name: check types with lib "${{ matrix.ts_lib }}"
run: npx tsc --lib ${{ matrix.ts_lib }}
working-directory: test-published-types