Merge pull request #16 from 0xZ0uk/bugfix/fix-tanstack-router-treegen-error
63c8df26
Fix Tanstack Router: run tsc via bunx to use local devDependency
4 file(s) · +13 −13
Fix Tanstack Router: run tsc via bunx to use local devDependency
| 2 | 2 | ||
| 3 | 3 | on: |
|
| 4 | 4 | push: |
|
| 5 | - | branches: [ main ] |
|
| 5 | + | branches: [main] |
|
| 6 | 6 | pull_request: |
|
| 7 | - | branches: [ main ] |
|
| 7 | + | branches: [main] |
|
| 8 | 8 | ||
| 9 | 9 | jobs: |
|
| 10 | 10 | format: |
|
| 22 | 22 | - name: Install dependencies |
|
| 23 | 23 | run: bun install |
|
| 24 | 24 | ||
| 25 | - | - name: Check formatting |
|
| 26 | - | run: bun run format:check |
|
| 25 | + | - name: Check and fix formatting errors |
|
| 26 | + | run: bun run format |
|
| 8 | 8 | "consola": "^3.4.2", |
|
| 9 | 9 | "degit": "^2.8.4", |
|
| 10 | 10 | "execa": "^7.2.0", |
|
| 11 | - | "fs-extra": "^11.3.0", |
|
| 11 | + | "fs-extra": "^11.3.1", |
|
| 12 | 12 | "picocolors": "^1.1.1", |
|
| 13 | 13 | "yocto-spinner": "^1.0.0", |
|
| 14 | 14 | }, |
|
| 17 | 17 | "@types/degit": "^2.8.6", |
|
| 18 | 18 | "@types/figlet": "^1.7.0", |
|
| 19 | 19 | "@types/fs-extra": "^11.0.4", |
|
| 20 | - | "@types/inquirer": "^9.0.8", |
|
| 21 | - | "@types/node": "^20.19.0", |
|
| 20 | + | "@types/inquirer": "^9.0.9", |
|
| 21 | + | "@types/node": "^20.19.10", |
|
| 22 | 22 | "@types/prompts": "^2.4.9", |
|
| 23 | 23 | "ts-node": "^10.9.2", |
|
| 24 | - | "typescript": "^5.8.3", |
|
| 24 | + | "typescript": "^5.9.2", |
|
| 25 | 25 | }, |
|
| 26 | 26 | }, |
|
| 27 | 27 | }, |
|
| 107 | 107 | cwd: path.join(projectPath, "client"), |
|
| 108 | 108 | }); |
|
| 109 | 109 | ||
| 110 | - | await execa("tsc", ["-b"], { |
|
| 110 | + | await execa("bunx", ["tsc", "-b"], { |
|
| 111 | 111 | cwd: path.join(projectPath, "client"), |
|
| 112 | 112 | }); |
|
| 113 | 113 |
| 12 | 12 | ||
| 13 | 13 | // Check if we're running from source or built version |
|
| 14 | 14 | // In development, __dirname will contain 'src', in production it won't |
|
| 15 | - | const isProduction = !__dirname.includes(path.sep + 'src' + path.sep); |
|
| 16 | - | const templatesPath = isProduction |
|
| 17 | - | ? path.resolve(__dirname, "templates", "extras") // dist/index.js -> dist/templates/extras |
|
| 18 | - | : path.resolve(__dirname, "..", "templates", "extras"); // src/utils -> src/templates/extras |
|
| 15 | + | const isProduction = !__dirname.includes(path.sep + "src" + path.sep); |
|
| 16 | + | const templatesPath = isProduction |
|
| 17 | + | ? path.resolve(__dirname, "templates", "extras") // dist/index.js -> dist/templates/extras |
|
| 18 | + | : path.resolve(__dirname, "..", "templates", "extras"); // src/utils -> src/templates/extras |
|
| 19 | 19 | ||
| 20 | 20 | export const EXTRAS_DIR = templatesPath; |