3.59.3
(fix): Fix npm publish authentication failing when the registry URL includes a port number.
The .npmrc auth token key was constructed using URL.hostname (which strips the port)
instead of URL.host (which preserves it). For example, a registry at
http://host.docker.internal:4873 would write the token under
//host.docker.internal/:_authToken instead of the correct
//host.docker.internal:4873/:_authToken.
3.59.2
(fix): Fix passthrough fetch() method failing when no environment is explicitly set on
multi-URL environment SDKs. When the user relies on the default environment,
Supplier.get(undefined) returned undefined and the IIFE produced no base URL.
The generated code now derives the correct base URL property from the IR (using the
same base URL that HTTP endpoints resolve to) and falls back to the IR-defined
default environment, matching how regular endpoint methods resolve their base URL.
3.59.1
(fix): Fix generated README.md including the “Customizing Fetch Client” section
under “Runtime Compatibility” even when allowCustomFetcher is false.
The section and its code snippet are now conditionally omitted when the
custom fetcher option is disabled.
3.59.0
(feat): Make readyState on generated WebSocket socket classes return a ReadyState
enum (CONNECTING, OPEN, CLOSING, CLOSED) instead of a raw number,
improving developer experience with IDE autocompletion and self-documenting code.
3.58.1
(fix): Export the generated Socket class from subpackage exports.ts when
WebSocket clients are enabled. Previously only the Client class was
exported, making the Socket class inaccessible through the public
exports path.
3.58.0
(fix): Add explicit type annotation to mockServerPool export in generated test
mock-server code to satisfy --isolatedDeclarations.
(feat): Enable vitest typechecking in generated vitest config so that type errors
in test and source files are caught when running vitest.
3.57.2
(fix): Fix map types with unknown/any value types to not include spurious | undefined.
Previously, map<string, UnknownType> generated Record<string, UnknownType | undefined>
instead of Record<string, UnknownType>. The | undefined is now correctly omitted
from map value types.
3.57.1
(fix): Fix passthrough fetch() method producing 404s when the SDK environment is an
object (e.g. { base: string; production: string }) instead of a plain string URL.
The generated code now resolves the environment supplier inline and projects object
environments to their .base property, instead of passing the raw object to
makePassthroughRequest where it would be stringified as [object Object].
3.57.0
(feat): Expose an optional protocols field on RealtimeClient.ConnectArgs for WebSocket
subprotocol negotiation. The ReconnectingWebSocket constructor already accepted a
protocols parameter but it was hardcoded to an empty array. Browser callers can now
authenticate via subprotocols (e.g. xai-client-secret.<token>) where custom headers
are forbidden by the browser security model.
3.56.4
(fix): Remove baseUrl from generated tsconfig.base.json files. Setting baseUrl
to src was unnecessary alongside rootDir and caused unexpected module
resolution side effects in some project setups.
3.56.3
(fix): Fix TypeScript SDK generator crash when generating WebSocket clients for
AsyncAPI specs that define a named server (e.g. servers.production) with
a single-URL environment. The baseUrlId assigned by the Fern IR converter
is now silently ignored for single-URL environments since there is only one
URL to resolve to.
3.56.2
(chore): Rename the shouldGenerateWebsocketClients configuration option to
generateWebSocketClients. The old name is still accepted as a deprecated
fallback for backwards compatibility.
3.56.1
(fix): Include root markdown files (README.md, reference.md, CONTRIBUTING.md) in
the output when outputSourceFiles is false. Previously, the compiled
CJS/ESM output mode only included the dist/ directory contents, silently
dropping generated documentation files.
3.56.0
(feat): Add a naming configuration object that gives you fine-grained control over the
exported namespace and generated class names (client, error, timeout error,
environment, environment URLs, version).
You can use it as a simple string shorthand to set the namespace:
Or as a full object to override individual names:
When individual overrides are not provided, they are derived from the namespace
using the PascalCase(namespace) + Suffix pattern (e.g. namespace: acme produces
AcmeClient, AcmeError, AcmeTimeoutError, AcmeEnvironment, AcmeEnvironmentUrls,
and AcmeVersion by default).
The existing namespaceExport config continues to work for backwards compatibility.
3.55.0
(feat): Add a passthrough fetch method to the root client class of all generated TypeScript SDKs.
The method mimics the standard fetch API while automatically applying the SDK’s configured
authentication, base URL resolution, retry logic with exponential backoff, request timeouts,
custom headers, and logging. This allows users to make requests to endpoints not yet exposed
in the SDK definition (e.g., new public endpoints, closed beta endpoints) without additional
setup. The method accepts three parameters: url (string or relative path), init (standard
RequestInit), and requestOptions (SDK-specific overrides for timeout, retries, headers,
and abort signal).
3.54.0
(feat): Add support for URI and path-based pagination. Endpoints configured with
next_uri or next_path pagination now generate Page<T, R> return types
that automatically follow the next URL from the response body to load
subsequent pages.
3.53.14
(chore): Remove baseUrl from the generated test tsconfig.json. The baseUrl compiler
option is unnecessary for test compilation and can interfere with module resolution
in consuming projects.
3.53.13
(fix): Fix WebSocket connections failing silently in Bun and Deno. The getGlobalWebSocket()
function now prefers the ws library for Bun and Deno runtimes, whose native WebSocket
constructors ignore the options argument containing authentication headers.
3.53.12
(chore): Add concurrency configuration to generated CI workflow with cancel-in-progress: false
to prevent stacked runs from being cancelled when a newer run starts.
3.53.11
(fix): Re-throw errors after logging for README.md, reference.md, and CONTRIBUTING.md
generation failures. Documentation generation errors now break the generation flow
so they are treated as important to fix.
3.53.10
(fix): Fix dynamic snippets to include global headers in generated code examples.
Previously, required global headers (e.g., X-Organization-ID) configured via
x-fern-global-headers were missing from dynamic snippet output. Also fixes
header value lookup to use wire values instead of a non-existent property.
3.53.9
(fix): Fix README generation in Docker by adding ca-certificates to the Debian slim
base image. Since the switch from Alpine to Debian slim in v3.48.4, the container
was missing CA certificates, causing git clone over HTTPS to fail with
“server certificate verification failed”. This resulted in empty README files
being generated.
3.53.8
(chore): Improve error logging for README.md, reference.md, and CONTRIBUTING.md generation
failures. The generator now logs the actual error message and stack trace instead
of a generic “this is OK” message, making it easier to diagnose generation issues.
3.53.7
(fix): Revert union member interface naming from safeName back to unsafeName.
The v3.53.4 change to use safeName for union variant interface names (e.g.,
Date_ instead of Date, Error_ instead of Error) was a breaking change.
Union member interfaces are generated inside a namespace, so they do not
shadow global TypeScript types like Date or Error.
(fix): Qualify global type references with globalThis. inside union namespaces
when a sibling interface would shadow them. For example, if a union has both
Date and Datetime variants, the Datetime interface’s value: Date
property now generates value: globalThis.Date to correctly reference the
built-in Date type instead of the local Date interface.
3.53.6
(chore): Optimize SdkContextImpl by lazily initializing sub-contexts, external dependencies,
core utilities, and GeneratorNotificationService. Previously, every file generation
eagerly constructed all 19 sub-context objects plus utility instances regardless of
which were actually used. Now each sub-context is created on first access via lazy
getters, eliminating ~90% of unnecessary object allocations for large specs.