From 324a04f2ed1b3d5201573833b1d248a19f7c4b5a Mon Sep 17 00:00:00 2001 From: "danil.radkovskyi" Date: Fri, 31 Jul 2026 16:03:45 +0200 Subject: [PATCH 1/3] Add CI workflow config Add .github/workflows/ci.yaml matching the bare template, and add the test:types and test:unit scripts to package.json so the workflow's typecheck, lint, unit-test, and build steps all run. Downgrade typescript from 7.0.2 to 6.0.3 so it satisfies the typescript-eslint peer range; typescript-eslint has no released version supporting TS 7.0 yet, and the previous pin broke npm install and lint. Built with Snoocode --- .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ package.json | 4 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..0613829 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +name: CI + +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7.0.0 + - name: Install Node.js + uses: actions/setup-node@v6.4.0 + with: + node-version: 22.6.0 + - name: Install Dependencies + run: npm install --no-fund + - parallel: + - name: Typecheck + run: npm run test:types + - name: Lint + run: npm run lint + - name: Unit Test + run: npm run test:unit + - name: Build + run: npm run build diff --git a/package.json b/package.json index fbf045e..4b0dc0f 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "lint": "eslint 'src/**/*.{ts,tsx}'", "login": "devvit login", "prettier": "prettier --write .", + "test:types": "tsc --build", + "test:unit": "node --experimental-strip-types --no-warnings=ExperimentalWarning --test \"src/**/*.test.ts\"", "type-check": "tsc --build" }, "engines": { @@ -31,7 +33,7 @@ "eslint": "10.8.0", "globals": "17.8.0", "prettier": "3.9.6", - "typescript": "7.0.2", + "typescript": "6.0.3", "typescript-eslint": "8.65.0", "vite": "8.1.5" } From ae96c1d90d9999e94faa89792385936c20c111f9 Mon Sep 17 00:00:00 2001 From: "danil.radkovskyi" Date: Fri, 31 Jul 2026 16:11:47 +0200 Subject: [PATCH 2/3] Fix CI node version for vite 8 Bump the CI node-version from 22.6.0 to 22.20.0 so the build works: this template uses vite 8 / rolldown, which require node ^20.19.0 || >=22.12.0, so the build failed on 22.6.0 with a missing rolldown native binding. Also bump engines.node to >=22.12.0 to match. Built with Snoocode --- .github/workflows/ci.yaml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0613829..10e7193 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v6.4.0 with: - node-version: 22.6.0 + node-version: 22.20.0 - name: Install Dependencies run: npm install --no-fund - parallel: diff --git a/package.json b/package.json index 4b0dc0f..5e97f64 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "type-check": "tsc --build" }, "engines": { - "node": ">=22.2.0" + "node": ">=22.12.0" }, "dependencies": { "@devvit/start": "0.13.10", From 2c830f1ee1762671894c0316ecdd17f3bae59efd Mon Sep 17 00:00:00 2001 From: "danil.radkovskyi" Date: Fri, 31 Jul 2026 16:20:37 +0200 Subject: [PATCH 3/3] Remove duplicate type-check script Remove the type-check script (identical to test:types) and point the deploy script at test:types instead, to avoid a duplicate script. Built with Snoocode --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5e97f64..3046602 100644 --- a/package.json +++ b/package.json @@ -6,15 +6,14 @@ "type": "module", "scripts": { "build": "vite build", - "deploy": "npm run type-check && npm run lint && devvit upload", + "deploy": "npm run test:types && npm run lint && devvit upload", "dev": "devvit playtest", "launch": "npm run deploy && devvit publish", "lint": "eslint 'src/**/*.{ts,tsx}'", "login": "devvit login", "prettier": "prettier --write .", "test:types": "tsc --build", - "test:unit": "node --experimental-strip-types --no-warnings=ExperimentalWarning --test \"src/**/*.test.ts\"", - "type-check": "tsc --build" + "test:unit": "node --experimental-strip-types --no-warnings=ExperimentalWarning --test \"src/**/*.test.ts\"" }, "engines": { "node": ">=22.12.0"