Release v3.0.0: wreq rc.29 and transport APIs - #22
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This major release updates the native transport to the latest published upstream prerelease (
wreq 6.0.0-rc.29/wreq-util 3.0.0-rc.14), refreshes all browser profiles, bridges the new upstream capabilities that have useful Node.js semantics, and modernizes linting, formatting, hooks, and CI.The release is intentionally v3.0.0, not a minor: upstream removed the custom unknown HTTP/2 settings API and the default fingerprint changes from Chrome 137 to Chrome 149.
Release notes
Browser emulation
chrome_149,edge_148,firefox_151,opera_131, andsafari_26_4.browser: { profile, platform }.browser: { mode: 'random' | 'weighted-random' }.browser.http2andbrowser.headerscomponent switches from the upstream emulation builder.tlsOptions,http1Options, andhttp2Optionsnow overlay the selected browser profile instead of replacing all unspecified profile defaults.keyShares;keySharesLimitnow truncates the selected profile's own key-share list.Native clients, pooling, and TLS sessions
createClient()now owns and reuses nativewreq::Clientinstances, HTTP keep-alive pools, and TLS sessions instead of rebuilding the native client for every request.poolIdleTimeout,poolMaxIdlePerHost,poolMaxSize, andtlsSessionCacheCapacityfor HTTP and WebSocket clients.connectionGroupto partition a client's pool explicitly.forbidConnectionReuseand dynamicresponse.wreq.forbidConnectionReuse()connection recycling control.client.close()plus GC cleanup for native pooled resources.Multipart and WebSocket
FormDatanow uses WebKit-style multipart boundaries matching the rc.29 generator, with optional explicitmultipartBoundaryvalues.wreq::multipart::Formand streamed fromBlob.stream()through a bounded N-API channel with backpressure; the complete multipart body is no longer buffered before network dispatch.Content-Length, browser-style field escaping and CRLF normalization.httpVersion: '1.1' | '2'; legacyforceHttp2remains supported but is deprecated.Upstream transport changes
wreqfrom6.0.0-rc.28to6.0.0-rc.29andwreq-utilfrom3.0.0-rc.11to3.0.0-rc.14.btlskey-share types, and renamed WebSocket version selection.Breaking changes
http2Options.experimentalSettingsis unsupported because upstream removed custom unknown HTTP/2 settings. It remains deprecated and fails with an explicit error; upstream provides no replacement.chrome_137tochrome_149. Setbrowserexplicitly when a stable fingerprint is required.tlsOptions.keySharesLimitmust be greater than zero.CI and developer tooling
lint-stagedto the existing pre-commit hook: OXLint fix + OXFormat for JS/TS andrustfmtfor Rust.Deliberately not exposed
The remaining rc.29 additions are Rust-specific integration surfaces rather than Node APIs:
Extensions/ custom middleware layers;WebSocket::into_inner;Upgrade guide
http2Options.experimentalSettings.browserexplicitly if the previous Chrome 137 fingerprint matters.keySharesLimit: 0with a positive value or omit it.httpVersion: '2'overforceHttp2: true.client.close()when a long-lived application is done with a client; GC cleanup remains a fallback.Validation
npm test— 89 tests passedBlob.arrayBuffer(), retry, 307 redirect, abort, and source failure propagationnpm run lintnpm run lint:rustnpm run format:checknpm run format:rust:checklint-stagedflownpm pack --dry-runnpm audit --omit=dev— 0 vulnerabilities