Back to Explore

sindresorhus/pify

GitHub
3 watchersOpen source

Last release:

pify turns callback-style functions or whole modules into Promise-based functions. It’s useful when you want to use async/await with APIs that use callbacks, with options for handling error-first callbacks and returning multiple callback arguments.

Project status

  • Maintenance status: The repo shows an upstream push on 2026-07-23, but the most recent published updates in the provided history are from 2022-09-02 (v6.1.0), so npm-level changes appear infrequent and the source is effectively quiet from a user-facing update perspective.
  • Update cadence: Historically, updates are widely spaced (notably multi-year gaps), with no listed published updates since 2022 despite the later upstream push in 2026.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v6.1.0

    This release primarily adds first-class TypeScript definitions for `pify` (along with type tests). It also updates package metadata and repository tooling to publish and verify the new `.d.ts` files, plus includes a README note about how TypeScript overload selection interacts with `pify`.

    Features
  • v6.0.0

    v6.0.0 is a major release that switches the package from CommonJS to pure ESM and drops older Node.js versions. The diff also updates the test suite and documentation to use ESM import syntax, and modernizes CI configuration.

    Breaking
  • v5.0.0

    v5.0.0 changes pify to be implemented using JavaScript Proxy, enabling lazy and more transparent wrapping behavior. The documented breaking change is raising the required Node.js version to >= 10.

    BreakingFeatures
  • v4.0.1

    Release v4.0.1 restores support for promisifying prototype functions, which was accidentally omitted in v4. The code change adjusts how the returned promisified wrapper forwards arguments and preserves call context.

  • v4.0.0

    Release v4.0.0 of pify bumps the minimum supported Node.js version to 6 and adds validation for invalid inputs to the exported promisifier. Internally it refactors the promisification wrapper implementation to use rest/spread arguments and reworks callback-to-promise resolution logic slightly.

    Breaking
  • v3.0.0

    pify v3.0.0 updates the supported runtime and changes several promisification behaviors. The release adds options for non-error-first APIs and improved method handling, while also introducing compatibility breaking changes around Node.js version, the placement of promiseModule configuration, and default exclusions of Stream-related methods.

    BreakingFeatures