Native Promise migration helpers for JavaScript and TypeScript, intended as a drop-in replacement for the deprecated Q library. Version 0.1.0 provides deferreds, denodeify, nfcall, fcall, timeout, delay, allSettled, and other Q-compatible utilities without recreating Q's full promise subclass or progress-notification model. The package ships TypeScript declarations, has zero runtime dependencies, and requires Node >=18. It is designed to ease migration from Q to native promises while keeping the exact API signatures that teams still need. Released in 2025, it offers a stable alternative to Q with no affiliation to the original maintainers.
npm install promise-bridgeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage of defer, denodeify, nfcall, and timeout to migrate from Q to native promises.
Use native Promises where possible; use promise-bridge as a transitional step.
Use import syntax and set { "type": "module" } in package.json, or use dynamic import().Migrate progress callbacks to standard Promise patterns or remove them.
Ensure spread is called with an array of resolved values; adjust callback signatures.
Enable ESM (type: module in package.json) and set moduleResolution to "node16" or "bundler" in tsconfig.json.
Wrap the value in Promise.resolve() before passing to promise-bridge utilities.
Use import { defer } from 'promise-bridge' and call defer() to create the deferred object.No dependency data recorded yet.