Skip to content

v2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Jul 10:05
· 1 commit to main since this release

2.0.0 (2026-07-20)

BREAKING CHANGES

    • ESM-only. CJS/UMD entry points removed; require("common-stuff") no longer works.
      httpErrorHandler removed — inline the middleware (it was a thin instanceof HttpError wrapper).
  • HttpStatusCodes / HttpStatusReasons are const objects, not enums (required by erasableSyntaxOnly). Value reads are unchanged; the type HttpStatusCodes is gone — use (typeof HttpStatusCodes)[keyof typeof HttpStatusCodes] if needed.
  • Array-only flatMap removed. The universal flatMap (iterable module) requires callbacks to return an iterable and only passes (item, index).
  • parseSize returns number | undefined instead of -1.
  • merge<A, B>(target, source): A & B — return type is inferred. Explicit merge(a, b) calls need to pass both generics or cast.
  • hashCode integers changed (prefixed with typeof to avoid falsy collisions). Invalidate any persisted hashes.
  • difference / intersection / union / shuffle now correctly return T[] for mutable inputs (v1 always returned ReadonlyArray due to overload order).
  • isArray narrows readonly inputs to ReadonlyArray (v1 narrowed them to mutable Array); runtime switched to * * Array.isArray (fixes cross-realm).
  • getByKey infers the return type from literal paths. Pass T explicitly for dynamic paths.