From bbbc220c68383915699f5cb10fc16d2f7092378a Mon Sep 17 00:00:00 2001 From: Szymon Szulc Date: Mon, 25 May 2026 23:52:47 +0200 Subject: [PATCH 1/6] postmortem changes --- packages/typegpu-cli/src/utils/files.ts | 2 +- packages/typegpu-cli/src/utils/pm.ts | 2 +- .../typegpu-cli/templates/template-vite-simple/_package.json | 3 ++- .../templates/template-vite-simple/oxlint.config.ts | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/typegpu-cli/src/utils/files.ts b/packages/typegpu-cli/src/utils/files.ts index f1414b6a22..506d67cbbc 100644 --- a/packages/typegpu-cli/src/utils/files.ts +++ b/packages/typegpu-cli/src/utils/files.ts @@ -70,5 +70,5 @@ export function copyTemplate(templateDir: string, projectDir: string, packageNam failAndExit(`[INTERNAL] Invalid package.json in template ${templateDir}`, pkg.summary); } pkg.name = packageName; - fs.writeFileSync(destPackage, JSON.stringify(pkg, null, 2)); + fs.writeFileSync(destPackage, JSON.stringify(pkg, null, 2) + '\n' /* to make oxfmt happy */); } diff --git a/packages/typegpu-cli/src/utils/pm.ts b/packages/typegpu-cli/src/utils/pm.ts index c00453187b..a3191f8a70 100644 --- a/packages/typegpu-cli/src/utils/pm.ts +++ b/packages/typegpu-cli/src/utils/pm.ts @@ -18,7 +18,7 @@ export function pmFromUserAgent(userAgent: string | undefined) { if (pm === undefined) { failAndExit(`Cannot determine package manager from user agent env.`); } - return pm as unknown as Agent; + return pm as Agent; } function runCommand(command: string, args: string[], interactive?: boolean) { diff --git a/packages/typegpu-cli/templates/template-vite-simple/_package.json b/packages/typegpu-cli/templates/template-vite-simple/_package.json index 23355511db..e40bfa0590 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/_package.json +++ b/packages/typegpu-cli/templates/template-vite-simple/_package.json @@ -8,7 +8,8 @@ "build": "tsc && vite build", "preview": "vite preview", "check": "oxlint && oxfmt --check", - "fix": "oxlint --fix && oxfmt" + "fix": "oxlint --fix && oxfmt", + "types": "tsc --p ./tsconfig.json --noEmit" }, "dependencies": { "@typegpu/color": "^0.11.0", diff --git a/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts b/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts index 7b676ba672..73a3a0e361 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts +++ b/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts @@ -12,7 +12,6 @@ export default defineConfig({ ...typegpu.configs.recommended.rules, 'typescript/no-non-null-assertion': 'error', 'typescript/no-explicit-any': 'error', - 'typescript/no-unsafe-type-assertion': 'off', 'import/no-named-as-default': 'off', }, env: { From 6d78ba093084d9a7669168c953619adf09c1789a Mon Sep 17 00:00:00 2001 From: Szymon Szulc Date: Tue, 26 May 2026 00:17:48 +0200 Subject: [PATCH 2/6] tsover note --- packages/typegpu-cli/src/create.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/typegpu-cli/src/create.ts b/packages/typegpu-cli/src/create.ts index 7b7cda6756..492b9ceac5 100644 --- a/packages/typegpu-cli/src/create.ts +++ b/packages/typegpu-cli/src/create.ts @@ -73,6 +73,11 @@ export async function createProject(cwd: string) { if (steps.length > 0) { msg += ` To get started run:\n\n`; msg += steps.join('\n'); + msg += `\n\n`; + msg += `\ + Note: If you are using VS Code or Cursor, you may need to run + “TypeScript: Select TypeScript Version” and choose + “Use Workspace Version” to enable tsover.`; } p.outro(msg); From 99bc62b523721c00c8638b50d57b59414e450c06 Mon Sep 17 00:00:00 2001 From: Szymon Szulc Date: Tue, 26 May 2026 00:41:26 +0200 Subject: [PATCH 3/6] slider css --- .../template-vite-simple/src/style.css | 52 ------------------- 1 file changed, 52 deletions(-) diff --git a/packages/typegpu-cli/templates/template-vite-simple/src/style.css b/packages/typegpu-cli/templates/template-vite-simple/src/style.css index 06e18eb954..0bc754103e 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/src/style.css +++ b/packages/typegpu-cli/templates/template-vite-simple/src/style.css @@ -69,58 +69,6 @@ p { margin: 0; } -.slider { - appearance: none; - width: 200px; - height: 4px; - border-radius: 2px; - background: var(--accent-bg); - border: none; - outline: none; - cursor: pointer; - touch-action: pan-y; - margin-bottom: 24px; - - &::-webkit-slider-runnable-track { - height: 4px; - background: var(--accent-bg); - border-radius: 2px; - } - - &::-webkit-slider-thumb { - appearance: none; - width: 18px; - height: 18px; - margin-top: -7px; - border-radius: 50%; - background: var(--accent); - cursor: pointer; - transition: opacity 0.2s; - } - - &::-moz-range-track { - height: 4px; - background: var(--accent-bg); - border-radius: 2px; - border: none; - } - - &::-moz-range-thumb { - width: 18px; - height: 18px; - border-radius: 50%; - background: var(--accent); - cursor: pointer; - border: none; - } - - &:focus-visible { - outline: 2px solid var(--accent); - outline-offset: 4px; - border-radius: 4px; - } -} - #typegpu picture { display: flex; align-items: center; From 589557d5ad28f4e0cf35f9f6e564ed303fee9145 Mon Sep 17 00:00:00 2001 From: Szymon Szulc Date: Tue, 26 May 2026 13:25:36 +0200 Subject: [PATCH 4/6] unused packages in simple vite template --- .../typegpu-cli/templates/template-vite-simple/_package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/typegpu-cli/templates/template-vite-simple/_package.json b/packages/typegpu-cli/templates/template-vite-simple/_package.json index e40bfa0590..db91666f73 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/_package.json +++ b/packages/typegpu-cli/templates/template-vite-simple/_package.json @@ -12,8 +12,6 @@ "types": "tsc --p ./tsconfig.json --noEmit" }, "dependencies": { - "@typegpu/color": "^0.11.0", - "@typegpu/noise": "^0.11.0", "typegpu": "^0.11.6" }, "devDependencies": { From cfe59a0f1f776782277b3ed29554cf55efbe0c07 Mon Sep 17 00:00:00 2001 From: Szymon Szulc Date: Tue, 26 May 2026 15:20:21 +0200 Subject: [PATCH 5/6] oxlint no unsafe casts --- .../typegpu-cli/templates/template-vite-simple/oxlint.config.ts | 1 + packages/typegpu-cli/templates/template-vite-simple/src/main.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts b/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts index 73a3a0e361..7b676ba672 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts +++ b/packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts @@ -12,6 +12,7 @@ export default defineConfig({ ...typegpu.configs.recommended.rules, 'typescript/no-non-null-assertion': 'error', 'typescript/no-explicit-any': 'error', + 'typescript/no-unsafe-type-assertion': 'off', 'import/no-named-as-default': 'off', }, env: { diff --git a/packages/typegpu-cli/templates/template-vite-simple/src/main.ts b/packages/typegpu-cli/templates/template-vite-simple/src/main.ts index bcc2647cdc..d5e4569789 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/src/main.ts +++ b/packages/typegpu-cli/templates/template-vite-simple/src/main.ts @@ -3,7 +3,7 @@ import tgpu, { common, d } from 'typegpu'; const root = await tgpu.init(); // oxlint-disable-next-line typescript/no-non-null-assertion -const canvas = document.querySelector('#canvas')!; +const canvas = document.querySelector('#canvas') as HTMLCanvasElement; const context = root.configureContext({ canvas }); const pipeline = root.createRenderPipeline({ From 9fba171bb3953ae4df166d38508064cd47e4ccba Mon Sep 17 00:00:00 2001 From: Szymon Szulc Date: Tue, 26 May 2026 15:28:27 +0200 Subject: [PATCH 6/6] unused oxlint disable --- packages/typegpu-cli/templates/template-vite-simple/src/main.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/typegpu-cli/templates/template-vite-simple/src/main.ts b/packages/typegpu-cli/templates/template-vite-simple/src/main.ts index d5e4569789..53de8d3c06 100644 --- a/packages/typegpu-cli/templates/template-vite-simple/src/main.ts +++ b/packages/typegpu-cli/templates/template-vite-simple/src/main.ts @@ -2,7 +2,6 @@ import tgpu, { common, d } from 'typegpu'; const root = await tgpu.init(); -// oxlint-disable-next-line typescript/no-non-null-assertion const canvas = document.querySelector('#canvas') as HTMLCanvasElement; const context = root.configureContext({ canvas });