p-try starts a promise chain by running a function that may throw, returning a Promise that resolves with the function’s value or rejects if it throws. It’s useful when you want to integrate synchronous, potentially throwing code into async Promise workflows, with optional arguments to avoid unnecessary closures.
Project status
- The source appears maintained historically, with semantic versioned updates (notably v3.0.0) and explicit breaking changes documented, but the most recent upstream push and last listed update are dated 2021 and 2025 respectively, so active day-to-day maintenance beyond that is not evidenced here.
- Apparent update cadence is low to moderate over time, with gaps of about 2.5 years between v2.2.0 (2019-03-31) and v3.0.0 (2021-10-04), and no newer versioned updates shown after v3.0.0.
AI summary generated Today
Recent updates
v3.0.0
10/4/2021Release v3.0.0 makes p-try a major version update by switching to a pure ESM-only package and raising the supported Node.js versions. The implementation and TypeScript types were adjusted accordingly, and CI/test tooling was modernized.
Breakingv2.2.0
3/31/2019v2.2.0 focuses on changing how p-try is exported for TypeScript consumers, aiming for CommonJS compatibility. The actual diff also introduces a small runtime export addition to support default-style imports, plus changes to the package's type test tooling.
v2.1.0
3/18/2019Version 2.1.0 adds TypeScript definitions to improve type support for the package. No other user-facing changes, fixes, or upgrades are described in the release notes.
Features