Skip to content

[codex] Remove unused LitzRouteRule public API - #198

Merged
samlaycock merged 2 commits into
mainfrom
codex/remove-litz-route-rule
May 19, 2026
Merged

[codex] Remove unused LitzRouteRule public API#198
samlaycock merged 2 commits into
mainfrom
codex/remove-litz-route-rule

Conversation

@samlaycock

Copy link
Copy Markdown
Owner

Summary

Removes the unused LitzRouteRule type before the 1.0 API surface is stabilized.

Root cause

LitzRouteRule was exported from litzjs/vite, but no runtime path consumed it. Keeping it public would imply support for route-level cache, headers, redirects, prerendering, and proxy behavior that Litz does not implement for 1.0.

Changes

  • Deleted the LitzRouteRule interface from the Vite type definitions.
  • Removed LitzRouteRule from the litzjs/vite public type export.
  • Added a patch changeset documenting the public API cleanup.

Validation

  • bun fmt
  • bun lint:fix
  • bun run test
  • bun typecheck
  • bun lint

Closes #191

Remove the unused LitzRouteRule interface from the Vite type surface and stop exporting it from litzjs/vite.

This avoids stabilizing route-level cache, header, redirect, prerender, and proxy type hints that are not implemented for 1.0.

Refs #191
@samlaycock
samlaycock marked this pull request as ready for review May 19, 2026 20:13
@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes the LitzRouteRule type from the litzjs/vite public API before the 1.0 surface is stabilized, since no runtime code consumed it and keeping it exported would falsely imply cache, headers, redirect, prerender, and proxy behavior that Litz does not implement.

  • src/vite/types.ts: the entire LitzRouteRule interface is deleted; a codebase-wide search confirms zero remaining references.
  • src/vite.ts: LitzRouteRule is dropped from the import and from the export type { … } re-export; LitzPluginOptions is unaffected.
  • .changeset/remove-litz-route-rule.md: documents the removal with a minor bump, correctly signaling a breaking API change to consumers.

Confidence Score: 5/5

This is a straightforward dead-code removal — the type had no runtime consumers and is fully excised from imports, exports, and the type definitions file.

The change is a clean, surgical deletion confirmed by a codebase-wide search showing zero remaining references to LitzRouteRule. The changeset correctly flags it as a minor (breaking) bump so downstream consumers are warned before upgrading.

No files require special attention.

Important Files Changed

Filename Overview
src/vite/types.ts Removes the entire LitzRouteRule interface — clean deletion with no remaining references in the codebase.
src/vite.ts Removes the LitzRouteRule import and drops it from the public re-export; LitzPluginOptions export is unchanged.
.changeset/remove-litz-route-rule.md Changeset correctly uses a minor bump to signal the backward-incompatible type removal.

Reviews (2): Last reviewed commit: "fix: mark route rule removal as minor" | Re-trigger Greptile

Comment thread .changeset/remove-litz-route-rule.md
Update the changeset for the LitzRouteRule public API removal from patch to minor so consumers get the correct semver signal for the breaking type-level change.

Refs #191
@samlaycock
samlaycock merged commit 591875e into main May 19, 2026
3 checks passed
@samlaycock
samlaycock deleted the codex/remove-litz-route-rule branch May 19, 2026 20:22
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.

Remove unused LitzRouteRule public API before 1.0

1 participant