Back to Explore

sindresorhus/aggregate-error

GitHub
1 watchersOpen source

Last release:

Provides an `AggregateError` helper that creates a single error from multiple errors, strings, or objects. Useful when you want to throw one error that still keeps a list of the individual errors in `error.errors` for later inspection.

Project status

  • The GitHub source has not had any reported updates since 2023-09-14, and given today is 2026-08-12 it appears quiet or in maintenance mode rather than actively maintained.
  • Update cadence is effectively stagnant, with the last change over two years ago (next most recent summary is from 2022-05-08, then 2021-04-17).

AI summary generated

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

Recent updates

  • v5.0.0

    This release primarily bumps the supported runtime to Node.js 18. The code changes are small and centered around stack cleaning and how the `errors` collection is returned, with additional changes in packaging metadata and dependency versions.

    Breaking
  • v4.0.1

    v4.0.1 is a small bugfix release that adjusts how AggregateError builds the combined message when one of the input errors has an empty or missing stack trace. It also adds a regression test covering the empty-stack case.

  • v4.0.0

    v4.0.0 modernizes aggregate-error to be pure ESM and introduces an explicit `.errors` property for accessing the underlying errors. The implementation also changes how errors are stored and exposed, removing older iteration behavior in the process.

    Breaking
  • v3.1.0

    Release v3.1.0 updates the TypeScript definitions for AggregateError to support custom Error subclasses. The runtime implementation appears unchanged in the provided diff, with modifications limited to type definitions and corresponding type tests.

    Features
  • v3.0.1

    v3.0.1 primarily updates the TypeScript type definition for AggregateError to improve compatibility with TypeScript 3.5. The code diff also includes dependency and tooling updates, plus minor repository/CI metadata changes.

  • v3.0.0

    v3.0.0 is primarily a compatibility release. It drops older Node.js versions and changes the package's TypeScript typings and module export shape to be CommonJS compatible.

    Breaking
  • v2.2.0

    v2.2.0 primarily introduces TypeScript support by adding a new `index.d.ts` type definition file. The release notes only mention the TypeScript definition, but the actual diff also includes a small runtime export interop change to support default imports.

    Features
  • v2.1.0

    v2.1.0 updates AggregateError to handle Error instances that do not have a standardized stack property. Instead of assuming every error has error.stack, it now conditionally cleans the stack when available and falls back to String(error) when it is missing.

  • v2.0.0

    v2.0.0 introduces two breaking behavior changes, including a raised Node.js runtime requirement and an API signature change related to accepted input types. It also adds support for plain objects, expanding the kinds of data the library can work with.

    BreakingFeatures