Skip to content

Changelog

Every update to Kubb, with the newest release first.

View on GitHub

Changelog

v5.3.0 — Sep 15, 2026

@kubb/core

Features

  • Add an opt-in HTML report with generated files, plugin timings, and diagnostics. (#4041, be705de)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.8 — Sep 15, 2026

@kubb/cli

Bug Fixes

  • Add kubb studio snapshot to generate and publish a Kubb Studio snapshot from any CI, not only GitHub Actions.

    • Registers or reuses a CI agent, connects it, queues a snapshot job, and polls until the tarball is ready.
    • Reads the organization CI API key from --token or KUBB_TOKEN.
    • Detects the calling CI (GitHub Actions, GitLab CI, Bitbucket Pipelines, CircleCI) to reuse one agent per pull or merge request, or takes an explicit --id on any other CI.
    • Prints a summary, or one JSON object with --json for a script to read.
    • @kubb/studio now also exports createAgent and machineTokenFrom, so a host can register a CI agent without hand-rolling the request.
    shell
    KUBB_TOKEN=$KUBB_TOKEN kubb studio snapshot --json
    ``` ([#4038](https://github.com/kubb-labs/kubb/pull/4038), [`4cd9f5e`](https://github.com/kubb-labs/kubb/commit/4cd9f5e311e5dc6edb14287c13db0a5466b4e892))

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.7 — Sep 15, 2026

@kubb/cli

Bug Fixes

  • Create a separate Kubb Studio agent connection for each project directory while reusing the same agent within that directory. (af87dbc)

@kubb/studio

Bug Fixes

  • Add createJob and waitForJob for Studio's async /api/jobs endpoints. (#4035, 5382ff0)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.6 — Sep 14, 2026

@kubb/studio

Bug Fixes

  • Add job ID correlation to Studio commands and streamed agent events. (0a1e553)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.5 — Sep 14, 2026

@kubb/studio

Bug Fixes

  • Add a studio:ready acknowledgement so a host can tell "the socket is open" apart from "Studio has registered this connection and will dispatch jobs to it".

    A connected socket announces itself with agent:connect but never waited for a reply, so a job could arrive at Studio moments before the agent was actually registered. StudioSession now waits up to 10 seconds for studio:ready after sending that handshake and fires a new studio:ready hook once it lands, warning instead of failing if an older Studio never sends one. kubb studio prints ✓ Ready to receive jobs once it does. (#4028, b93eb64)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.4 — Sep 14, 2026

@kubb/studio

Bug Fixes

  • Report the package a plugin ships from, so plugin-ts reaches Studio as @kubb/plugin-ts while a third-party plugin keeps its own name.

    The connect payload scoped every plugin name under @kubb/, which claimed a third-party plugin as one of Kubb's. It now follows the same rule the dependency check already used. (#4026, 628c98b)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.3 — Sep 13, 2026

@kubb/cli

Bug Fixes

  • kubb generate --watch now works with URL inputs. A remote document emits no filesystem events, so watch mode polls the URL (every 2 seconds) and regenerates when the response body changes. Each poll request times out after 10 seconds, so a hung server never stalls the watcher. An unreachable server is reported once per outage and polling continues. After recovery, a rebuild only happens when the document actually changed, unless the server was already down at startup, in which case the first successful poll regenerates so the output catches up. Previously --watch was silently ignored for URL inputs and the CLI exited after a single build. (#4022, 5f4fd20)

@kubb/studio

Bug Fixes

  • Report installed peer dependency versions and missing dependencies with each generation result. (#4021, 6187109)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle, @tachirodriguez

v5.2.2 — Sep 11, 2026

@kubb/adapter-oas

Bug Fixes

  • A oneOf/anyOf without a declared OpenAPI discriminator now infers one when a property carries a distinct single literal value on every branch. UnionSchemaNode.discriminatorPropertyName is set from that inference, so every printer that narrows on it (plugin-zod, plugin-faker) picks it up without reimplementing the same scan. (#4019, c89f215)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.2.1 — Sep 10, 2026

@kubb/adapter-oas

Bug Fixes

  • Keep a binary response body under application/octet-stream typed as a blob instead of falling back to emptySchemaType. (#4013, dd9a902)

@kubb/core

Bug Fixes

  • Add a kubb.dev/sponsors entry to each published package's funding field, alongside the existing GitHub Sponsors and Open Collective links. (#4007, b063738)

@kubb/studio

Bug Fixes

  • Trim @kubb/studio's public API to what the kubb studio CLI command and the Docker agent actually use.

    • Removed the unused hook context types StudioCommandStartContext, StudioCommandEndContext, StudioConnectingContext, StudioDisconnectedContext, StudioErrorContext, and StudioWarnContext from the package's root export. StudioConnectedContext stays exported. Hook payloads for studio:connecting, studio:command:start, studio:command:end, studio:disconnected, studio:warn, and studio:error still type-check through Hookable<KubbHooks>['hook'], since the underlying types are still declared, just no longer importable by name.
    • Removed ConnectionOutcome and TokenRejection from the root export. Both stay inferable from runConnection's return value and onTokenRejected callback.

    Neither the CLI nor the Docker agent imports any of these by name, so this does not change their behavior. A consumer that did import one of them by name gets the same type through inference at the call site instead, such as runConnection's return value or a hooks.hook('studio:warn', ...) callback's parameter. (#4012, 109abe8)

Contributors

Thanks to everyone who contributed to this release:

@ghettoDdOS, @stijnvanhulle

v5.2.0 — Sep 9, 2026

@kubb/adapter-oas

Bug Fixes

  • 5ccc52c - Bump @readme/openapi-parser to v8. Spec validation behavior is unchanged. (5ccc52c)

@kubb/ast

Features

  • Add utilities for resolving object properties through references and intersections and for reading literal values from enum schemas. Plugin authors can use these utilities to handle discriminated unions without implementing their own schema traversal. (#3989, a2b5924)

@kubb/cli

Bug Fixes

  • kubb init and kubb generate --watch now print plain lines when the terminal cannot carry clack's gutter, such as a piped run or CI. They wrote box-drawing and cursor escapes into the output before. Spinner steps print as lines there instead of disappearing with the animation. (#3983, d1b123e)
  • kubb mcp and kubb validate now load @kubb/mcp and @kubb/adapter-oas only when their commands run. Every other command, including kubb --help, no longer touches either optional peer. (#3968, 0e4dc40)

@kubb/core

Bug Fixes

  • Moved shared-utility logic used by only one package out of @internals/utils and into that package (@kubb/core, @kubb/cli, @kubb/kit). No public API or behavior changed. (#3968, 0e4dc40)

@kubb/studio

Features

  • Add the Kubb Studio CLI for connecting a local Kubb project to Kubb Studio. (#3972, 0cd4c7b)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.1.0 — Sep 3, 2026

@kubb/adapter-oas

Features

  • Let dateType set date-time, date, and time independently, instead of one value driving all three

    Pass an object to represent timestamps as a JS Date while keeping date-only and time-only fields as strings, since Date cannot round-trip those without inventing a timezone.

    ts
    adapterOas({
      dateType: {
        dateTime: 'date',
        date: 'string',
        time: 'string',
      },
    })

    The scalar form (dateType: 'date') still applies one value to all three formats. (#3957, 9fca8e9)

Bug Fixes

  • Explicit types fields for each package.json exports entry, so that it works with tsconfig.json moduleResolution: 'bundler' (#3964, be4cd17)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.0.6 — Sep 2, 2026

@kubb/cli

Bug Fixes

  • Adds --dryRun to generate and init to preview a run without writing files, installing packages, formatting, linting, or running post-generate commands. When an AI coding agent runs the CLI, generate now uses the plain logger instead of the interactive one, and anonymous telemetry records the agent's name. (#3951, 9849de3)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.0.5 — Aug 31, 2026

@kubb/core

Bug Fixes

  • 2869e6d - Avoids duplicate filesystem reads during generated file writes and uses native Node.js promise timers in asynchronous tests. (2869e6d)

v5.0.4 — Aug 28, 2026

unplugin-kubb

Bug Fixes

  • Move unplugin-kubb past its squatted npm version range.

    Versions 5.0.1 through 5.0.30 were already published on npm from unplugin-kubb's pre-monorepo history and depend on kubb v4, so the package's version was set directly to 5.0.31 to clear that range. This changeset picks up from that 5.0.31 baseline and puts unplugin-kubb back through the normal release process, independent of kubb and @kubb/*. (#3940, b45071e)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.0.3 — Aug 27, 2026

@kubb/adapter-oas

Bug Fixes

  • Keep every discriminator mapping key that targets the same schema, and apply the discriminant to children declared with allOf (#3929, 58d9625)

Contributors

Thanks to everyone who contributed to this release:

@xeoneux

v5.0.2 — Aug 24, 2026

@kubb/kit

Bug Fixes

  • Fix Url.toPath producing route masks that path-to-regexp (used by MSW/Express) rejects or misparses:

    • A parameter name starting with a character outside [A-Za-z0-9_] (e.g. {$id}) now sanitizes to a safe capture name instead of keeping the disallowed character.
    • Distinct parameter names that normalize to the same identifier (e.g. {group-id} and {group.id}) are now deduplicated with an incrementing suffix (groupId, groupId2) instead of producing two identically named captures. (#3922, 56a072c)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.0.1 — Aug 21, 2026

@kubb/adapter-oas

Bug Fixes

  • Fix an OpenAPI 3.1 multi-type array collapsing to one type when paired with format. type: ["null", "integer", "string"], format: "int32" generated integer | null, dropping string. The multi-type rule now runs before format, so each type parses on its own. (#3916, 3d0098c)
  • Fix an OpenAPI 3.1 multi-type array dropping its other types when null came first. type: ["null", "string"] generated null instead of string | null, while type: ["string", "null"] generated the right type, so the output depended on the order the types happened to be written in. The normalized type now takes the first non-null entry, and type: ["null"] stays a null schema. (#3912, 331558e)

@kubb/cli

Bug Fixes

  • Bump verkit to 0.4.0 and @tmcp/transport-stdio to 0.5.0. (#3909, 77e95a7)

@kubb/kit

Bug Fixes

  • Fix Url.toPath producing an invalid Express-style route for a hyphenated path parameter (e.g. {point-id} became :point-id). path-to-regexp treats a hyphen as ending the parameter name, so the generated MSW handler matched :point followed by a literal -id and rejected valid values. Url.toPath now camelCases the parameter name the same way Url.toTemplateString already does, so {point-id} becomes :pointId. (#3895, bf9bdc8)

Contributors

Thanks to everyone who contributed to this release:

@stijnvanhulle

v5.0.0

Kubb v5 rebuilds code generation around adapters, a universal AST, parsers, and storage, and generates code up to 5.4x faster than v4. Config gets shorter, generated client calls change shape, and plugins move to their own repo (kubb-labs/plugins).

Read the release blog post for the highlights, and the migration guide for the full, per-package breaking-change list and upgrade steps.

For prior releases, see GitHub Releases.