Skip to report

A domain validator reaches JSON Schema conversion

Trace Valibot’s new ASCII domain action through its shared regex, public exports, and JSON Schema pattern conversion, with downstream impact into schema functions.

open-circle/valibot #1284 · PR by yslpn · Merged

open-circle/valibot cdf79d92..1ee66302

base and head as given

  • Domain-name validation joined the library's validation actions.
  • JSON Schema export now recognizes domain-name validation.
  • API documentation now covers the domain action and its issue type.
files changed
36
in a component
9
lines in components
380
components
5
public routes changed
0
schema statements
0
new dependencies
0
excluded by role
27
Based on 9 of 9 eligible changed files

Domain-name validation

Added
Before
did not exist
After
Domain validation is available

Schemas can now validate ASCII domain names with custom error messages. JSON Schema export represents the validation as a pattern, and API documentation describes its action and issue types.

In favour

  • In favour: JSON Schema export reuses existing pattern handling

Against

  • Against: Unicode-form internationalized domains remain unsupported
Files changed in 5 components. Dependencies shown: 2 new, 2 unchanged
unchanged · 2new · 21 component added

2 new dependencies between components — Actions → Domain Actions · Domain Actions → Library Source

What else could behave differently

32 components · 62 files

These components import changed code, directly or through other files. A traced dependency is a place to review, not a confirmed runtime failure.

Reached 3

ComponentSymbolCited atFilesReached by
Domain Actionslibrary/src/actions/domain/Added 1 of 4 changed symbols reaching itlibrary/src/actions/domain/domain.ts:14-3532 direct · 1 at two steps
Trace path

Shortest component path from the changed symbol:

  1. Domain Actions

Later steps follow file imports; they do not prove this symbol is called.

Schema Converterspackages/to-json-schema/src/converters/Body changed packages/to-json-schema/src/converters/convertAction/convertAction.ts:116-41331 direct · 1 at two steps · 1 at three steps
Trace path

Shortest component path from the changed symbol:

  1. Schema Converters

Later steps follow file imports; they do not prove this symbol is called.

packages/to-json-schema/src/functions/Body changed packages/to-json-schema/src/converters/convertAction/convertAction.ts:116-4137none direct · 2 at two steps · 3 at three steps · 2 at four steps
Trace path

Shortest component path from the changed symbol:

  1. Schema Converters
  2. packages/to-json-schema/src/functions/

Later steps follow file imports; they do not prove this symbol is called.

Held back 29

ComponentFilesReached byResolution
library/src/types/1none direct · 1 at four stepsprecise
library/src/actions/1none direct · 1 at three stepsprecise
library/src/1none direct · 1 at four stepsprecise
library/src/utils/_getStandardProps/1none direct · 1 at four stepsprecise
library/src/schemas/object/2none direct · 2 at four stepsprecise
library/src/methods/pipe/2none direct · 2 at four stepsprecise
library/src/schemas/optional/2none direct · 2 at four stepsprecise
library/src/schemas/nullish/2none direct · 2 at four stepsprecise
library/src/schemas/looseObject/2none direct · 2 at four stepsprecise
library/src/schemas/objectWithRest/2none direct · 2 at four stepsprecise
library/src/schemas/strictObject/2none direct · 2 at four stepsprecise
library/src/schemas/exactOptional/2none direct · 2 at four stepsprecise
library/src/schemas/undefinedable/2none direct · 2 at four stepsprecise
library/src/methods/getFallback/1none direct · 1 at four stepsprecise
library/src/utils/ValiError/1none direct · 1 at four stepsprecise
library/src/methods/fallback/2none direct · 2 at four stepsprecise
library/src/schemas/nullable/2none direct · 2 at four stepsprecise
library/src/utils/_getLastMetadata/1none direct · 1 at four stepsprecise
library/src/schemas/record/3none direct · 3 at four stepsprecise
library/src/methods/parse/2none direct · 2 at four stepsprecise
library/src/methods/safeParse/2none direct · 2 at four stepsprecise
library/src/methods/forward/2none direct · 2 at four stepsprecise
library/src/methods/getExamples/2none direct · 2 at four stepsprecise
library/src/methods/getMetadata/2none direct · 2 at four stepsprecise
library/src/methods/parser/2none direct · 2 at four stepsprecise
library/src/methods/safeParser/2none direct · 2 at four stepsprecise
library/src/methods/assert/1none direct · 1 at four stepsprecise
library/src/methods/getDescription/1none direct · 1 at four stepsprecise
library/src/methods/is/1none direct · 1 at four stepsprecise

Statements 3

The added DomainIssue reached 3 files in domain actions. 21
library/src/actions/domain/domain.ts:14-35
The convertAction body change reached 3 files in schema converters. 111
packages/to-json-schema/src/converters/convertAction/convertAction.ts:116-413
The convertAction body change reached 7 files in schema functions. 232
packages/to-json-schema/src/converters/convertAction/convertAction.ts:116-413

47 reached files belong to no component — tests, docs and config.

Routes, schema, dependencies

No public URL, no migration and no new package.

Inspect components, files and symbols

Component

ActionsModified
library/src/actions/

1 file · 1 line

62 dependents

Library SourceModified
library/src/

1 file · 10 lines

35 dependents

The library source export surface added DOMAIN_REGEX.
Domain ActionsAdded
library/src/actions/domain/

3 files · 163 lines

1 dependent

The domain actions export surface added DomainAction, DomainIssue, and domain.
Schema ConvertersModified
packages/to-json-schema/src/converters/

1 file · 2 lines

1 dependent

API RoutesModified
website/src/routes/api/

3 files · 204 lines

File

Actionslibrary/src/actions/
library/src/actions/index.ts

+1 −0

Library Sourcelibrary/src/
library/src/regex.ts

+10 −0

Domain Actionslibrary/src/actions/domain/
library/src/actions/domain/domain.ts

+121 −0

Domain Actionslibrary/src/actions/domain/
library/src/actions/domain/domain.test-d.ts

+41 −0

Domain Actionslibrary/src/actions/domain/
library/src/actions/domain/index.ts

+1 −0

Schema Converterspackages/to-json-schema/src/converters/
packages/to-json-schema/src/converters/convertAction/convertAction.ts

+2 −0

API Routeswebsite/src/routes/api/
website/src/routes/api/(types)/DomainAction/properties.ts

+93 −0

API Routeswebsite/src/routes/api/
website/src/routes/api/(actions)/domain/properties.ts

+58 −0

API Routeswebsite/src/routes/api/
website/src/routes/api/(types)/DomainIssue/properties.ts

+53 −0

Function

imports what changeddownstream of it, one mark per step

DOMAIN_REGEX()library/src/regex.ts

reaches 29 components

The added DOMAIN_REGEX reached 1 file in types. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in actions. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in library source. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in standard-props utilities. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in object schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in pipe methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in optional schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in nullish schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in loose-object schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in object-with-rest schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in strict-object schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in exact-optional schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in undefinedable schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in get-fallback methods. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in ValiError utilities. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in fallback methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in nullable schemas. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in last-metadata utilities. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 3 files in record schemas. 3
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in parse methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in safe-parse methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in forward methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in get-examples methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in get-metadata methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in parser methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 2 files in safe-parser methods. 2
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in assert methods. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in get-description methods. 1
library/src/regex.ts:35-36
The added DOMAIN_REGEX reached 1 file in is methods. 1
library/src/regex.ts:35-36

Diff

Actionslibrary/src/actions/
library/src/actions/index.ts

14–14

Library Sourcelibrary/src/
library/src/regex.ts

28–37

Domain Actionslibrary/src/actions/domain/
library/src/actions/domain/domain.ts

1–121

Domain Actionslibrary/src/actions/domain/
library/src/actions/domain/domain.test-d.ts

1–41

Domain Actionslibrary/src/actions/domain/
library/src/actions/domain/index.ts

1–1

Schema Converterspackages/to-json-schema/src/converters/
packages/to-json-schema/src/converters/convertAction/convertAction.ts

15–15, 140–140

API Routeswebsite/src/routes/api/
website/src/routes/api/(types)/DomainAction/properties.ts

1–93

API Routeswebsite/src/routes/api/
website/src/routes/api/(actions)/domain/properties.ts

1–58

API Routeswebsite/src/routes/api/
website/src/routes/api/(types)/DomainIssue/properties.ts

1–53

Analysis scope

3225 → 5
  1. 3,225
    files at head
  2. 319
    components
  3. 5
    changed by this change

Where the new files landed

6 new files
New fileBelongs toUsed byCallsServes
library/src/actions/domain/3 new files
Domain Actionsnew territory
Actions
Library Sourcelibrary/src/types/library/src/utils/
website/src/routes/api/3 new files
API Routesbase frame
nothing in the existing application
website/src/components/

4 added files carry no component — 3 docs, 1 test.

5components changed
28reached, not changed
1components added/removed
5dependencies added between components
0dependencies removed between components
0files moved to another path

36 files changed, 39 claims stated. 32 components reached in total.

naming: “model

narrative: “model

analyzer 0.2.0, config v1.9.0-phase8

Every line above is derived from cdf79d92..1ee66302 and nothing else.