Fork from @sinclair/typebox 0.34.49 as @alkdev/typebox
- Rename package from @sinclair/typebox to @alkdev/typebox - Update author, repository, and homepage to alkdev - Remove GitHub workflows, .vscode config, and branding assets - Update all source, test, example, changelog, and task imports - Update tsconfig.json path mappings - Clean up readme header (remove upstream badges/branding)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## [0.26.0](https://www.npmjs.com/package/@sinclair/typebox/v/0.26.0)
|
||||
## [0.26.0](https://www.npmjs.com/package/@alkdev/typebox/v/0.26.0)
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -36,7 +36,7 @@ Revision 0.26.0 is a milestone release for the TypeBox project and requires a mi
|
||||
Revision 0.26.0 exports a new type builder called `StandardType`. This builder only allows for the construction JSON Schema compliant types by omitting all Extended types.
|
||||
|
||||
```typescript
|
||||
import { StandardType as Type, Static } from '@sinclair/typebox'
|
||||
import { StandardType as Type, Static } from '@alkdev/typebox'
|
||||
|
||||
const T = Type.Date() // error: no such function
|
||||
```
|
||||
@@ -172,7 +172,7 @@ const All = [...Value.Errors(T, 'foo')] // const All = [{ path: '',
|
||||
Revision 0.26.0 adds a `.Code()` function to the `TypeCompiler` to enable code generation without JIT evaluation.
|
||||
|
||||
```typescript
|
||||
import { TypeCompiler } from '@sinclair/typebox/compiler'
|
||||
import { TypeCompiler } from '@alkdev/typebox/compiler'
|
||||
|
||||
const T = Type.Object({
|
||||
x: Type.Number(),
|
||||
@@ -361,12 +361,12 @@ const V = Value.Cast(T, Value.Convert(T, '42')) // const V = 42 - 0.26.0
|
||||
|
||||
## Moved TypeGuard Module
|
||||
|
||||
The `TypeGuard` is now imported via the `@sinclair/typebox` module. This move is due to the TypeBox compositor internally using the guard when constructing types.
|
||||
The `TypeGuard` is now imported via the `@alkdev/typebox` module. This move is due to the TypeBox compositor internally using the guard when constructing types.
|
||||
|
||||
```typescript
|
||||
import { TypeGuard } from '@sinclair/typebox/guard' // 0.25.0
|
||||
import { TypeGuard } from '@alkdev/typebox/guard' // 0.25.0
|
||||
|
||||
import { TypeGuard } from '@sinclair/typebox' // 0.26.0
|
||||
import { TypeGuard } from '@alkdev/typebox' // 0.26.0
|
||||
```
|
||||
|
||||
<a name="Format-Renamed-to-FormatRegistry"></a>
|
||||
@@ -376,9 +376,9 @@ import { TypeGuard } from '@sinclair/typebox' // 0.26.0
|
||||
The `Format` module has been renamed to `FormatRegistry` and moved to the `typebox.ts` module.
|
||||
|
||||
```typescript
|
||||
import { Format } from '@sinclair/typebox/format' // 0.25.0
|
||||
import { Format } from '@alkdev/typebox/format' // 0.25.0
|
||||
|
||||
import { FormatRegistry } from '@sinclair/typebox' // 0.26.0
|
||||
import { FormatRegistry } from '@alkdev/typebox' // 0.26.0
|
||||
```
|
||||
|
||||
<a name="Custom-Renamed-to-TypeRegistry"></a>
|
||||
@@ -388,7 +388,7 @@ import { FormatRegistry } from '@sinclair/typebox' // 0.26.0
|
||||
The `Format` module has been renamed to `FormatRegistry` and moved to the `typebox.ts` module.
|
||||
|
||||
```typescript
|
||||
import { Custom } from '@sinclair/typebox/format' // 0.25.0
|
||||
import { Custom } from '@alkdev/typebox/format' // 0.25.0
|
||||
|
||||
import { TypeRegistry } from '@sinclair/typebox' // 0.26.0
|
||||
import { TypeRegistry } from '@alkdev/typebox' // 0.26.0
|
||||
```
|
||||
Reference in New Issue
Block a user