Skip to content

Version Packages#2080

Merged
pmcelhaney merged 1 commit into
mainfrom
changeset-release/main
May 24, 2026
Merged

Version Packages#2080
pmcelhaney merged 1 commit into
mainfrom
changeset-release/main

Conversation

@pmcelhaney
Copy link
Copy Markdown
Collaborator

@pmcelhaney pmcelhaney commented May 16, 2026

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 main, this PR will be updated.

Releases

counterfact@2.13.0

Minor Changes

  • 999e331: Add support for OpenAPI 3.2 querystring parameter location: generates a typed $.querystring property on the route handler argument and populates it at runtime with the full parsed query string

  • f301764: Add support for OpenAPI Overlays (v1.0.0). Overlays allow you to apply targeted modifications to an OpenAPI document without editing the original file.

    • New --overlay <path> CLI flag (repeatable) applies overlay files in order before code generation and server startup.
    • SpecConfig now accepts an overlays?: string[] field for programmatic use and multi-spec config files.
    • Each overlay file is a YAML/JSON document with an overlay version field and an actions array. Each action targets nodes with a JSONPath expression and either merges an update object or removes matched nodes.
    • Overlays are applied to both the code-generator pipeline (Specification.fromFile) and the runtime server pipeline (OpenApiDocument.load).
    • The new applyOverlays / applyOverlayActions / loadOverlay utilities are exported from src/util/apply-overlay.ts.

    Example overlay file (my-overlay.yaml):

    overlay: 1.0.0
    info:
      title: My Overlay
      version: 1.0.0
    actions:
      - target: $.info
        update:
          description: Patched by overlay
      - target: $.paths['/internal']
        remove: true

    Usage:

    counterfact openapi.yaml ./out --overlay my-overlay.yaml
  • 999e331: Add support for OpenAPI 3.2 streaming responses and Server-Sent Events (SSE) via itemSchema.

    • SchemaTypeCoder now recognises itemSchema in a schema object and emits AsyncIterable<T>.
    • ResponseTypeCoder and OperationTypeCoder detect itemSchema on streaming content types (text/event-stream, application/jsonl, application/x-ndjson, application/ndjson, application/json-seq) and emit AsyncIterable<T> as the body type instead of a plain schema type.
    • CounterfactResponseObject.body now accepts AsyncIterable<unknown> in addition to Uint8Array | string.
    • The response builder ($.response[200].stream(iterable, contentType?)) exposes a stream() helper that returns a response with the async iterable as the body. The content type defaults to text/event-stream.
    • routes-middleware converts AsyncIterable response bodies into Node.js Readable streams, serialising each item in the appropriate wire format:
      • text/event-streamdata: <json>\n\n
      • application/json-seq\x1e<json>\n
      • everything else (JSONL / ndjson) → <json>\n
    • SSE responses also receive Cache-Control: no-cache and X-Accel-Buffering: no headers automatically.
    • The JSON-serialisation middleware in create-koa-app now skips Node.js Readable stream bodies so they are piped directly to the client.

Patch Changes

  • cc22776: Fix telemetry discussion docs links to use the counterfact/api-simulator discussion URL and canonical site path.
  • 7cf869e: Ensure $.auth.apiKey is always present for apiKey security schemes and defaults to an empty string when missing.
  • 475d337: Support OpenAPI apiKey security by generating api key request params and exposing $.auth.apiKey.
  • 999e331: Updated dependency @jest/globals to 30.4.0.
    Updated dependency jest to 30.4.0.
  • 7f32551: Updated dependency precinct to 13.0.0.
  • 999e331: Updated dependency precinct to 12.3.2.
  • 999e331: Updated dependency eslint-plugin-n to 18.0.1.
  • 1ebf53d: Updated dependency astro to 6.3.5.
  • 78d3fcd: Updated dependency tsx to 4.22.0.
  • dc627e8: Updated dependency tsx to 4.22.3.
  • 999e331: Updated dependency posthog-node to 5.33.4.
  • 999e331: Updated dependency astro to ^6.3.0.
  • 5f07e3a: Updated dependency astro to 6.3.2.
  • 3bfa8bd: Updated dependency astro to 6.3.6.
  • 999e331: Updated dependency posthog-node to 5.33.3.
  • d2b3136: Updated dependency tsx to 4.22.2.
  • 030ab35: Updated dependency @typescript-eslint/eslint-plugin to 8.59.4.
    Updated dependency @typescript-eslint/parser to 8.59.4.
  • ebb4567: Updated dependency posthog-node to 5.34.2.
  • b723586: Updated dependency @types/koa to 3.0.3.
  • 999e331: Updated dependency @jest/globals to 30.4.1.
    Updated dependency jest to 30.4.1.
  • f3b6bbc: Updated dependency astro to 6.3.3.
  • d247ff9: Updated dependency eslint to 10.4.0.
  • 779c1f3: Updated dependency tsx to 4.22.1.
  • 454debc: Updated dependency posthog-node to 5.34.6.
  • 999e331: Updated dependency fs-extra to 11.3.5.
  • 999e331: Updated dependency @typescript-eslint/eslint-plugin to 8.59.2.
    Updated dependency @typescript-eslint/parser to 8.59.2.

@github-actions github-actions Bot force-pushed the changeset-release/main branch 19 times, most recently from d71f276 to a89eb81 Compare May 22, 2026 23:24
@pmcelhaney pmcelhaney enabled auto-merge May 22, 2026 23:28
@pmcelhaney pmcelhaney closed this May 22, 2026
auto-merge was automatically disabled May 22, 2026 23:28

Pull request was closed

@pmcelhaney pmcelhaney reopened this May 22, 2026
@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from 8ac7530 to 00cffc5 Compare May 23, 2026 16:44
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 00cffc5 to 3297d9e Compare May 23, 2026 18:21
@pmcelhaney pmcelhaney enabled auto-merge May 24, 2026 03:40
@pmcelhaney pmcelhaney closed this May 24, 2026
auto-merge was automatically disabled May 24, 2026 03:40

Pull request was closed

@pmcelhaney pmcelhaney reopened this May 24, 2026
@pmcelhaney pmcelhaney enabled auto-merge May 24, 2026 03:40
@pmcelhaney pmcelhaney added this pull request to the merge queue May 24, 2026
Merged via the queue into main with commit 9093fae May 24, 2026
8 checks passed
@pmcelhaney pmcelhaney deleted the changeset-release/main branch May 24, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant