diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 000000000..f37ceaef3 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,24 @@ +name: Typecheck + +on: [push] + +jobs: + typecheck: + name: Typecheck + runs-on: ubuntu-latest + env: + MISE_ENV: ci + steps: + - uses: actions/checkout@v4 + + - uses: jdx/mise-action@v3 + with: + install: true + cache: true + log_level: debug + + - name: Install pnpm dependencies + run: pnpm install --frozen-lockfile + + - name: Check type validity + run: mise typecheck diff --git a/mise.toml b/mise.toml index 394a504af..458101bca 100644 --- a/mise.toml +++ b/mise.toml @@ -6,3 +6,7 @@ python = { version = "3.12", postinstall = "python -m pip install pipx" } [tasks.dev] description = "Start in dev mode" run = "pnpm run dev" + +[tasks.typecheck] +description = "Ensure that the app is appropriately typed" +run = "pnpm typecheck" diff --git a/mise/config.ci.toml b/mise/config.ci.toml new file mode 100644 index 000000000..630f1eb9b --- /dev/null +++ b/mise/config.ci.toml @@ -0,0 +1,6 @@ +[tasks.typecheck] +description = "Perform typechecking tasks" +run = [ + "npx @quasar/cli prepare", + "pnpm typecheck", +] diff --git a/package.json b/package.json index 11caab743..1d609fd2d 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "publish-win": "quasar build --mode electron -T win32 --publish always", "publish-linux": "quasar build --mode electron -T linux --publish always", "test": "vitest run ./test/vitest", - "typecheck": "tsc" + "typecheck": "vue-tsc" }, "dependencies": { "@node-steam/vdf": "^2.1.0", @@ -100,12 +100,12 @@ "sass": "^1.70.0", "sass-loader": "^16.0.5", "sinon": "^11.1.1", - "tsc": "^2.0.4", "tsx": "^4.20.5", "typescript": "^5.9.2", "vite-plugin-node-polyfills": "^0.23.0", "vitest": "^3.2.4", "vue": "^3.5.16", + "vue-tsc": "^3.3.5", "wallaby-vue-compiler": "^1.0.3" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fc3d6192c..dc414e14d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -225,9 +225,6 @@ importers: sinon: specifier: ^11.1.1 version: 11.1.2 - tsc: - specifier: ^2.0.4 - version: 2.0.4 tsx: specifier: ^4.20.5 version: 4.21.0 @@ -243,6 +240,9 @@ importers: vue: specifier: ^3.5.16 version: 3.5.31(typescript@5.9.3) + vue-tsc: + specifier: ^3.3.5 + version: 3.3.6(typescript@5.9.3) wallaby-vue-compiler: specifier: ^1.0.3 version: 1.0.6(vue-template-compiler@2.7.16) @@ -1479,6 +1479,15 @@ packages: '@vitest/utils@3.2.4': resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} + '@volar/language-core@2.4.28': + resolution: {integrity: sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==} + + '@volar/source-map@2.4.28': + resolution: {integrity: sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==} + + '@volar/typescript@2.4.28': + resolution: {integrity: sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==} + '@vue/compiler-core@3.5.31': resolution: {integrity: sha512-k/ueL14aNIEy5Onf0OVzR8kiqF/WThgLdFhxwa4e/KF/0qe38IwIdofoSWBTvvxQOesaz6riAFAUaYjoF9fLLQ==} @@ -1512,6 +1521,9 @@ packages: resolution: {integrity: sha512-VsjulR8NUlOq42B0r+Qom9MLDE89OatemeBTy+JlWghkXOQH5NwTuuAWdlC/IsA4wnFkhEWshUbdxEjXPqQb1Q==} hasBin: true + '@vue/language-core@3.3.6': + resolution: {integrity: sha512-LgBMZAy2sR3cQWknpyaxnI6yBkqDfLBPkbdhwRhQCvzfNJRQXPilgQIrdI/v4ytJ0sAq9bWhaPsjqBqneomJ3Q==} + '@vue/reactivity@3.5.31': resolution: {integrity: sha512-DtKXxk9E/KuVvt8VxWu+6Luc9I9ETNcqR1T1oW1gf02nXaZ1kuAx58oVu7uX9XxJR0iJCro6fqBLw9oSBELo5g==} @@ -1587,6 +1599,9 @@ packages: ajv@8.20.0: resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + alien-signals@3.2.1: + resolution: {integrity: sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -3394,6 +3409,9 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: + resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + mute-stream@3.0.0: resolution: {integrity: sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==} engines: {node: ^20.17.0 || >=22.9.0} @@ -4456,11 +4474,6 @@ packages: typescript: optional: true - tsc@2.0.4: - resolution: {integrity: sha512-fzoSieZI5KKJVBYGvwbVZs/J5za84f2lSTLPYf6AGiIf43tZ3GNrI1QzTLcjtyDDP4aLxd46RTZq1nQxe7+k5Q==} - deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. - hasBin: true - tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -4722,6 +4735,9 @@ packages: vm-browserify@1.1.2: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + vscode-uri@3.1.0: + resolution: {integrity: sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==} + vue-component-type-helpers@2.2.12: resolution: {integrity: sha512-YbGqHZ5/eW4SnkPNR44mKVc6ZKQoRs/Rux1sxC6rdwXb4qpbOSYfDr9DsTHolOTGmIKgM9j141mZbBeg05R1pw==} @@ -4744,6 +4760,12 @@ packages: vue-template-compiler@2.7.16: resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} + vue-tsc@3.3.6: + resolution: {integrity: sha512-ERXGgbKSBGFUkavrJ1Iwj0ZVxKqB/5UOx65IXy7fPf2UsoI21n3ssQLwdvx8xyUGgJe9PvSZTM/FYzIdwUDPFA==} + hasBin: true + peerDependencies: + typescript: '>=5.0.0' + vue@3.5.31: resolution: {integrity: sha512-iV/sU9SzOlmA/0tygSmjkEN6Jbs3nPoIPFhCMLD2STrjgOU8DX7ZtzMhg4ahVwf5Rp9KoFzcXeB1ZrVbLBp5/Q==} peerDependencies: @@ -6184,6 +6206,18 @@ snapshots: loupe: 3.2.1 tinyrainbow: 2.0.0 + '@volar/language-core@2.4.28': + dependencies: + '@volar/source-map': 2.4.28 + + '@volar/source-map@2.4.28': {} + + '@volar/typescript@2.4.28': + dependencies: + '@volar/language-core': 2.4.28 + path-browserify: 1.0.1 + vscode-uri: 3.1.0 + '@vue/compiler-core@3.5.31': dependencies: '@babel/parser': 7.29.2 @@ -6272,6 +6306,16 @@ snapshots: - vite - vue + '@vue/language-core@3.3.6': + dependencies: + '@volar/language-core': 2.4.28 + '@vue/compiler-dom': 3.5.31 + '@vue/shared': 3.5.31 + alien-signals: 3.2.1 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + picomatch: 4.0.4 + '@vue/reactivity@3.5.31': dependencies: '@vue/shared': 3.5.31 @@ -6347,6 +6391,8 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + alien-signals@3.2.1: {} + ansi-regex@5.0.1: {} ansi-regex@6.2.2: {} @@ -8332,6 +8378,8 @@ snapshots: ms@2.1.3: {} + muggle-string@0.4.1: {} + mute-stream@3.0.0: {} nanoid@3.3.11: {} @@ -9514,8 +9562,6 @@ snapshots: optionalDependencies: typescript: 5.9.3 - tsc@2.0.4: {} - tslib@1.14.1: {} tslib@2.8.1: {} @@ -9764,6 +9810,8 @@ snapshots: vm-browserify@1.1.2: {} + vscode-uri@3.1.0: {} + vue-component-type-helpers@2.2.12: {} vue-i18n@11.3.0(vue@3.5.31(typescript@5.9.3)): @@ -9788,6 +9836,12 @@ snapshots: de-indent: 1.0.2 he: 1.2.0 + vue-tsc@3.3.6(typescript@5.9.3): + dependencies: + '@volar/typescript': 2.4.28 + '@vue/language-core': 3.3.6 + typescript: 5.9.3 + vue@3.5.31(typescript@5.9.3): dependencies: '@vue/compiler-dom': 3.5.31 diff --git a/src-electron/ipc/node-path-impl.ts b/src-electron/ipc/node-path-impl.ts index 046bdcf76..f1f5077ba 100644 --- a/src-electron/ipc/node-path-impl.ts +++ b/src-electron/ipc/node-path-impl.ts @@ -5,8 +5,8 @@ export function hookPathIpc(browserWindow: BrowserWindow) { ipcMain.on("node:path:join", (event, ...args) => { event.returnValue = path.join(...args); }); - ipcMain.on("node:path:basename", (event, toResolve) => { - event.returnValue = path.basename(toResolve); + ipcMain.on("node:path:basename", (event, base, suffix) => { + event.returnValue = path.basename(base, suffix); }); ipcMain.on("node:path:resolve", (event, ...args) => { event.returnValue = path.resolve(...args); diff --git a/src/components/DeferredInput.vue b/src/components/DeferredInput.vue index f1c4b7606..7147be263 100644 --- a/src/components/DeferredInput.vue +++ b/src/components/DeferredInput.vue @@ -22,5 +22,5 @@ function emitChange(value: string): void { diff --git a/src/components/Progress.vue b/src/components/Progress.vue index e35a9a7b4..1aa845008 100644 --- a/src/components/Progress.vue +++ b/src/components/Progress.vue @@ -18,8 +18,7 @@ type ProgressProps = { const props = withDefaults(defineProps(), { max: 100, - value: undefined, - className: [] + className: () => [] as string[] }); diff --git a/src/components/buttons/DonateButton.vue b/src/components/buttons/DonateButton.vue index 9d27eaf43..4ee2ee5b9 100644 --- a/src/components/buttons/DonateButton.vue +++ b/src/components/buttons/DonateButton.vue @@ -1,6 +1,6 @@