Skip to content

v0.1.0

Choose a tag to compare

@oxc oxc released this 19 Aug 21:41
· 6 commits to main since this release

Dependency modernization. Breaking: peer dependencies now require zod 4 and express 5.

Breaking changes

  • zod 4 — peer range is now ^4.0.0 (was ^3.21.4). zod 3 is no longer supported.

  • express 5 — @oxc/tsapi-express peer range is now ^5.0.0 (was ^4.0.0). Note that express 5 also tightened path-pattern syntax: unnamed * wildcards and optional :param? segments are no longer valid in paths passed to get/post/route.

  • req.query is no longer replaced with the parsed query. express 5 exposes req.query as a getter by design, so tsapi now leaves it alone and it keeps the raw, unvalidated values. The parsed and coerced query is still handed to your handler as query in EndpointArgs, which is unchanged — but a handler reading req.query directly now sees raw strings. EndpointRequest no longer types req.query as the schema output, so the compiler flags the affected call sites for you.

    req.params and req.body are still replaced with their parsed values, as before.

Internal

  • Ported to the zod 4 type API: z.AnyZodObject → z.ZodObject<$ZodShape, $ZodObjectConfig>, objectUtil.extendShape → z.core.util.Extend with the two-parameter ZodObject<Shape, Config>, .merge() → .extend(), _def.typeName → _zod.def.type.
  • Parsed params/body are now only written back to the request when the endpoint actually defines a schema for them.
  • TypeScript 5.9 (latest 5.x — ts-jest does not support TypeScript 7 yet), module: NodeNext, baseUrl → rootDir, and a pinned @types/node.
  • Publishing to npm now uses trusted publishing (OIDC) instead of a long-lived token.

Full Changelog: v0.0.3...v0.1.0