Skip to report

One JWS pattern connects validation and JSON Schema

Follow Valibot’s jwsCompact action through its shared regex, public exports, and JSON Schema converter. It checks token structure; signature and claim verification remain separate.

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

open-circle/valibot d2eacf2a..660ca1c5

base and head as given

  • JWS compact serialization validation entered the action catalog.
  • JSON Schema conversion now represents JWS compact validation as a pattern.
  • API reference documentation now describes the JWS compact action and its types.
files changed
16
in a component
9
lines in components
405
components
5
public routes changed
0
schema statements
0
new dependencies
0
excluded by role
7
Based on 9 of 9 eligible changed files

JWS compact serialization validation

Added
Before
JWS compact validation did not exist
After
JWS compact strings can be validated

Schemas can now validate JWS compact serialization strings and carry the same pattern into JSON Schema. Validation accepts only the three-segment Base64URL-like shape; it does not decode segments, verify signatures, or validate claims.

In favour

  • In favour: One pattern drives runtime and JSON Schema validation

The model found nothing to weigh against this.

Files changed in 5 components. Dependencies shown: 2 new, 2 unchanged
unchanged · 2new · 21 component added

2 new dependencies between components — Actions → JWS Compact Actions · JWS Compact 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
JWS Compact Actionslibrary/src/actions/jwsCompact/Added 1 of 4 changed symbols reaching itlibrary/src/actions/jwsCompact/jwsCompact.ts:14-3632 direct · 1 at two steps
Trace path

Shortest component path from the changed symbol:

  1. JWS Compact Actions

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

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

Shortest component path from the changed symbol:

  1. JSON 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:120-4227none direct · 2 at two steps · 3 at three steps · 2 at four steps
Trace path

Shortest component path from the changed symbol:

  1. JSON 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/1none direct · 1 at four stepsprecise
library/src/actions/1none direct · 1 at three 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 JwsCompactIssue reached 3 files in JWS Compact actions. 21
library/src/actions/jwsCompact/jwsCompact.ts:14-36
The body change to convertAction reached 3 files in JSON Schema converters. 111
packages/to-json-schema/src/converters/convertAction/convertAction.ts:120-422
The body change to convertAction reached 7 files in JSON Schema functions. 232
packages/to-json-schema/src/converters/convertAction/convertAction.ts:120-422

49 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

Library SourceModified
library/src/

1 file · 11 lines

36 dependents

The library export surface added JWS_COMPACT_REGEX.
ActionsModified
library/src/actions/

1 file · 1 line

62 dependents

JWS Compact ActionsAdded
library/src/actions/jwsCompact/

3 files · 174 lines

1 dependent

JWS Compact actions added JwsCompactAction, JwsCompactIssue, and jwsCompact to their export surface.
JSON Schema ConvertersModified
packages/to-json-schema/src/converters/

1 file · 9 lines

1 dependent

API RoutesModified
website/src/routes/api/

3 files · 210 lines

File

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

+11 −0

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

+1 −0

JWS Compact Actionslibrary/src/actions/jwsCompact/
library/src/actions/jwsCompact/jwsCompact.ts

+124 −0

JWS Compact Actionslibrary/src/actions/jwsCompact/
library/src/actions/jwsCompact/jwsCompact.test-d.ts

+49 −0

JWS Compact Actionslibrary/src/actions/jwsCompact/
library/src/actions/jwsCompact/index.ts

+1 −0

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

+9 −0

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

+93 −0

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

+59 −0

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

+58 −0

Function

imports what changeddownstream of it, one mark per step

JWS_COMPACT_REGEX()library/src/regex.ts

reaches 29 components

The added JWS_COMPACT_REGEX reached 1 file in Types. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Library Source. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Actions. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Get Standard Props. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Object Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Pipe Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Optional Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Nullish Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Loose Object Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Object With Rest. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Strict Object Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Exact Optional Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Undefinedable Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Get Fallback. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in ValiError. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Fallback Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Nullable Schemas. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Get Last Metadata. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 3 files in Record Schemas. 3
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Parse Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Safe Parse Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Forward Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Get Examples. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Get Metadata. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Parser Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 2 files in Safe Parser Methods. 2
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Assert Methods. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Get Description. 1
library/src/regex.ts:136-137
The added JWS_COMPACT_REGEX reached 1 file in Is Methods. 1
library/src/regex.ts:136-137

Diff

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

128–138

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

47–47

JWS Compact Actionslibrary/src/actions/jwsCompact/
library/src/actions/jwsCompact/jwsCompact.ts

1–124

JWS Compact Actionslibrary/src/actions/jwsCompact/
library/src/actions/jwsCompact/jwsCompact.test-d.ts

1–49

JWS Compact Actionslibrary/src/actions/jwsCompact/
library/src/actions/jwsCompact/index.ts

1–1

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

49–52, 231–235

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

1–93

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

1–59

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

1–58

Analysis scope

3261 → 5
  1. 3,261
    files at head
  2. 322
    components
  3. 5
    changed by this change

Where the new files landed

6 new files
New fileBelongs toUsed byCallsServes
library/src/actions/jwsCompact/3 new files
JWS Compact 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

16 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 d2eacf2a..660ca1c5 and nothing else.