Releases: StopMakingThatBigFace/node-wreq
v2.2.1
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
Release Notes
Added
- Added
tlsDebugoptions for HTTP and WebSocket:peerCertificateskeylog: true | { path: string }
- Added
tlsDangeroptions for explicit unsafe TLS overrides:certVerificationverifyHostnamesni
- 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
Clienthelpers forput,patch,delete,head, andoptions. - Added passthrough support for transport controls from
wreq:readTimeoutconnectTimeouthttp1Onlyhttp2OnlylocalAddresslocalAddressesinterface
- Added WebSocket passthrough controls:
forceHttp2readBufferSizewriteBufferSizemaxWriteBufferSizeacceptUnmaskedFramesmaxFrameSizemaxMessageSize
Changed
- Kept upstream
wreqdefaults when transport options are not set. - Normalized streamed body timeout failures to
TimeoutError.
v2.1.0
Release Notes
- Fixed
AbortSignalhandling 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: 0now disables the timeout - Added Rust quality checks with
rustfmtandclippy.
v2.0.0
Release Notes
Breaking Changes
-
The minimum supported Node.js version is now
20+.
The package now officially requires Node 20, which alignsengineswith the library's actual runtime and public API surface, includingFormData,File,Request,Response, and related web globals. -
The
keepOriginalHeaderNamesoption 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.
Whenproxyis not provided, the client may now honor environment/system proxy settings such asHTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXYthrough the nativewreqtransport 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 PEMtlsIdentity: { 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.serversfor custom DNS serversdns.hostsfor per-host IP overrides
-
Multipart uploads via
FormData
Request bodies now supportFormDatanatively, with fetch-like behavior:- multipart boundaries are generated automatically
content-typeis generated automatically- text fields and file parts are both supported
-
Transparent
zstddecompression
Withcompress: true, the client now supportszstdresponse decoding in addition togzip,br, anddeflate. -
Charset-aware
response.text()
response.text()now decodes response bodies using thecharsetdeclared inContent-Typeinstead of always assuming UTF-8. -
New exported types
The package now exports:TlsIdentityCertificateAuthorityDnsOptionsNativeDnsOptions
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:
FormDatauploadsproxy: falsedisableDefaultHeaders- 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
zstddecompression- per-request DNS host overrides
- env/system proxy behavior and
proxy: false
Upgrade Guide
If you are upgrading from a previous version:
- Upgrade your runtime to Node.js 20+.
- Remove any use of
keepOriginalHeaderNames. - If you need to bypass env/system proxy detection, set
proxy: false. - For strict header control, use tuple-style
headers.
v1.0.0
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?)RequestResponseHeaders
- 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:
initbeforeRequestafterResponsebeforeRetrybeforeErrorbeforeRedirect
- Added pluggable
cookieJarsupport 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
tlsOptionshttp1Optionshttp2Options
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-commithooks 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
ci: fix linux native build toolchains
v0.2.0
v0.1.2
Full Changelog: v0.1.1...v0.1.2
v0.1.1
v0.1.0
Full Changelog: https://github.com/will-work-for-meal/node-wreq/commits/v0.1.0