Repository navigation
chore: update versions - #80
Merged
Merged
Conversation
Releases: temporal-orpc@1.0.0 temporal-zod@0.8.0 [skip ci]
Reviewer's GuideRelease PR updating package versions, adding temporal-orpc 1.0.0 changelog, temporal-zod 0.8.0 changelog, and aligning peer deps and dev tooling versions with the new release. Sequence diagram for temporalJsonSchemaInterceptor integration with ZodToJsonSchemaConvertersequenceDiagram
participant App
participant ZodToJsonSchemaConverter
participant temporalJsonSchemaInterceptor
participant temporalRegistry
App->>ZodToJsonSchemaConverter: new ZodToJsonSchemaConverter({ interceptors: [temporalJsonSchemaInterceptor] })
ZodToJsonSchemaConverter->>temporalJsonSchemaInterceptor: intercept(zodSchema)
temporalJsonSchemaInterceptor->>temporalRegistry: has(zodSchema)
alt [schema is in temporalRegistry]
temporalRegistry-->>temporalJsonSchemaInterceptor: true
temporalJsonSchemaInterceptor-->>ZodToJsonSchemaConverter: return temporal_json_string_schema
else [schema is not in temporalRegistry]
temporalRegistry-->>temporalJsonSchemaInterceptor: false
temporalJsonSchemaInterceptor-->>ZodToJsonSchemaConverter: return original_json_schema
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
temporal-orpc@1.0.0
Minor Changes
33d699a: New package: oRPC support for Temporal types.
oRPC generates its OpenAPI documents with its own
ZodToJsonSchemaConverter,which re-implements the Zod → JSON Schema conversion rather than calling
z.toJSONSchema(), so the metadatatemporal-zodattaches to each validator isignored — a Temporal validator is a
z.union([...])underneath, and theconverter emits a messy
anyOfwith noformat/pattern.temporal-orpcexportstemporalJsonSchemaInterceptor, which you pass to theconverter so every Temporal validator renders as the correct string schema:
It rewrites only the schemas in
temporalRegistry—temporal-zod's ownvalidators — so your schemas are left entirely to oRPC, including ones you
annotate the same way, such as
z.string().min(5).meta({ type: "string", format: "email" }), which keeps theminLengthoRPC derives from its checks.temporal-zodand@orpc/zodare peer dependencies: the interceptor has toconsult the same registry instance your validators registered into, and it is
typed against oRPC's own interceptor signature.
Patch Changes
temporal-zod@0.8.0
Minor Changes
33d699a: Export
temporalRegistry, a Zod registry scoped to this package that holds everyvalidator
temporal-zodcreates along with its JSON Schema. Use it to recognizeTemporal validators in your own schema walks by identity —
temporalRegistry.has(zInstant)— instead of pattern matching onz.globalRegistrymetadata, which cannot tell our schemas apart from yours. Themetadata-free
temporal-zod/basevalidators are not members.This is what the new
temporal-orpcpackage consults to fix Temporal types in oRPC-generated OpenAPI documents.
Widen the exported
*_PATTERNregexes to accept everythingtoJSON()can emit,which matters now that they are published as an OpenAPI contract. They previously
rejected strings the validators themselves parse:
[u-ca=…]annotation appended under a non-ISO calendar, forPlainDate,PlainDateTime,PlainYearMonth,PlainMonthDay, andZonedDateTime.PlainYearMonthandPlainMonthDayserialize tounder a non-ISO calendar (e.g.
2022-12-25[u-ca=hebrew]). A bare calendar dateis still rejected for both, since the annotation is required in that form.
-000753-04-21).ZONED_DATE_TIME_PATTERNalso no longer ends in\[.+\], whose greedy.+spanned both bracket groups and accepted malformed annotations such as
[not a time zone!][].Note that
PlainDatestill advertisesformat: "date", which is RFC 3339full-date and cannot carry an annotation, so a validator that asserts
formatwill reject a non-ISO
PlainDateeven though thepatternaccepts it.Summary by Sourcery
Release temporal-orpc 1.0.0 and temporal-zod 0.8.0, updating registry and schema support for Temporal types and aligning package versions.
New Features:
Enhancements:
Build: