Conversation
- bump knip ^5.88.1 → ^6.0.3 (no config changes needed) - add `pnpm knip` script to package.json - add knip job to pr-checks github action Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Upgrades the repo’s dependency hygiene tooling by moving to knip v6 and adding a dedicated CI job so unused files/deps are caught during PR checks.
Changes:
- Bump
knipto^6.0.3(and update related lockfile resolutions). - Add
pnpm knipas a package script. - Add a
knipjob to the PR checks GitHub Actions workflow.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pnpm-lock.yaml |
Updates lockfile to reflect knip v6 and associated dependency upgrades. |
package.json |
Adds knip script and bumps devDependency versions (including knip). |
.github/workflows/pr-checks.yml |
Introduces a new CI job to run pnpm knip. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: setup node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
There was a problem hiding this comment.
knip@6 (and its oxc-parser dependency) declares engines.node: ^20.19.0 || >=22.12.0 in the lockfile. This job uses node-version: ${{ env.NODE_VERSION }} where NODE_VERSION is currently set to "20", which doesn’t guarantee a >=20.19.0 patch level and can cause pnpm install/pnpm knip to fail on engine checks. Consider pinning NODE_VERSION to 20.19.0+ (or 22.12.0+) or overriding the node version just for this job to match the new engine requirement.
| "oxlint": "^1.56.0", | ||
| "vitest": "^4.1.1", | ||
| "wrangler": "^4.76.0" | ||
| }, |
There was a problem hiding this comment.
After upgrading to knip@^6.0.3, the lockfile indicates a stricter Node engine requirement (^20.19.0 || >=22.12.0). To prevent local installs (and other CI workflows) from breaking on older Node 20 patch versions, consider adding a top-level engines.node in package.json that matches the new requirement (or bumping the project’s documented Node version accordingly).
| }, | |
| }, | |
| "engines": { | |
| "node": "^20.19.0 || >=22.12.0" | |
| }, |
| "@typescript/native-preview": "7.0.0-dev.20260323.1", | ||
| "knip": "^6.0.3", | ||
| "oxfmt": "^0.36.0", |
There was a problem hiding this comment.
PR description says knip is bumped from ^5.88.1, but package.json shows the previous specifier as ^5.86.0. If the description is meant to reflect the actual before/after, please update it (or adjust the dependency version if the intent was to start from ^5.88.1).
Summary
^5.88.1→^6.0.3(v6 uses oxc-parser instead of TS LanguageService — faster, no config changes needed for this repo)"knip": "knip"script to package.jsonknipjob topr-checks.ymlgithub action (runs in parallel with lint, format-check, test)Test plan
pnpm knippasses clean🤖 Generated with Claude Code