Skip to content

fix: remove unused stale copy of src/formats.ts - #2041

Open
DoctorGuidance wants to merge 1 commit into
elysiajs:mainfrom
DoctorGuidance:fix/remove-stale-formats-copy
Open

DoctorGuidance wants to merge 1 commit into
elysiajs:mainfrom
DoctorGuidance:fix/remove-stale-formats-copy

Conversation

@DoctorGuidance

@DoctorGuidance DoctorGuidance commented Nov 2, 2026 •

Copy link
Copy Markdown

Prerequisted

  • I have run the tests and they pass
  • I have added tests to prevent regression in the future that prove my fix is effective or that my feature works
  • I understand that I'll write a detailed description of the PR and that it will be reviewed by a human

Related issue

Fixes #2021

Description

src/formats.ts was an unreferenced, outdated duplicate of src/type-system/format.ts.
Because build.ts builds src/**/*.ts, this duplicate was compiled into dist/formats.js and dist/formats.mjs even though neither Elysia core nor package.json exports it.

This PR removes src/formats.ts. All live format definitions and registries continue to be served by src/type-system/format.ts and exported via src/type-system/index.ts.

I have nothing but my burger and I want nothing more

Summary by CodeRabbit

  • Breaking Changes
    • Built-in validation for dates and times, URIs, network addresses, email addresses, UUIDs, JSON pointers, numeric values, and other formatted strings is no longer available. Applications that relied on these checks may need to provide equivalent validation themselves.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d1df401f-01bf-42f5-be2b-2f6ce0cc58cc
Commits

Reviewing files that changed from the base of the PR and between e037eca and fb33b2a.

Files selected for processing: 1
  • src/formats.ts
Files with no reviewable changes: 1
  • src/formats.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The pull request deletes src/formats.ts, which contained an exported format-name type, a format registry, and validation helpers.

Changes

Format registry removal

Layer / File(s) Summary
Remove the stale format registry
src/formats.ts
The file and its format-name type, registry, patterns, and validation helpers are removed.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: saltyaom

Merge Risk: Minimal · up to fb33b

The deletion preserves the supported format APIs and their implementation. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: removing the unused stale copy of src/formats.ts.
Description check Passed The description includes the required sections, linked issue, change rationale, affected build output, and AI policy disclosure. It is sufficiently detailed, although it does not specify the required …
Linked Issues check Passed Issue #2021 requires deletion of the unused stale src/formats.ts copy. The pull request deletes that file and leaves live format definitions in src/type-system/format.ts, as stated in the PR descr…
Out of Scope Changes check Passed The reviewed change only deletes src/formats.ts, including its obsolete FormatName and fullFormats exports. This change directly supports issue #2021 and shows no unrelated implementation or tes…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Description check

Explanation

The description includes the required sections, linked issue, change rationale, affected build output, and AI policy disclosure. It is sufficiently detailed, although it does not specify the required bun run test command.

Full details: Linked Issues check

Explanation

Issue #2021 requires deletion of the unused stale src/formats.ts copy. The pull request deletes that file and leaves live format definitions in src/type-system/format.ts, as stated in the PR description. The change addresses the stale build artifact without requiring unrelated runtime changes. Cute little duplicate, gone at last~ ♡

Full details: Out of Scope Changes check

Explanation

The reviewed change only deletes src/formats.ts, including its obsolete FormatName and fullFormats exports. This change directly supports issue #2021 and shows no unrelated implementation or test changes. Nothing out of scope here, unlike that stale file~ ( ̄▽ ̄)♡

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

One old format file takes its bow~ ♡
Its registry is gone now, you noticed? ( ̄▽ ̄)
The validators leave with it too~
No runtime change is reported here ♡
A tidy little diff, not bad, huh~ (¬‿¬)

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.

src/formats.ts is an unused, stale copy of src/type-system/format.ts

1 participant