Back to Explore

nihalgonsalves/pg-error-enum

GitHub
1 watchersOpen source

Last release:

pg-error-enum is a TypeScript (and plain JavaScript compatible) Enum that defines Postgres error codes for use in application logic. It provides a typed way to check specific Postgres errors, such as matching error.code against constants like UNIQUE_VIOLATION, with no runtime dependencies.

Project status

  • The repo shows ongoing activity, with an upstream push on 2026-08-02, but the most recent versioned updates in the provided history are from 2025-10-20 (v2.0.1).
  • Apparent update cadence is uneven: v1.0.2 in 2025-03, then two updates clustered in mid/late 2025-10 (v2.0.0 on 2025-10-15, v2.0.1 on 2025-10-20), followed by about 10 months with no further documented versioned updates up to today (2026-08-12).

AI summary generated

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

Recent updates

  • pg-error-enum-v2.0.1

    Release v2.0.1 is a small maintenance update that updates the package metadata and Node.js engine compatibility. The only functional change in the diff is loosening the Node.js version constraint to allow versions greater than 24.

  • pg-error-enum-v2.0.0

    Version 2.0.0 focuses on CI/runtime environment updates, moving tests to Node 24 and adjusting the package's supported Node engine range. The release notes also mention an engine range tweak as a bug fix, but the actual diff includes additional build tool and publishing pipeline changes.

    Breaking
  • pg-error-enum-v1.0.2

    Version 1.0.2 is primarily a packaging and publish-time fix. The only code-related change in the provided diff is reintroducing an npm prepublish build step, alongside routine version and changelog/manifest updates.

    Breaking
  • pg-error-enum-v1.0.1

    Release v1.0.1 primarily updates package metadata and build/publish behavior. The only functional change visible in the diff is the removal of the npm prepublishOnly script, along with version/changelog/manfiest bumps.

    Breaking
  • pg-error-enum-v1.0.0

    Version 1.0.0 switches pg-error-enum to an ESM-first package and updates the supported Node runtime versions. The release notes call out dropping Node 18 and enabling ESM usage, with related build system changes.

    Breaking
  • pg-error-enum-v0.7.3

    Version 0.7.3 adds a single new Postgres error enum member, INVALID_ARGUMENT_FOR_XQUERY (SQLSTATE 10608). The release notes only mention this functional change. The code diff also includes several significant development tooling and configuration updates (ESLint, Prettier/format config removal, KNIP, tsconfig changes, and a large dependency lockfile refresh) that are not mentioned in the release notes.

    Features
  • pg-error-enum-v0.7.2

    v0.7.2 adds a new Postgres error enum constant, FILE_NAME_TOO_LONG (58P03), to the exported PostgresError enum. The release notes only mention this feature, but the diff also includes significant internal tooling and dependency updates (TypeScript, eslint tooling, yarn/lockfile).

    Features
  • pg-error-enum-v0.7.1

    v0.7.1 regenerates the Postgres error enum to sync with the latest upstream Postgres error codes, and includes formatting updates related to prettier. The published changes appear mostly to affect repository/tooling setup and the generated enum source formatting.

    Features
  • v0.7.0

    v0.7.0 primarily changes the `PostgresError` enum by removing the `SNAPSHOT_TOO_OLD` constant. The rest of the diff focuses on repository and tooling updates (linting/formatting automation) plus devDependency upgrades.

    Breaking
  • v0.6.1

    Release v0.6.1 primarily updates the publishing pipeline to include npm provenance. The code changes are mostly in developer tooling and CI configuration, with a notable change in the sync script that affects how Postgres error codes are fetched during maintenance.

    Features