Skip to content

v7.0.0

Choose a tag to compare

@github-actions github-actions released this 05 Sep 20:21
· 28 commits to master since this release
fe6452e

Changes

  • break(package): 馃挜 Publish runtime-neutral ESM and CommonJS entry points

Release details

Pull request notes

Summary

Publish ESM and CommonJS entry points backed by one CommonJS runtime implementation, with format-appropriate TypeScript declarations. The ESM wrapper re-exports the same classes and the same type definitions, preserving equality and global configuration in mixed module graphs. import resolves to dist/index.mjs / dist/index.d.mts, while require resolves to dist/index.cjs / dist/index.d.cts.

  • Remove the package-level Node.js engines restriction. Generated code targets ES2022; identifier generation uses the installed platform-specific uuid dependency from #61.
  • Separate production and test TypeScript configuration so production does not inherit Node/Jest ambient types.
  • Remove the unused direct tslib dependency and importHelpers. Generated JavaScript and declarations contain no tslib references; it remains in the lockfile for development dependencies that require it.
  • Retain buffer, which is used by IDs, hashes, and the public Media API. Replacing it requires a separate API migration.
  • Add distribution contract tests, ESM/CommonJS smoke checks, Publint and Are the Types Wrong validation, and update package documentation.

One commit based on current master after #53, #56, and #57. Replaces #58 using the repository-required break/* release branch convention. Includes the already merged #61 for Node/browser identifier generation. No production Value Object changes or GitHub workflow changes.

Review fixes from #58

  • Both module conditions share runtime class identity and NullObject configuration. Distribution checks cover export identity, bidirectional equality, collection deduplication, and configuring null construction through either entry.
  • tests/tsconfig.json extends ../tsconfig.test.json; the nested project type-checks successfully.

Compatibility / major release

CommonJS remains supported through the package root. The distribution layout changes, so this uses a break/* branch for a major release. Browser consumers need a bundler that supports CommonJS and the buffer package. Consumers importing the old internal dist/index.js path must migrate to the package root. Removing engines does not imply support for runtimes without the required JavaScript/Web APIs.

Validation

  • Frozen-lockfile dependency installation passed.
  • 567 tests passed.
  • ESLint passed.
  • Production TypeScript checking, nested test-project checking, and the shared-runtime distribution build passed.
  • Both published entry points loaded successfully with identical exports and shared state; exported JavaScript/declaration paths exist.
  • Are the Types Wrong reported no problems; Publint passed with informational suggestions about type and engines.node.
  • Documentation build passed.
  • Confirmed generated JavaScript and declaration files do not reference tslib.