Skip to content

chore: upgrade knip to v6, add CI job#3

Merged
jergason merged 1 commit intomainfrom
chore/knip-6
Mar 23, 2026
Merged

chore: upgrade knip to v6, add CI job#3
jergason merged 1 commit intomainfrom
chore/knip-6

Conversation

@jergason
Copy link
Copy Markdown
Owner

Summary

  • Bump knip ^5.88.1^6.0.3 (v6 uses oxc-parser instead of TS LanguageService — faster, no config changes needed for this repo)
  • Add "knip": "knip" script to package.json
  • Add knip job to pr-checks.yml github action (runs in parallel with lint, format-check, test)

Test plan

  • pnpm knip passes clean
  • All existing checks still pass (tests, lint, format, types)

🤖 Generated with Claude Code

- 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>
Copilot AI review requested due to automatic review settings March 23, 2026 15:29
@jergason jergason merged commit aab3a9c into main Mar 23, 2026
2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 knip to ^6.0.3 (and update related lockfile resolutions).
  • Add pnpm knip as a package script.
  • Add a knip job 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.

Comment on lines +124 to +128
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread package.json
"oxlint": "^1.56.0",
"vitest": "^4.1.1",
"wrangler": "^4.76.0"
},
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
},
},
"engines": {
"node": "^20.19.0 || >=22.12.0"
},

Copilot uses AI. Check for mistakes.
Comment thread package.json
Comment on lines +18 to 20
"@typescript/native-preview": "7.0.0-dev.20260323.1",
"knip": "^6.0.3",
"oxfmt": "^0.36.0",
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants