fix(knip): scope packages/* entry exports so dead code gets flagged - #208
Merged
fennifith merged 1 commit intoAug 22, 2026
Conversation
knip's default entry-file exemption treated every package's src/index.ts as a public API boundary, even though these are all private internal workspace packages with no external consumer. Add includeEntryExports for packages/* in knip.json, matching the existing apps/worker override. Also remove the exports this newly surfaces as genuinely dead (no consumers anywhere, including tests), and drop export on ones only used within their own file: - packages/bullmq: DELETE_S3_OBJECT_GRACE_PERIOD_MS, PostImageInputSchema, TasksKeys un-exported; TaskInputsValues/TaskOutputsValues removed (never referenced anywhere) - packages/common: EnvSchema un-exported; EnvType removed (never referenced) - packages/github-api: FIRST_CONTRIBUTOR_YEAR un-exported; getCommits/ GetCommitsParams removed entirely - superseded by the GraphQL-based getAuthorGitHubStats, never wired up to any caller - packages/s3: exists/matchesEtag removed - matchesEtag's ETag-based check was superseded by the LastModified-based approach from playfulprogramming#197's delete-s3-object work, exists had no callers
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fennifith
approved these changes
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #204
Problem
knip's default entry-file exemption treats every package's declared main (
src/index.ts) as a public API boundary — reasonable for a package with real external consumers, but wrong forpackages/*here, since these are allprivate: trueinternal workspace packages with no consumer outside this monorepo. As a result, knip wasn't catching genuinely dead exports in these packages, which is how a deadlist()function andS3Objectinterface inpackages/s3/src/utils.tswent unflagged through multiple cleantest:unitruns.Fix
One-line addition to
knip.json, matching the existingapps/workeroverride pattern: