Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Addresses the peer dependency mismatch between @fastify/type-provider-typebox v6 (which requires typebox) and the existing @sinclair/typebox dependency.

Changes

  • Dependencies: Replaced @sinclair/typebox@^0.34.48 with typebox@^1.0.81
  • Import updates: Changed all imports from @sinclair/typeboxtypebox across source files
  • API migration: Adapted UnionOneOf custom type for typebox v1.x
    • Replaced Kind symbol with '~kind' string literal
    • Updated SchemaOptionsTSchemaOptions
    • Removed TypeRegistry usage (no longer exists in v1.x; oneOf validation is handled natively by Ajv)

Example

Before:

import { Type } from "@sinclair/typebox";

After:

import { Type } from "typebox";

The UnionOneOf helper continues to generate standard JSON Schema oneOf objects that are validated by Fastify's Ajv instance.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 9, 2026 08:07
Co-authored-by: FlandiaYingman <9929037+FlandiaYingman@users.noreply.github.com>
Co-authored-by: FlandiaYingman <9929037+FlandiaYingman@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback by switching to typebox Migrate from @sinclair/typebox to typebox package Feb 9, 2026
Copilot AI requested a review from FlandiaYingman February 9, 2026 08:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the codebase from @sinclair/typebox to the typebox package to resolve the peer dependency mismatch with @fastify/type-provider-typebox v6.

Changes:

  • Replaced the dependency @sinclair/typebox with typebox (and updated the lockfile).
  • Updated all source imports from @sinclair/typeboxtypebox.
  • Migrated the custom UnionOneOf helper to the typebox v1.x API surface (notably removing TypeRegistry usage).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
yarn.lock Removes @sinclair/typebox entry and adds typebox@^1.0.81.
package.json Swaps dependency from @sinclair/typebox to typebox.
src/utils/typebox/union-oneof.ts Updates the custom UnionOneOf schema helper for typebox v1.x.
src/utils/schema.ts Updates TSchema import to come from typebox.
src/routes/root.ts Updates Type import to come from typebox.
src/routes/example/index.ts Updates Type import to come from typebox.
src/routes/auth-example/index.ts Updates Type import to come from typebox.
src/plugins/sensible.ts Updates Type import to come from typebox.
src/plugins/auth.ts Updates Type import to come from typebox.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FlandiaYingman FlandiaYingman marked this pull request as ready for review February 9, 2026 17:51
@FlandiaYingman FlandiaYingman merged commit 28b68d1 into dependencies Feb 9, 2026
12 of 13 checks passed
@FlandiaYingman FlandiaYingman deleted the copilot/sub-pr-60 branch February 9, 2026 17:52
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.

2 participants