@whatwg-node/promise-helpers
2.0.2 · 10 Nov 2026MIT29.4M / weekRepositoryHomepagenpmAtom feed
Where each line stands
Plan an upgrade- 2.x2.0.2No known advisoryLatest line
- 1.x1.3.2No known advisoryTo 2.0.2
Latest releases
- 2.x · latest line
2.0.2
10 Nov 2026#3793
f778c82Thanks @ardatan! - Use shared prototype classes forfakePromise/fakeRejectPromiseinstances.Resolved and rejected fake promises (and foreign-thenable wrappers) are no longer allocated as object literals with own
then/catch/finallymethods. A shared constructor keeps a stable V8 hidden class while preserving the same brand (Symbol.for) and unwrapping behavior.
2.0.1
26 Oct 2026#3733
75603bdThanks @ardatan! - MakehandleMaybePromiseavoid temporary fake-promise wrappers on the synchronous path.When no
finallycallback is provided and the input factory returns a non-thenable value, success/error factories run directly. Promise, fake-promise, and custom thenable inputs still go through the existing normalization path.
2.0.0
21 Sep 20260.x packages: minor bump (breaking changes are allowed in minors while major is 0).
1.x packages (
@whatwg-node/promise-helpers,@whatwg-node/server-plugin-cookies): major bump, since dropping supported Node versions is a breaking engines change for SemVer>=1.0.0consumers.
Major Changes
- Breaking
#3561
52a5bf6Thanks @ardatan! - Drop support for Node.js 18 and 20. The minimum supported Node.js version is now 22.15.
Why
Node.js 18 and 20 are end-of-life and no longer receive security updates. Keeping them in our support matrix forced version-specific workarounds and slowed adoption of newer Node TLS APIs.
The floor is set to 22.15 (not just 22.0) so we can rely on
tls.getCACertificates()(Node.js 22.15 / 23.10) and always-onzlibzstd helpers (createZstdCompress/createZstdDecompress, Node.js 22.15 / 23.8). That matches the oldest currently supported LTS line (22 Maintenance) while dropping only EOL majors.SemVer
0.x packages: minor bump (breaking changes are allowed in minors while major is 0).
1.x packages (
@whatwg-node/promise-helpers,@whatwg-node/server-plugin-cookies): major bump, since dropping supported Node versions is a breaking engines change for SemVer>=1.0.0consumers.
What changed
engines.node: all published packages now declare>=22.15.0(including@whatwg-node/promise-helpers, which was still on>=16).@whatwg-node/events: removed. NativeCustomEvent/Event/EventTargetare available on Node.js 22+, so the ponyfill is no longer maintained; use the platform globals.@whatwg-node/fetch: dropped therequire("crypto").webcryptofallback;cryptois alwaysglobalThis.cryptoon supported runtimes.@whatwg-node/server: removed the Node 18setHeadersworkaround (isNode1x);ServerResponse#setHeadersis used whenever it exists.@whatwg-node/node-fetch: Runtime guards forzlib.createZstdCompress/createZstdDecompressare removed;zstdis always included inAccept-Encoding.CI / e2e: unit matrix is
[22, 24, 26]; AWS Lambda runtime and Azure Function target moved from Node 20 to Node 22.
If you are still on Node 18 or 20, upgrade to Node.js 22.15+ (or 24 / 26) before installing this release.
#3565
ba977d4Thanks @ardatan! - Breaking Change: Remove deprecatedmapMaybePromisein favor ofhandleMaybePromise.mapMaybePromise(input, onSuccess, onError?)is gone. UsehandleMaybePromise, which takes an input factory (thunk) instead of a bare value so sync throws are handled the same way as promise rejections.Before:
import { mapMaybePromise } from "@whatwg-node/promise-helpers"; const result = mapMaybePromise( maybeValue, (value) => transform(value), (err) => fallback(err), );After:
import { handleMaybePromise } from "@whatwg-node/promise-helpers"; const result = handleMaybePromise( () => maybeValue, (value) => transform(value), (err) => fallback(err), );handleMaybePromisealso accepts an optional fourthfinallyFactoryargument if you need cleanup.
Dependency tracking · free for 3 projects
Know when your own dependencies move
@whatwg-node/promise-helpers shipped a new major in the last 12 months, among 3 releases. inlinr shows which of your projects are behind, and what the upgrade breaks.
Advisories reach you
An email when a critical or high advisory affects a project, before the next install.
Upgrades checked first
Peer ranges, Node, ESM-only and types changes read before you bump.
Only what matters
Majors and breaking notes stay; patches and sibling bumps fold into one line.
Reading releases, release notes and advisories…
Registry facts last checked 11 Nov 2026. Releases and advisories last read 11 Nov 2026.