Skip to content

refactor(repo): remove dead and internal-only public exports#124

Merged
zrosenbauer merged 4 commits intomainfrom
refactor/trim-public-exports
Mar 30, 2026
Merged

refactor(repo): remove dead and internal-only public exports#124
zrosenbauer merged 4 commits intomainfrom
refactor/trim-public-exports

Conversation

@zrosenbauer
Copy link
Copy Markdown
Member

Summary

  • Remove 4 dead sub-entrypoints from @kidd-cli/core (./config, ./format, ./store, ./project) — zero imports anywhere in the codebase
  • Remove @kidd-cli/utils/redact sub-entrypoint — zero cross-package imports (@pinojs/redact is used directly instead)
  • Trim @kidd-cli/bundler barrel to only externally consumed exports: build, compile, watch, resolveTargetLabel, createAutoloadPlugin + consumed types. Removes 8 internal-only functions (generateAutoloaderParts, generateStaticAutoloader, mapToBuildConfig, mapToWatchConfig, detectBuildEntry, normalizeCompileOptions, resolveConfig, scanCommandsDir) and unused types (AsyncBundlerResult, BundlerResult, ResolvedBuildOptions, ResolvedBundlerConfig, ResolvedCompileOptions, ScanResult, ScannedDir, ScannedFile, StaticAutoloaderParts)

No source files, tests, or internal implementations were changed — only the public-facing export surface.

Test plan

  • pnpm check passes (typecheck + lint + format)
  • pnpm test passes (881 tests across all packages)
  • Verify no downstream consumers rely on removed exports

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
oss-kidd Ignored Ignored Preview Mar 30, 2026 1:48am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 30, 2026

🦋 Changeset detected

Latest commit: 53b0daa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@kidd-cli/core Minor
@kidd-cli/utils Minor
@kidd-cli/bundler Minor
@kidd-cli/cli Patch
@kidd-cli/config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 91f84509-27fe-4e64-b544-f0e8cfb1db1d

📥 Commits

Reviewing files that changed from the base of the PR and between 9eb0715 and 53b0daa.

📒 Files selected for processing (1)
  • packages/core/src/ui/use-key-binding.ts

📝 Walkthrough

Walkthrough

This PR reduces the public API surface across packages by removing multiple exports and an entire module. In packages/bundler, several value and type exports (autoloader generators, config mappers/resolvers, and a scan utility) were removed from the entry. In packages/core, four package.json export subpaths (./config, ./format, ./store, ./project) were removed and the runtime dependency jsonc-parser was dropped. In packages/utils, the redact build entry, its export subpath, the SENSITIVE_PATTERNS constant, sanitize() function, and their test file were deleted; the tsdown config entry for redact was also removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main objective: removing dead and internal-only public exports across multiple packages.
Description check ✅ Passed The description clearly documents the rationale for all removals, supported by verification that removed exports have zero imports in the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/trim-public-exports

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 30, 2026

Merging this PR will not alter performance

✅ 2 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing refactor/trim-public-exports (53b0daa) with main (75ee32a)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

zrosenbauer and others added 3 commits March 29, 2026 21:40
Remove sub-entrypoints and barrel exports that are either never consumed
or only used internally within their own package:

- @kidd-cli/core: remove ./config, ./format, ./store, ./project (zero imports)
- @kidd-cli/utils: remove ./redact sub-entrypoint (zero cross-package imports)
- @kidd-cli/bundler: trim index to only externally consumed exports
  (build, compile, watch, resolveTargetLabel, createAutoloadPlugin + types)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
- Delete `packages/utils/src/redact.ts` and its tests (zero consumers)
- Remove `redact` entry from utils tsdown config
- Remove dead `jsonc-parser` dependency from core
- Restore `lib/config` as internal-only module (used by runtime via dynamic import)
- Update changeset description

Co-Authored-By: Claude <noreply@anthropic.com>
@zrosenbauer zrosenbauer force-pushed the refactor/trim-public-exports branch from 6600505 to 9eb0715 Compare March 30, 2026 01:41
Fix `jsdoc-js(multiline-blocks)` lint errors in `use-key-binding.ts`
caught by CI's oxlint version.

Co-Authored-By: Claude <noreply@anthropic.com>
@zrosenbauer zrosenbauer merged commit c9ca207 into main Mar 30, 2026
7 checks passed
@zrosenbauer zrosenbauer deleted the refactor/trim-public-exports branch March 30, 2026 02:01
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