feat: upgrade to Zod 4, Express 5, and add @zhttp/extract-oas CLI#69
Merged
evertdespiegeleer merged 57 commits intomainfrom Apr 24, 2026
Merged
feat: upgrade to Zod 4, Express 5, and add @zhttp/extract-oas CLI#69evertdespiegeleer merged 57 commits intomainfrom
evertdespiegeleer merged 57 commits intomainfrom
Conversation
- Upgrade zod ^3.22.4 -> ^4.0.0 - Upgrade @asteasolutions/zod-to-openapi ^6.3.1 -> ^8.0.0 - Upgrade typescript ^4.4.4 -> ^5.5.0 - Upgrade @typescript-eslint/* v6 -> v7, replace abandoned eslint-config-standard-with-typescript with direct config - Replace deprecated ZodSchema with ZodType - Fix ExtractRouteParams optional modifier for Zod 4 shape compat
Contributor
Test Resultsβ1 filesβ Β±0βββ4 suitesβ Β±0βββ0s β±οΈ Β±0s Results for commit 78fb51b.βΒ± Comparison against base commit 8f7ac93. β»οΈ This comment has been updated with latest results. |
Adds a SKILL.md at the repo root so agents can install zhttp knowledge via `npx skills add evertdespiegeleer/zhttp`. Covers endpoints, controllers, middleware, server setup, error handling, and OpenAPI.
β¦sted publishers Move prerelease publishing from push.yml to release.yml so all npm publishes go through a single workflow, as required by npm trusted publishers (OIDC). Remove NPM_PUBLISH_TOKEN in favor of --provenance.
npm trusted publishers require npm 10.9.1+ for automatic OIDC token exchange. Node 20.11 ships npm 10.2.4 which is too old.
CLI tool to extract OpenAPI specs from zhttp Server instances. Supports JSON and YAML output, handles TS input files via tsx.
Middleware handler params (req, res, next) were untyped due to the MiddlewareHandler union. Now MiddlewareProps discriminates on the type field so TypeScript infers the correct handler signature automatically.
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.
Summary
New:
@zhttp/extract-oasCLI packagenpx @zhttp/extract-oas --serverfile="./server.ts" --serverexport="httpserver" --output="./openapi-spec.json" --type="json"tsxZod 4 migration
zodfrom^3.22.4to^4.0.0@asteasolutions/zod-to-openapifrom^6.3.1to^8.0.0typescriptfrom^4.4.4to^5.5.0(required by Zod 4)@typescript-eslint/*from v6 to v7ZodSchematype alias withZodTypeExtractRouteParamsoptional modifier for Zod 4 shape type compatibilityExpress 5 upgrade
expressfrom^4.18.2to^5.2.1@types/expressfrom^4.17.21to^5.0.0@types/expresstodependenciesso consumers get properRequest/Responsetypesbody-parserdependency (bundled in Express 5), useexpress.json()insteadCI
release.ymlfor npm trusted publishers (OIDC)@zhttp/extract-oasto release and prerelease publish stepsOther
SKILL.md) for zhttp library usageTest plan
npx tsc --noEmitβ no type errorsnpm run buildβ ESM and CJS bundles build for all packagesnpm testβ all 11 tests passextract-oas --helpoutputs correct CLI usage