Skip to main content
Module

x/valtio/.github/workflows/test-old-typescript.yml

πŸ’Š Valtio makes proxy-state simple for React and Vanilla
Go to Latest
File
name: Test Old TypeScript
on: push: branches: [main] pull_request: types: [opened, synchronize]
jobs: test_matrix: runs-on: ubuntu-latest strategy: fail-fast: false matrix: typescript: - 5.4.4 - 5.3.3 - 5.2.2 - 5.1.6 - 5.0.4 - 4.9.5 - 4.8.4 - 4.7.4 - 4.6.4 - 4.5.5 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: node-version: '18' cache: yarn - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: yarn install --frozen-lockfile --check-files - run: yarn build - name: Patch for Old TS run: | sed -i~ 's/"moduleResolution": "bundler",/"moduleResolution": "node",/' tsconfig.json sed -i~ 's/"allowImportingTsExtensions": true,//' tsconfig.json sed -i~ 's/"valtio": \["\.\/src\/index\.ts"\],/"valtio": [".\/dist\/index.d.ts"],/' tsconfig.json sed -i~ 's/"valtio\/\*": \["\.\/src\/\*\.ts"\]/"valtio\/*": [".\/dist\/*.d.ts"]/' tsconfig.json sed -i~ 's/"include": .*/"include": ["src\/types.d.ts", "dist\/**\/*", "tests\/**\/*"],/' tsconfig.json - name: Install old TypeScript run: yarn add -D typescript@${{ matrix.typescript }} - name: Test ${{ matrix.typescript }} run: yarn tsc --noEmit