Skip to content

feat: export Format from Typebox#252

Merged
gurgunday merged 1 commit intofastify:mainfrom
pitininja:typebox-format-export
Oct 19, 2025
Merged

feat: export Format from Typebox#252
gurgunday merged 1 commit intofastify:mainfrom
pitininja:typebox-format-export

Conversation

@pitininja
Copy link
Contributor

@pitininja pitininja commented Oct 8, 2025

Description

The lib now exports the Format variable from typebox/format.
Previously it was FormatRegistry but it's no longer available since Typebox v1 upgrade.
Format can be used to register formats on the Typebox instance used by the Fastify plugin.
I've added some documentation about the Format module in the Readme.

Issue

Closes #251

Checklist

  • run npm run test && npm run benchmark --if-present
  • tests and/or benchmarks are included
    • To me the change I made does not need new tests but tell me if it does
  • documentation is changed or added
  • commit message and code follows the Developer's Certification of Origin
    and the Code of conduct

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

It's a good opportunity to add a test that uses Format

- Export Format from typebox/format.
- Replaced the former FormatRegistry from previous Typebox version.
- Added tests using string format.
@pitininja
Copy link
Contributor Author

It's a good opportunity to add a test that uses Format

I added a test using string format 👍

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

Thank you!

lgtm

@gurgunday gurgunday merged commit afa05c4 into fastify:main Oct 19, 2025
12 checks passed
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.

Export Format from the Typebox library

3 participants