Back to Explore

better-auth/better-fetch

GitHub
1 updates · last 90 days1 watchersOpen source

Last release:

Better Fetch is an advanced TypeScript fetch wrapper that adds standard schema validations, using validators like zod, valibot, or arktype, plus pre-defined routes, callbacks, and plugins. It’s designed to work across the browser, Node.js (18+), workers, Deno, and Bun.

Project status

  • Actively maintained, with upstream pushes continuing through 2026-09-11 and multiple recent updates (v1.3.0 on 2026-06-11, v1.3.1 on 2026-06-15, v1.3.2 on 2026-09-11).
  • Update cadence looks active and somewhat clustered, with two updates in mid-June 2026 and another in mid-September 2026 (roughly a 2 to 3 month gap between clusters).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.3.2

    v1.3.2 primarily claims a set of TypeScript and fetch behavior bug fixes, mostly around schema validation, query merging, and method modifier handling. However, the actual diff includes additional URL/path encoding changes, internal type signature changes, and notable packaging/build changes in other workspace packages (for example, @better-fetch/logger) that are not described in the release notes.

  • v1.3.1

    v1.3.1 focuses on improving URL generation in @better-fetch/fetch, specifically around request path normalization and encoding of dynamic path parameters. The code changes are centered in packages/better-fetch/src/url.ts and are accompanied by additional unit tests for the new URL behavior.

  • v1.3.0

    v1.3.0 primarily updates the logger to emit more self-contained request logs, including method, URL, status, and timing information. It also fixes request context identity stability across hooks so per-request state is not lost when hook implementations return replacement objects.

    Features
  • v1.2.2

    v1.2.2 contains a focused fix around how `createFetch` exposes `options.headers` to plugins. It ensures plugin code can safely spread `options.headers` without headers being lost when a `Headers` instance is passed.

  • v1.2.1

    v1.2.1 is a small bug fix release for @better-fetch/fetch focused on correctly handling request headers. The code refactors header merging so that Headers instances are preserved and properly merged with configuration and per-call headers.

  • v1.2.0

    v1.2.0 introduces fetch-schema support for validating and aggregating request headers (in addition to validating body, query, and params). It also refactors internal header and body handling so content-type detection and normalization work more reliably across different header input forms.

    BreakingFeatures
  • v1.1.21

    v1.1.21 introduces logic to encode request bodies as x-www-form-urlencoded when the Content-Type header is set accordingly. The change primarily targets how `getBody` serializes JSON-serializable objects for form-urlencoded requests, and is backed by an added unit test.

    Features
  • v1.1.19

    Release v1.1.19 adds support for supplying additional plugin input from fetch call options, and improves request handling and auth header generation. It also updates URL query param serialization and stack trace capture, plus includes several internal refactors related to plugin typing and response parsing.

    Features
  • v1.1.18

    v1.1.18 adds support for retrieving Bearer auth tokens asynchronously. The fetch pipeline now awaits auth header construction so that a Promise-based token provider can supply the final Authorization header value.

    Features
  • v1.1.17

    v1.1.17 has no documented changes in the release notes. The code diff is small but includes a functional change in URL query string generation, plus several non-code changes in CI configuration and TypeScript config.