Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,20 @@ jobs:
run: pnpm install
- name: Check outdated
run: pnpm outdated
knip:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
runs-on: ubuntu-latest
Comment on lines +146 to +148

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-level if condition only evaluates to true for push events or PRs from forks (github.event.pull_request.head.repo.fork). This will skip running Knip (and the other jobs using the same condition) for pull requests coming from branches within the same repository. If the intent is to run on all PRs, update the condition to check github.event_name == 'push' || github.event_name == 'pull_request' (or remove the job-level if and rely on the workflow triggers).

Copilot uses AI. Check for mistakes.
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4.0.0
with:
version: ${{ env.PNPM_VERSION }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install
run: pnpm install
- name: Knip
run: pnpm knip
Comment on lines +154 to +162

Copilot AI Apr 3, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

knip@6.3.0 declares engines: { node: ^20.19.0 || >=22.12.0 } (per pnpm-lock.yaml), but this workflow installs Node using NODE_VERSION: "20". Depending on what actions/setup-node resolves to, pnpm knip can fail with an engine/runtime mismatch on older 20.x versions. Consider pinning NODE_VERSION to 20.19.0+ (or moving CI to Node 22+) so the Knip job is consistently runnable.

Copilot uses AI. Check for mistakes.
12 changes: 12 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"tags": ["-lintignore"],
"entry": ["src/scripts/*.ts", "vitest.snapshot.diff.ts"],
"ignoreDependencies": [
"pixelmatch",
"pngjs",
"@types/pixelmatch",
"@types/pngjs"
],
"ignoreBinaries": ["only-allow"]
}
15 changes: 5 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"preinstall": "npx only-allow pnpm",
"puppeteer": "tsx ./scripts/puppeteer.ts",
"puppeteer:report": "tsx ./scripts/puppeteer-report.ts",
"puppeteer:reset": "pnpm run cache:clear && pnpm run build && rm -rf ./shots && mkdir ./shots"
"puppeteer:reset": "pnpm run cache:clear && pnpm run build && rm -rf ./shots && mkdir ./shots",
"knip": "knip"
},
"dependencies": {
"@astrojs/rss": "^4.0.18",
Expand All @@ -34,43 +35,37 @@
"dotenv": "^17.4.0",
"expost": "github:bsoule/expost#920313519f180153c00f2f4f4c78b4f86974517e",
"feather-icons": "^4.29.2",
"findup-sync": "^5.0.0",
"happy-dom": "^20.8.9",
"levenshtein": "^1.0.5",
"memize": "^2.1.1",
"node-fetch-cache": "^3.1.4",
"p-limit": "^7.3.0",
"sanitize-html": "^2.17.2",
"sharp": "^0.34.5",
"striptags": "^3.2.0",
"tsx": "^4.21.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@anatine/zod-mock": "^3.14.0",
"@faker-js/faker": "^9.9.0",
"@astrojs/check": "^0.9.8",
"@types/diffable-html": "^5.0.2",
"@types/feather-icons": "^4.29.4",
"@types/findup-sync": "^4.0.5",
"@types/levenshtein": "^1.0.4",
"@types/node": "^25.5.2",
"@types/node-fetch-cache": "^3.0.5",
"@types/pixelmatch": "^5.2.6",
"@types/pngjs": "^6.0.5",
"@types/sanitize-html": "^2.16.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitest/ui": "^0.34.7",
"concurrently": "^9.2.1",
"csv-parse": "^6.2.1",
"diffable-html": "^6.0.1",
"eslint": "^8.57.1",
"knip": "^6.3.0",
"pixelmatch": "^7.1.0",
"pixelteer": "github:narthur/pixelteer",
"pngjs": "^7.0.0",
"prettier": "3.8.1",
"puppeteer": "24.40.0",
"typescript": "^5.6.3",
"vite": "^4.5.5",
"vitest": "^2.1.3"
}
}
Loading
Loading