Skip to content

improvement(knip): check entry exports of private packages and delete their dead barrels - #8595

Merged
waleedlatif1 merged 6 commits into
stagingfrom
improvement/private-package-entry-exports
Oct 3, 2026
Merged

waleedlatif1 merged 6 commits into
stagingfrom
improvement/private-package-entry-exports

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • check:unused-exports never reported entry exports, so the private workspace packages had no export checking at all — @sim/emcn exports ./*, which made every emcn file an entry.
  • includeEntryExports is now on by default; the apps (framework entries), the published packages (cli, sim-cli, sim-setup, ts-sdk), db (standalone scripts), and the root opt out. A new private package is checked without opting in.
  • Every finding this exposed is resolved rather than baselined — the baseline adds nothing:
    • dead barrels removed: the @sim/utils and @sim/workflow-persistence root barrels (every caller uses a subpath), unused @sim/workflow-renderer, @sim/desktop-bridge, and @sim/emcn re-exports
    • exports used only in their own file lose export (component props interfaces are kept, just not exported)
    • unused declarations deleted, e.g. emcn RadarChart, ChipModalPromptBody, 7 unreferenced icons, unused protocol aliases and @sim/utils helpers
    • three exports whose consumer knip cannot see carry a @public tag saying why (ChipTimePicker as documented chip-family API, a module generate-docs.ts loads by path, and the check:utils replacement for crypto.randomBytes())

Type of Change

  • Improvement

Testing

  • bun run lint, bun run type-check, bun run check:audits (58, incl. check:unused-exports and check:desktop-bridge), docs-manifest:check, block-registry check, root bun run test
  • Confirmed the @public tag is load-bearing: removing it re-reports the export

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner October 3, 2026 07:58
@vercel

vercel Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 3, 2026 9:02am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Removes unused exports from private packages and updates import paths.

The PR appears safe to merge; no outstanding findings or new actionable issues were identified.

Summary

The PR enables entry-export checking for private packages, removes unused exports and barrels, and updates affected imports. Since the previous review, it also makes unused tool types file-local or deletes them and shrinks the unused-export baseline.

Reviews (4) · Last reviewed commit: "chore(knip): shrink the unused-exports b..."

Comment thread scripts/check-unused-exports.baseline.json Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 31 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread scripts/check-unused-exports.baseline.json Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 94 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 force-pushed the improvement/private-package-entry-exports branch from e1f9827 to 74d2b68 Compare October 3, 2026 08:46
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 96 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

… their dead barrels

- knip.jsonc: includeEntryExports on for every private package except db
- delete the bare @sim/utils and @sim/workflow-persistence barrels and their "." exports
- drop unused re-exports from the workflow-renderer and desktop-bridge barrels; un-export symbols only used in-file
- delete 7 unreferenced emcn icons
- baseline the remaining 262 entry-export findings (one-time rule expansion via --update --init)
…export check exposed

- Delete exports nothing uses: RadarChart, ChipModalPromptBody, InputOTPSeparator,
  DropdownMenuGroup/Portal, legacy terminal tool names, and dead types and helpers
- Drop `export` from declarations used only in their own file, and remove barrel
  re-exports no consumer imports
- Tag getOAuthClientCapabilityFields and generateRandomBytes `@public`: generate-docs
  loads the first by file path, and check:utils names the second
- Trim the workflow-authz mock to the module's remaining exports
- The unused-exports baseline gains no entries and drops one
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the improvement/private-package-entry-exports branch from 74d2b68 to 6ac3229 Compare October 3, 2026 09:00
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 96 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 1f5001c into staging Oct 3, 2026
36 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/private-package-entry-exports branch October 3, 2026 09:13

This branch was successfully deployed

1 active deployment
Preview — 6ac32291 Deployed Oct 3, 2026 by vercel[bot]
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.

1 participant