bluebird

A drop-in Promises/A+ implementation engineered for raw execution speed, long stack traces, and a rich set of async collection utilities.

Library
npm
v3.7.2
20,486 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
57 /100 Fair
Development Activity 0
Maintenance 44
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
73 /100 Good
Architecture 75
Code Quality 78
Innovation 70
Learning Curve 70

Bluebird is a fully-featured Promises/A+ library for JavaScript that predates and heavily influenced the native Promise implementation now built into Node.js and browsers. It was built with two priorities that were largely absent from early promise libraries: exceptionally good performance through hand-tuned internal scheduling, and a debugging experience on par with synchronous code via long stack traces and unhandled-rejection warnings.

Beyond the core then/catch contract, Bluebird ships an extensive collection-processing API (map, reduce, filter, each, props, some) that lets developers run concurrent async operations over arrays and objects without hand-rolling counters or callback juggling, plus utilities like promisify/promisifyAll for converting Node’s callback-style APIs into promise-returning ones, and Promise.coroutine for generator-based async flows predating native async/await. While the maintainers now recommend native promises for most new code, Bluebird remains widely used in older Node.js codebases and environments where its extra utilities or legacy browser support are still required.

What You Get

  • A Promises/A+ 1.1 compliant Promise class with a highly optimized internal scheduler
  • Long stack traces that preserve the async call chain across .then() chains for real debugging output
  • Collection utilities — map, reduce, filter, each, some, props — for running concurrent work over arrays and objects
  • promisify/promisifyAll to convert Node.js callback-style APIs into promise-returning functions automatically
  • Promise.coroutine for writing async flows with generators, predating native async/await
  • Cancellation support (.cancel()) for aborting in-flight promise chains, which native Promises still lack
  • Built-in unhandled-rejection detection and warnings to surface silently swallowed errors

Common Use Cases

  • Wrapping legacy Node.js callback-based modules (fs, older database drivers) into promise-returning APIs via promisifyAll
  • Running bounded-concurrency batch operations over large arrays with Promise.map(items, fn, {concurrency: N})
  • Debugging deeply nested async chains in production using long stack traces instead of opaque native stack frames
  • Supporting older Node.js versions or browsers (IE8+) that lack a native Promise implementation
  • Cancelling in-flight async operations, such as aborting a search request when a user types a new query

Under The Hood

Architecture The library is assembled as a single factory module (src/bluebird.js → src/promise.js) that wires together roughly three dozen focused sub-modules (async.js, schedule.js, promise_array.js, thenables.js, debuggability.js, context.js, etc.) through a dependency-injection pattern where each sub-module exports a function that receives the Promise constructor and returns its methods. This avoids circular require issues in a codebase with no build-time module bundler for the source itself, and lets debugging features (debuggability.js), Node domains/async-hooks context propagation (context.js), and the promise-array machinery used by map/reduce/filter be swapped or disabled independently. The core Promise state machine lives in promise.js and manages fulfillment/rejection through bitfield flags on the instance rather than separate boolean properties, which is a deliberate low-level optimization rather than a typical object-oriented design.

Tech Stack Pure ES5-era JavaScript with no runtime dependencies — the entire library is hand-written, not transpiled, and its package.json lists only devDependencies (mocha, jshint, browserify, uglify-js, istanbul) used for testing, linting, and producing minified browser bundles via a custom tools/build.js pipeline. It targets both Node.js (main field) and browsers (browser field, plus a separate core/full minified bundle split) and optionally uses Node’s async_hooks module when available for context propagation, falling back to domain on older runtimes.

Code Quality The project has an extensive Mocha-based test suite (93+ files under test/mocha, including version-numbered files mapping directly to Promises/A+ compliance test IDs like 2.1.2.js) plus a separate browser test harness, and historically reports ~98% coverage via Istanbul. Linting is enforced through a custom jshint wrapper script rather than ESLint, reflecting the codebase’s ES5-era origins. There is no TypeScript source and no static type system, though community .d.ts type definitions exist separately via DefinitelyTyped. CI (via legacy Travis config) ran the suite across a wide matrix of Node.js versions from 0.10 through 10.

What Makes It Unique Bluebird’s defining technical choice was treating promise performance as a first-class design constraint years before native engines optimized their Promise implementations, achieved through custom microtask scheduling and avoiding unnecessary allocations in the hot path. It paired that with a debugging-first feature set — long stack traces and unhandled-rejection detection — that shipped well before V8 and other engines adopted similar diagnostics natively. Combined with cancellation support that native Promises still don’t offer, these were the features that drove its widespread adoption before largely being superseded by the platform itself.

Used by 11 apps in this directory

TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,916

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
90
Repo Health
77
Technical
61
Dependency
Built with
TypeScript 97%
Updated 6 days ago
TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,924

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
94
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 100%
Updated 1 weeks ago
JavaScript
83%
Other

Countly

Analytics · Marketing

5,908

Privacy-first, self-hosted analytics and customer engagement platform with full data ownership, GDPR compliance, and AI-powered insights across mobile, web, desktop, and IoT.

View details
96
Repo Health
82
Technical
65
Dependency
Built with
JavaScript 83%
Updated 4 days ago
TypeScript
97%
Other

GrowthBook

Ab Testing Experimentation · Analytics · Developer Tools

8,446

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
63
Dependency
Built with
TypeScript 97%
Updated 4 days ago
TypeScript
98%
Other

Novu

Developer Tools

40,084

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 5 days ago
JavaScript
64%
AGPL 3.0

overleaf

Collaboration · Productivity

18,188

Open-source, real-time collaborative LaTeX editor with sandboxed compilation and full TeXLive support for self-hosted academic and research teams.

View details
87
Repo Health
80
Technical
62
Dependency
Built with
JavaScript 64%
TypeScript 30%
Updated 2 weeks ago
TypeScript
91%
AGPL 3.0

PeerTube

Social Media

15,340

A federated, ActivityPub-based video hosting platform built by Framasoft — self-hostable instances interconnect into a network with no vendor lock-in, P2P-assisted streaming, and no ads.

View details
96
Repo Health
75
Technical
70
Dependency
Built with
TypeScript 91%
Updated 1 weeks ago
JavaScript
50%
AGPL 3.0

QRev

AI Agents · CRM

363

Open source AI-first sales platform that replaces Salesforce with autonomous agents handling prospecting, outreach, and lead management at scale.

View details
38
Repo Health
68
Technical
63
Dependency
Built with
JavaScript 50%
Python 28%
TypeScript 14%
Updated 7 months ago
TypeScript
97%
AGPL 3.0

Responsively App

Design Tools · Developer Tools

25,201

Preview and interact with your responsive web design across every device size simultaneously — no more manual resizing.

View details
78
Repo Health
71
Technical
67
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers