Skip to content

Releases: StopMakingThatBigFace/node-wreq

v2.2.1

16 Apr 15:17

Choose a tag to compare

Release Notes

Added API documentation comments across the public surface.

Highlights

  • documented public request, response, headers, error, and WebSocket classes
  • documented exported client, hook, HTTP, native, shared, and WebSocket types
  • documented nested option fields for request, TLS, HTTP/1, HTTP/2, retry, and WebSocket config objects

Notes

  • this change is documentation-only
  • no runtime behavior or public API signatures were changed

v2.2.0

15 Apr 23:09
e8f4ff8

Choose a tag to compare

Release Notes

Added

  • Added tlsDebug options for HTTP and WebSocket:
    • peerCertificates
    • keylog: true | { path: string }
  • Added tlsDanger options for explicit unsafe TLS overrides:
    • certVerification
    • verifyHostname
    • sni
  • Added TLS peer certificate metadata on HTTP responses via response.wreq.tls.
  • Added support for arbitrary HTTP methods, including methods outside the previous allowlist.
  • Added Client helpers for put, patch, delete, head, and options.
  • Added passthrough support for transport controls from wreq:
    • readTimeout
    • connectTimeout
    • http1Only
    • http2Only
    • localAddress
    • localAddresses
    • interface
  • Added WebSocket passthrough controls:
    • forceHttp2
    • readBufferSize
    • writeBufferSize
    • maxWriteBufferSize
    • acceptUnmaskedFrames
    • maxFrameSize
    • maxMessageSize

Changed

  • Kept upstream wreq defaults when transport options are not set.
  • Normalized streamed body timeout failures to TimeoutError.

v2.1.0

15 Apr 20:18
7893417

Choose a tag to compare

Release Notes

  • Fixed AbortSignal handling so in-flight HTTP requests can be cancelled after dispatch starts.
  • Fixed response body streaming contention in the Rust body store.
  • Fixed Request.clone() so multipart/FormData bodies are preserved correctly.
  • Fixed timeout handling: timeout: 0 now disables the timeout
  • Added Rust quality checks with rustfmt and clippy.

v2.0.0

15 Apr 18:41
8ddc4c5

Choose a tag to compare

Release Notes

Breaking Changes

  • The minimum supported Node.js version is now 20+.
    The package now officially requires Node 20, which aligns engines with the library's actual runtime and public API surface, including FormData, File, Request, Response, and related web globals.

  • The keepOriginalHeaderNames option has been removed.
    There is no separate flag for original header-name preservation anymore. Header tuples are now the single low-level way to control wire shape:

    • tuple order is preserved
    • original header names are preserved on the wire
  • Proxy behavior has changed.
    When proxy is not provided, the client may now honor environment/system proxy settings such as HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY through the native wreq transport path.
    To explicitly disable env/system proxy detection for a request, use:

    proxy: false

Added

  • mTLS / client certificate support
    Added support for client certificate authentication in both HTTP and WebSocket flows:

    • tlsIdentity: { cert, key } for PEM
    • tlsIdentity: { pfx, passphrase } for PKCS#12 / PFX
  • Custom CA / trust store support
    Added custom trust store configuration:

    • ca: { cert, includeDefaultRoots }
      You can provide a single certificate or an array of certificates.
  • DNS controls
    Added DNS options:

    • dns.servers for custom DNS servers
    • dns.hosts for per-host IP overrides
  • Multipart uploads via FormData
    Request bodies now support FormData natively, with fetch-like behavior:

    • multipart boundaries are generated automatically
    • content-type is generated automatically
    • text fields and file parts are both supported
  • Transparent zstd decompression
    With compress: true, the client now supports zstd response decoding in addition to gzip, br, and deflate.

  • Charset-aware response.text()
    response.text() now decodes response bodies using the charset declared in Content-Type instead of always assuming UTF-8.

  • New exported types
    The package now exports:

    • TlsIdentity
    • CertificateAuthority
    • DnsOptions
    • NativeDnsOptions

Changed

  • Header tuples are now the single low-level header control mechanism.
    If you pass:

    headers: [
      ['x-lower', 'one'],
      ['X-Mixed', 'two'],
    ]

    the client will preserve both tuple order and the original header names on the wire without any additional option.

  • Request body dispatch is now binary-safe internally.
    Native request bodies are now passed as bytes instead of UTF-8 strings, which improves correctness for multipart payloads and other non-text request bodies.

  • Request cloning and redirect handling now work correctly with multipart bodies.
    Internal request cloning and redirect rewriting now support both raw byte bodies and multipart request bodies.

Documentation

The README has been expanded to cover:

  • FormData uploads
  • proxy: false
  • disableDefaultHeaders
  • exact header order and original header names
  • mTLS and custom CAs
  • zstd
  • DNS controls
  • the Node.js 20+ requirement

Testing

Added integration coverage for:

  • mTLS with PEM identities
  • mTLS with PKCS#12 / PFX identities
  • rejection of mTLS requests without a client certificate
  • multipart uploads
  • charset-aware text decoding
  • zstd decompression
  • per-request DNS host overrides
  • env/system proxy behavior and proxy: false

Upgrade Guide

If you are upgrading from a previous version:

  1. Upgrade your runtime to Node.js 20+.
  2. Remove any use of keepOriginalHeaderNames.
  3. If you need to bypass env/system proxy detection, set proxy: false.
  4. For strict header control, use tuple-style headers.

v1.0.0

12 Apr 20:43
ff90247

Choose a tag to compare

node-wreq 1.0.0

node-wreq now ships a much more complete fetch-style API on top of the Rust transport powered by wreq.

Highlights

  • Added a new fetch-oriented public API with:
    • fetch(input, init?)
    • createClient(defaults?)
    • Request
    • Response
    • Headers
  • Added WHATWG-style WebSocket support:
    • new WebSocket(url, init?)
    • await websocket(url, init?)
    • support for browser-like lifecycle, binary payloads, protocols, handshake validation, and cookie-backed handshakes
  • Added request lifecycle hooks:
    • init
    • beforeRequest
    • afterResponse
    • beforeRetry
    • beforeError
    • beforeRedirect
  • Added pluggable cookieJar support for both HTTP requests and WebSocket handshakes
  • Added redirect and retry orchestration in the JS pipeline
  • Added richer fetch-style response handling:
    • stream-backed bodies
    • clone()
    • json(), text(), arrayBuffer(), blob(), formData()
    • extra metadata under response.wreq
  • Added response metadata and observability surfaces:
    • timings
    • redirect chain
    • cookies / set-cookie exposure
    • Node-readable conversion via response.wreq.readable()
  • Added advanced transport/emulation controls:
    • browser profiles
    • exact header order / original header names
    • tlsOptions
    • http1Options
    • http2Options

Internal Refactor

  • Refactored the package around a clearer module structure:
    • src/http/*
    • src/client/*
    • src/websocket/*
    • src/native/*
    • src/types/*
  • Split Rust internals into transport, N-API, emulation, and runtime/store layers
  • Added generated browser profile plumbing and cleaner native binding boundaries

Tooling and Release Infrastructure

  • Replaced the old formatting setup with oxlint + oxfmt
  • Added local pre-commit hooks for lint autofix and formatting
  • Added scoped platform package publishing flow for:
    • @node-wreq/darwin-x64
    • @node-wreq/darwin-arm64
    • @node-wreq/linux-x64-gnu
    • @node-wreq/linux-arm64-gnu
    • @node-wreq/linux-x64-musl
    • @node-wreq/win32-x64-msvc
  • Added GitHub trusted publishing support for npm releases
  • Release versions can now be derived from the GitHub release tag instead of the repo’s local placeholder version

Docs

  • Rewrote the README into an example-first reference
  • Expanded docs around architecture, publishing, observability, retries, redirects, hooks, cookies, networking, and WebSockets

Tests

  • Added coverage for:
    • hooks and retries
    • cookies and redirects
    • HTTP client behavior
    • response streaming and cloning
    • WebSocket lifecycle and handshake behavior

v1.0.0-rc2

12 Apr 20:31

Choose a tag to compare

v1.0.0-rc2 Pre-release
Pre-release
ci: fix linux native build toolchains

v0.2.0

12 Oct 20:26
010c72d

Choose a tag to compare

What's Changed

  • feat: websockets support in #2

Full Changelog: v0.1.2...v0.2.0

v0.1.2

12 Oct 13:19

Choose a tag to compare

Full Changelog: v0.1.1...v0.1.2

v0.1.1

12 Oct 12:47
c3a02f7

Choose a tag to compare

What's Changed

  • fix: enable webpki-roots feature in #1

Full Changelog: v0.1.0...v0.1.1

v0.1.0

11 Oct 23:52

Choose a tag to compare