Skip to content

Commit e0b74ed

Browse files
fengmk2claude
andauthored
deps(typebox): upgrade from @sinclair/typebox to typebox 1.0 (#5745)
close #5656 Migrate from @sinclair/typebox v0.34.x to the new typebox v1.0.x package following the official migration guide. Key changes: - Package name changed from @sinclair/typebox to typebox - Type export now uses default export pattern - Updated all import statements to use default export for Type - Added default export re-exports in tegg/ajv and egg/ajv modules - Updated test snapshots for new typebox API exports - Fixed schema comparison test to use parsed JSON (property order changed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated dependencies: migrated from `@sinclair/typebox` to `typebox` package across multiple modules, ensuring consistent package management and dependency resolution. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent caa505a commit e0b74ed

File tree

15 files changed

+625
-515
lines changed

15 files changed

+625
-515
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,7 @@ tegg/plugin/tegg/test/fixtures/apps/**/*.js
103103
!tegg/plugin/config/test/fixtures/**/node_modules
104104

105105
*.tsbuildinfo
106-
*.tgz
106+
*.tgz
107+
108+
ecosystem-ci/cnpmcore
109+
ecosystem-ci/examples

ecosystem-ci/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

plugins/typebox-validate/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
"typecheck": "tsgo --noEmit"
5757
},
5858
"dependencies": {
59-
"@sinclair/typebox": "catalog:",
6059
"ajv": "catalog:",
6160
"ajv-formats": "catalog:",
62-
"ajv-keywords": "catalog:"
61+
"ajv-keywords": "catalog:",
62+
"typebox": "catalog:"
6363
},
6464
"devDependencies": {
6565
"@eggjs/mock": "workspace:*",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from '@sinclair/typebox';
1+
export * from 'typebox';

plugins/typebox-validate/test/fixtures/apps/typebox-validate-test/app/service/home.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Service } from 'egg';
22

33
import { Validate } from '../../../../../../src/decorator.ts';
4-
import { type Static, Type } from '../../../../../../src/typebox.ts';
4+
import { Type, type Static } from '../../../../../../src/typebox.ts';
55
import { TYPEBOX_BODY } from '../controller/home.ts';
66

77
type HomeTypeBoxType = Static<typeof TYPEBOX_BODY>;

pnpm-lock.yaml

Lines changed: 14 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ catalog:
1919
'@fengmk2/ps-tree': ^2.0.1
2020
'@oclif/core': ^4.2.0
2121
'@oxc-node/core': ^0.0.35
22-
'@sinclair/typebox': ^0.34.41
22+
typebox: ^1.0.65
2323
'@swc-node/register': ^1.11.1
2424
'@swc/core': ^1.15.1
2525
'@types/accepts': ^1.3.7
@@ -225,6 +225,7 @@ catalogs:
225225
minimumReleaseAge: 1440
226226

227227
minimumReleaseAgeExclude:
228+
- typebox
228229
- '@eggjs/*'
229230
- '@vitest/*'
230231
- '@rolldown/*'

tegg/core/ajv-decorator/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"typecheck": "tsgo --noEmit"
4242
},
4343
"dependencies": {
44-
"@sinclair/typebox": "catalog:",
45-
"ajv": "catalog:"
44+
"ajv": "catalog:",
45+
"typebox": "catalog:"
4646
},
4747
"devDependencies": {
4848
"@types/node": "catalog:",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from '@sinclair/typebox';
1+
export * from 'typebox';
22
export * from './enum/index.ts';
33
export * from './error/index.ts';
44
export * from './type/index.ts';

0 commit comments

Comments
 (0)