3.53.5

(fix): Fix wire test generation for SSE streaming endpoints with error responses.

Error-case tests for SSE endpoints would generate for await iteration over the response, but the client throws typed errors for non-2xx status codes. Error-response tests now use rejects.toThrow() and mock the response with jsonBody instead of sseBody.


3.53.4

(fix): Fix union member interfaces shadowing built-in TypeScript types like Date and Error. Union variants such as date generated export interface Date inside the union namespace, which shadowed the global Date type and caused compile errors when other variants referenced it. Interface names now use safeName (e.g., Date_, Error_) to avoid collisions with reserved identifiers.


3.53.3

(fix): Add ignoredFields support to formUrlEncodedBody in wire test mock server. Paginated POST endpoints using application/x-www-form-urlencoded content type (e.g. Twilio) now correctly ignore pagination cursor fields when matching request bodies in wire tests, matching the existing behavior for JSON body endpoints.

3.53.2

(fix): Fix map types with enum keys to generate Partial<Record<EnumType, ValueType>> instead of Record<EnumType, ValueType | undefined>. The previous type required all enum keys to be explicitly provided (even as undefined), while the new type correctly allows keys to be omitted entirely, matching the semantics of a sparse map.

3.53.1

(fix): Fix duplicate close event in WebSocket _handleAbort when close() was already called. The abort handler now checks _closeCalled before dispatching a close event, preventing applications from receiving duplicate close notifications.

3.53.0

(feat): Add connectionTimeoutInSeconds and abortSignal options to WebSocket ConnectArgs. The connectionTimeoutInSeconds option sets the timeout for establishing the WebSocket connection (converted to milliseconds internally). The abortSignal option allows callers to abort the WebSocket connection attempt using an AbortController.

3.52.9

(fix): Deduplicate @example JSDoc blocks in request wrapper and type declaration comments. When multiple examples produce identical output, only the first is kept. The endpoint method docs already had this deduplication; this fix extends it to request wrappers and type declarations.


3.52.8

(fix): Update generated CI workflow to publish older patch versions with --tag backport instead of the default latest tag. When publishing a version older than the current latest on npm (e.g. v1.3.2 after v1.4.0), the publish step now compares against npm’s current latest using semver and uses --tag backport to avoid moving the latest pointer backwards.

3.52.7

(fix): Disable commit signing and skip hooks for the throwaway git commit in deleteGitIgnoredFiles to avoid triggering prompts (e.g. Touch ID on macOS, 1Password SSH agent) during local generation.


3.52.6

(fix): Fix TypeScript generator crash when discriminated union discriminant values start with digits (e.g., “1foo”, “1bar”). The generated code now prefixes such identifiers with an underscore to produce valid TypeScript.

3.52.5

(fix): Fix Edge Runtime compatibility warning in Next.js. The runtime detection code previously used process.versions.node directly, which caused Next.js bundlers (Turbopack/webpack) to emit “A Node.js API is used which is not supported in the Edge Runtime” warnings during static analysis, even though the code path was guarded by an Edge Runtime check. The fix assigns process to a local variable first, preventing bundlers from flagging the indirect property access.

3.52.4

(fix): Fix publint warning for ambiguous types in package.json exports. Remove the top-level types condition from export entries in package.json so that import and require conditions each resolve to their own correctly-typed declaration file (.d.mts for ESM, .d.ts for CJS). This eliminates the publint warning about CJS types being used when resolving with the “import” condition.

3.52.3

(fix): Handle nullable header types by converting null to undefined. HTTP headers don’t have a “null” concept — they’re either present with a value or absent. When a header’s type is nullable (explicitly via nullable: true in the spec), the generated code now wraps the value with ?? undefined to ensure null values are treated as “don’t send the header” instead of causing type errors.

3.52.2

(fix): Fix biome formatting not being applied in github output mode. The generator was calling checkFix() (biome) without first installing biome, causing formatting to silently fail. Now installs checkFix dependencies when tools are not globally available, matching the existing behavior in downloadFiles mode.

3.52.1

(feat): Add JSDoc availability annotations for SDK endpoint methods. Endpoints marked as deprecated in the Fern definition now generate a @deprecated JSDoc tag, causing IDEs to show strikethrough and deprecation warnings. Endpoints marked as in-development or pre-release generate a @beta JSDoc annotation. This applies to all endpoint types (default, file download, and streaming).


3.52.0

(feat): Enable generateSubpackageExports by default. Generated TypeScript SDKs now include subpackage export entries in package.json, allowing users to import subpackage clients directly (e.g., import { FooClient } from '@acme/sdk/foo'). This enables JavaScript bundlers to tree-shake unused subpackages, resulting in smaller bundle sizes. To opt out, explicitly set generateSubpackageExports: false in your generator config.

(feat): Add tree-shaking smoke test to verify that importing a single subpackage produces a significantly smaller webpack bundle than importing the full SDK.

3.51.6

(chore): In downloadFiles mode, install only the configured formatter/linter packages instead of the full dependency tree when outputting source files only. This replaces the ~1.8s full pnpm install with a targeted pnpm add of just the check:fix packages (e.g. @biomejs/biome, prettier, oxfmt, oxlint).

3.51.5

(fix): Fix duplicate identifier collision in serialization schemas when two different packages define types with the same name. The schema generator now tracks directly imported type names and switches to namespace imports when a collision would occur, preventing “Duplicate identifier” TypeScript errors in cross-package type references.

3.51.4

(fix): Add cache: "no-store" to streaming and SSE fetch requests to prevent Next.js from buffering streamed responses. The option is guarded by a cached runtime feature-detection so it is safely skipped in runtimes that do not support the cache RequestInit option (e.g. Cloudflare Workers).

3.51.3

(fix): Fix duplicate case clauses in error handling switch statements when multiple errors map to the same status code. The generator now deduplicates errors by status code, keeping the first error for each status code.

(fix): Fix test generator to skip error examples whose status code is already handled by a prior error, matching the code generator’s deduplication behavior.

(fix): Fix test generator to include the error discriminant property (e.g., errorName) in mock response bodies for property-discriminated errors, so the generated switch statement can match the correct error case.

(fix): Fix inferred auth provider to handle endpoints without wrapped request types, preventing crashes during generation for non-wrapped endpoints.

3.51.2

(chore): Use generator-cli JS API directly instead of subprocess spawning. Remove generator-cli from Docker image since it is now bundled via esbuild.


3.51.1

(chore): Upgrade Docker base image from Node.js 22 to Node.js 24 LTS.

3.50.1

(fix): Support custom WebSocket connection method names via the connectMethodName IR field (sourced from x-fern-sdk-method-name on AsyncAPI channels). When specified, the generated client uses the custom name instead of the default connect.


3.51.0

(feat): Add event-level SSE discrimination support. When an SSE streaming endpoint returns a discriminated union with discriminatorContext: "protocol", the Stream class injects the SSE event: field value into the JSON data as the discriminator key before deserialization. This matches the Go SDK’s approach and supports proper SSE event-level discrimination, multiline data: concatenation, and blank-line event boundaries per the SSE spec. Also adds wire test generation support for SSE streaming endpoints.

3.50.0

(feat): Add webhook signature verification helpers to generated SDKs. Define signature verification via the x-fern-webhook-signature OpenAPI extension on individual webhooks or as a document-level default, and the generator produces a WebhooksHelper class for the most common config plus named helpers (e.g. PaymentNotificationWebhooksHelper) for each unique per-webhook override. Supports HMAC (SHA-1/256/384/512) and asymmetric (RSA-SHA256, ECDSA-SHA256) verification with configurable encoding, signature prefixes, payload format composition, timestamp-based replay protection, and JWKS key resolution. Includes unit tests for the underlying crypto primitives.

3.49.3

(chore): Update oxfmt to 0.35.0, oxlint to 1.50.0, and oxlint-tsgolint to 0.14.2.

3.49.2

(fix): Replace lodash-es template with Eta for template file processing. The lodash templating engine crashes on backticks (template literals) because it uses new Function() internally. Eta is a modern, lightweight, zero-dependency templating engine that properly handles backticks and uses the same <% %> syntax, requiring no changes to existing template files.

3.49.1

(fix): Change [TIMING] log statements from info to debug level so they are only printed when debug logging is enabled.


3.49.0

(feat): Optimize schema serialization layer performance with 7.2x geometric mean speedup. Replace O(n²) array/object spread patterns in list and record builders with O(n) loops, lazily memoize property metadata in object schemas, simplify prototype chain check, use for-in loops to avoid Object.entries() allocations, cache required-key Sets, and eliminate rest spread in union discriminant extraction.


3.48.5

(chore): Add timing logs for each phase of SDK generation: code generation, package manager install, lockfile generation, formatting/linting, build, and publish. Each phase logs its duration in milliseconds with a [TIMING] prefix for easy identification.

3.48.4

(fix): Switch Docker base image from node:22.12-alpine3.20 to node:22.12-slim (Debian). Alpine uses musl instead of glibc, causing a ~14x performance regression for Biome due to musl’s allocator being significantly slower for allocation-heavy workloads like AST parsing.

3.48.3

(chore): Update @biomejs/biome from 2.3.11 to 2.4.3.