Rename tlvalidate to validate (#1508)

This PR renames the @tldraw/tlvalidate package to @tldraw/validate. 

### Change Type

- [x] `major` — Breaking Change

### Release Notes

- Rename tlvalidate to validate
This commit is contained in:
Steve Ruiz 2023-06-03 09:27:44 +01:00 committed by GitHub
parent 4dfae61a32
commit 7307282f1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 58 additions and 58 deletions

View file

@ -64,9 +64,9 @@
"@tldraw/tldraw": "workspace:*",
"@tldraw/tlschema": "workspace:*",
"@tldraw/tlstore": "workspace:*",
"@tldraw/tlvalidate": "workspace:*",
"@tldraw/ui": "workspace:*",
"@tldraw/utils": "workspace:*",
"@tldraw/validate": "workspace:*",
"lazyrepo": "0.0.0-alpha.26",
"rimraf": "^4.4.0",
"ts-node": "^10.9.1"

View file

@ -49,8 +49,8 @@
"@tldraw/primitives": "workspace:*",
"@tldraw/tlschema": "workspace:*",
"@tldraw/tlstore": "workspace:*",
"@tldraw/tlvalidate": "workspace:*",
"@tldraw/utils": "workspace:*",
"@tldraw/validate": "workspace:*",
"@use-gesture/react": "^10.2.27",
"classnames": "^2.3.2",
"crc": "^4.3.2",

View file

@ -1,6 +1,6 @@
import { getDefaultTranslationLocale } from '@tldraw/tlschema'
import { defineMigrations, migrate } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { atom } from 'signia'
import { uniqueId } from '../utils/data'

View file

@ -14,7 +14,7 @@
{ "path": "../primitives" },
{ "path": "../tlschema" },
{ "path": "../tlstore" },
{ "path": "../tlvalidate" },
{ "path": "../validate" },
{ "path": "../utils" },
{ "path": "../indices" }
]

View file

@ -44,9 +44,9 @@
"@tldraw/editor": "workspace:*",
"@tldraw/primitives": "workspace:*",
"@tldraw/tlstore": "workspace:*",
"@tldraw/tlvalidate": "workspace:*",
"@tldraw/ui": "workspace:*",
"@tldraw/utils": "workspace:*"
"@tldraw/utils": "workspace:*",
"@tldraw/validate": "workspace:*"
},
"jest": {
"preset": "config/jest/node",

View file

@ -16,9 +16,9 @@ import {
StoreSnapshot,
UnknownRecord,
} from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { TLUiToastsContextType, TLUiTranslationKey } from '@tldraw/ui'
import { exhaustiveSwitchError, Result } from '@tldraw/utils'
import { T } from '@tldraw/validate'
import { buildFromV1Document } from './buildFromV1Document'
/** @public */

View file

@ -9,7 +9,7 @@
"references": [
{ "path": "../editor" },
{ "path": "../tlstore" },
{ "path": "../tlvalidate" },
{ "path": "../validate" },
{ "path": "../primitives" },
{ "path": "../utils" },
{ "path": "../ui" }

View file

@ -13,7 +13,7 @@ import { Store } from '@tldraw/tlstore';
import { StoreSchema } from '@tldraw/tlstore';
import { StoreSchemaOptions } from '@tldraw/tlstore';
import { StoreSnapshot } from '@tldraw/tlstore';
import { T } from '@tldraw/tlvalidate';
import { T } from '@tldraw/validate';
import { UnknownRecord } from '@tldraw/tlstore';
// @internal (undocumented)

View file

@ -57,8 +57,8 @@
},
"dependencies": {
"@tldraw/tlstore": "workspace:*",
"@tldraw/tlvalidate": "workspace:*",
"@tldraw/utils": "workspace:*",
"@tldraw/validate": "workspace:*",
"nanoid": "4.0.2"
},
"peerDependencies": {

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { createAssetValidator, TLBaseAsset } from './asset-validation'
// --- DEFINITION ---

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { createAssetValidator, TLBaseAsset } from './asset-validation'
// --- DEFINITION ---

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { createAssetValidator, TLBaseAsset } from './asset-validation'
// --- DEFINITION ---

View file

@ -1,5 +1,5 @@
import { BaseRecord } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLAssetId } from '../records/TLAsset'
import { assetIdValidator } from '../validation'

View file

@ -1,5 +1,5 @@
import { Migrations, StoreSchema, createRecordType, defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLRecord } from './TLRecord'
import { TLStoreProps, createIntegrityChecker, onValidationFailure } from './TLStore'
import { AssetRecordType } from './records/TLAsset'

View file

@ -1,5 +1,5 @@
import { createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLBaseAsset } from '../assets/asset-validation'
import {
bookmarkAssetMigrations,

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { idValidator } from '../validation'
/**

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
/**
* TLDocument

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { Box2dModel } from '../geometry-types'
import { TL_STYLE_TYPES, TLStyleType } from '../style-types'
import { cursorValidator, scribbleTypeValidator, TLCursor, TLScribble } from '../ui-types'

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { idValidator, instanceIdValidator, pageIdValidator, shapeIdValidator } from '../validation'
import { TLCamera, TLCameraId } from './TLCamera'
import { TLInstance } from './TLInstance'

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { Box2dModel } from '../geometry-types'
import { cursorTypeValidator, scribbleTypeValidator, TLCursor, TLScribble } from '../ui-types'
import { idValidator } from '../validation'

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { pageIdValidator } from '../validation'
/**

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { idValidator } from '../validation'
/**

View file

@ -1,5 +1,5 @@
import { BaseRecord, createRecordType, defineMigrations, ID } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { idValidator, instanceIdValidator, pageIdValidator } from '../validation'
import { TLInstance } from './TLInstance'
import { TLPage } from './TLPage'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { Vec2dModel } from '../geometry-types'
import { TLShapeId } from '../records/TLShape'
import {

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLAssetId } from '../records/TLAsset'
import { TLOpacityType } from '../style-types'
import { assetIdValidator, opacityValidator } from '../validation'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { Vec2dModel } from '../geometry-types'
import { TLColorType, TLDashType, TLFillType, TLOpacityType, TLSizeType } from '../style-types'
import { SetValue } from '../util-types'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLOpacityType } from '../style-types'
import { opacityValidator } from '../validation'
import { createShapeValidator, TLBaseShape } from './shape-validation'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLOpacityType } from '../style-types'
import { opacityValidator } from '../validation'
import { createShapeValidator, TLBaseShape } from './shape-validation'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import {
TLAlignType,
TLColorType,

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLOpacityType } from '../style-types'
import { opacityValidator } from '../validation'
import { createShapeValidator, TLBaseShape } from './shape-validation'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLColorType, TLOpacityType, TLSizeType } from '../style-types'
import { colorValidator, opacityValidator, sizeValidator } from '../validation'
import { TLDrawShapeSegment, drawShapeSegmentValidator } from './TLDrawShape'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLColorType, TLDashType, TLIconType, TLOpacityType, TLSizeType } from '../style-types'
import {
colorValidator,

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { Vec2dModel } from '../geometry-types'
import { TLAssetId } from '../records/TLAsset'
import { TLOpacityType } from '../style-types'

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLColorType, TLDashType, TLOpacityType, TLSizeType, TLSplineType } from '../style-types'
import { TLHandle, handleTypeValidator } from '../ui-types'
import {

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLAlignType, TLColorType, TLFontType, TLOpacityType, TLSizeType } from '../style-types'
import {
alignValidator,

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLAlignType, TLColorType, TLFontType, TLOpacityType, TLSizeType } from '../style-types'
import {
alignValidator,

View file

@ -1,5 +1,5 @@
import { defineMigrations } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLAssetId } from '../records/TLAsset'
import { TLOpacityType } from '../style-types'
import { assetIdValidator, opacityValidator } from '../validation'

View file

@ -1,5 +1,5 @@
import { BaseRecord } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { TLParentId, TLShapeId } from '../records/TLShape'
import { parentIdValidator, shapeIdValidator } from '../validation'

View file

@ -1,4 +1,4 @@
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import { Vec2dModel } from './geometry-types'
import { SetValue } from './util-types'

View file

@ -1,5 +1,5 @@
import type { ID, UnknownRecord } from '@tldraw/tlstore'
import { T } from '@tldraw/tlvalidate'
import { T } from '@tldraw/validate'
import type { TLAssetId } from './records/TLAsset'
import type { TLInstanceId } from './records/TLInstance'
import type { TLPageId } from './records/TLPage'

View file

@ -6,5 +6,5 @@
"outDir": "./.tsbuild",
"rootDir": "src"
},
"references": [{ "path": "../tlstore" }, { "path": "../tlvalidate" }, { "path": "../utils" }]
"references": [{ "path": "../tlstore" }, { "path": "../validate" }, { "path": "../utils" }]
}

View file

@ -1,4 +1,4 @@
## API Report File for "@tldraw/tlvalidate"
## API Report File for "@tldraw/validate"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

View file

@ -1,6 +1,6 @@
{
"name": "@tldraw/tlvalidate",
"description": "A tiny little drawing app (validation).",
"name": "@tldraw/validate",
"description": "A runtime validation library by tldraw.",
"version": "2.0.0-alpha.12",
"packageManager": "yarn@3.5.0",
"author": {

View file

@ -4297,9 +4297,9 @@ __metadata:
"@tldraw/tldraw": "workspace:*"
"@tldraw/tlschema": "workspace:*"
"@tldraw/tlstore": "workspace:*"
"@tldraw/tlvalidate": "workspace:*"
"@tldraw/ui": "workspace:*"
"@tldraw/utils": "workspace:*"
"@tldraw/validate": "workspace:*"
"@types/node": 18.15.0
"@types/react": ^18.0.24
"@types/react-dom": ^18.0.6
@ -4335,8 +4335,8 @@ __metadata:
"@tldraw/primitives": "workspace:*"
"@tldraw/tlschema": "workspace:*"
"@tldraw/tlstore": "workspace:*"
"@tldraw/tlvalidate": "workspace:*"
"@tldraw/utils": "workspace:*"
"@tldraw/validate": "workspace:*"
"@types/benchmark": ^2.1.2
"@types/crc": ^3.8.0
"@types/lodash.throttle": ^4.1.7
@ -4375,9 +4375,9 @@ __metadata:
"@tldraw/editor": "workspace:*"
"@tldraw/primitives": "workspace:*"
"@tldraw/tlstore": "workspace:*"
"@tldraw/tlvalidate": "workspace:*"
"@tldraw/ui": "workspace:*"
"@tldraw/utils": "workspace:*"
"@tldraw/validate": "workspace:*"
lazyrepo: 0.0.0-alpha.26
languageName: unknown
linkType: soft
@ -4496,8 +4496,8 @@ __metadata:
resolution: "@tldraw/tlschema@workspace:packages/tlschema"
dependencies:
"@tldraw/tlstore": "workspace:*"
"@tldraw/tlvalidate": "workspace:*"
"@tldraw/utils": "workspace:*"
"@tldraw/validate": "workspace:*"
kleur: ^4.1.5
lazyrepo: 0.0.0-alpha.26
nanoid: 4.0.2
@ -4522,15 +4522,6 @@ __metadata:
languageName: unknown
linkType: soft
"@tldraw/tlvalidate@workspace:*, @tldraw/tlvalidate@workspace:packages/tlvalidate":
version: 0.0.0-use.local
resolution: "@tldraw/tlvalidate@workspace:packages/tlvalidate"
dependencies:
"@tldraw/utils": "workspace:*"
lazyrepo: 0.0.0-alpha.26
languageName: unknown
linkType: soft
"@tldraw/ui@workspace:*, @tldraw/ui@workspace:packages/ui":
version: 0.0.0-use.local
resolution: "@tldraw/ui@workspace:packages/ui"
@ -4576,6 +4567,15 @@ __metadata:
languageName: unknown
linkType: soft
"@tldraw/validate@workspace:*, @tldraw/validate@workspace:packages/validate":
version: 0.0.0-use.local
resolution: "@tldraw/validate@workspace:packages/validate"
dependencies:
"@tldraw/utils": "workspace:*"
lazyrepo: 0.0.0-alpha.26
languageName: unknown
linkType: soft
"@tldraw/vscode-editor@workspace:apps/vscode/editor":
version: 0.0.0-use.local
resolution: "@tldraw/vscode-editor@workspace:apps/vscode/editor"