fix(lint): load TS configs through file URLs #1431
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: typia | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/typia.yml" | |
| - "experimental/**" | |
| - "scripts/**" | |
| - "packages/**" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| - "pnpm-workspace.yaml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: typia-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| Ubuntu: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| # Only build + pack the current platform (ttsc-linux-x64) — typia's | |
| # overrides below pull in ttsc.tgz + ttsc-linux-x64.tgz only. The full | |
| # cross-platform matrix takes ~20 min for tarballs we never consume. | |
| TTSC_TARBALLS_CURRENT: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.6.4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: packages/ttsc/go.mod | |
| cache-dependency-path: | | |
| packages/ttsc/go.sum | |
| tests/go-transformer/go.mod | |
| - name: Install ttsc dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build ttsc tarballs (current platform only) | |
| run: pnpm package:tgz | |
| - name: Clone typia next | |
| run: | | |
| rm -rf experimental/typia | |
| git clone --depth=1 https://github.com/samchon/typia experimental/typia | |
| - name: Use local ttsc tarballs | |
| working-directory: experimental/typia | |
| run: | | |
| # typia's pnpm-workspace.yaml already declares its own `overrides:` | |
| # block (and resolves ttsc through a catalog), so appending a second | |
| # `overrides:` key makes pnpm fail with a duplicated-mapping-key YAML | |
| # error. Merge the local-tarball overrides into the existing block | |
| # instead, creating the block only when typia drops it. | |
| node -e ' | |
| const fs = require("fs"); | |
| const file = "pnpm-workspace.yaml"; | |
| const entries = [ | |
| " ttsc: file:../tarballs/ttsc.tgz", | |
| " \"@ttsc/linux-x64\": file:../tarballs/ttsc-linux-x64.tgz", | |
| ].join("\n"); | |
| const text = fs.readFileSync(file, "utf8"); | |
| if (text.includes("file:../tarballs/ttsc.tgz")) process.exit(0); | |
| const merged = /^overrides:[ \t]*$/m.test(text) | |
| ? text.replace(/^overrides:[ \t]*$/m, (line) => line + "\n" + entries) | |
| : text.replace(/\s*$/, "") + "\n\noverrides:\n" + entries + "\n"; | |
| fs.writeFileSync(file, merged); | |
| ' | |
| - name: Test typia next | |
| working-directory: experimental/typia | |
| run: | | |
| pnpm install --no-frozen-lockfile | |
| pnpm run test |