Skip to content

fix: set engines to the Node.js version the package needs at runtime - #85

Merged
Shinrai merged 1 commit into
nextfrom
fix/runtime-engines-floor
Nov 2, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/runtime-engines-floor

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • fix: set engines to the Node.js version the package needs at runtime (92f5bdb)

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

engines.node now states what consumers need, not the dev toolchain floor.

Constraints found:
- Runtime dependencies: none.
- Shipped dist/: class static blocks (esbuild keepNames output, Node 16.11),
  package self-reference through the exports map for ./rng, ./bytes and
  ./hash (Node 12.16), BigInt literals and Buffer.writeBigUInt64BE (Node 12).
  The issuer JSON is inlined by the bundle, so import attributes in src/ never
  reach consumers.
- Last release before the toolchain change (v1.2.6): >=16.12.0.
- require() of the CJS entry needs require(esm): ^20.19.0 || >=22.13.0; the
  guard message says so.

Result: engines.node >=16.12.0 (checked: import, the subpaths and v4/TA/TB
generation run on Node 16.12.0 and 18.0.0 from the packed tarball; require()
fails with the guard message there and works on 20.19.0). tsup target is now
node16.

The dev toolchain floor (vitest 5, tsup 9: Node.js 22.22.0) moved to
devEngines.runtime, which npm checks only for this project's own install, ci
and run. CI min_node_version stays at 22.22.0 with a note that it is the
toolchain floor.
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files type: dependencies Relates to dependency updates, version bumps, or package management type: documentation Relates to docs, README updates, guides, or inline code comments labels Nov 2, 2026
@Shinrai
Shinrai merged commit 561f36b into next Nov 2, 2026
31 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/runtime-engines-floor branch November 2, 2026 00:40
cldmv-bot Bot added a commit that referenced this pull request Nov 2, 2026
# `@cldmv/uuid` v1.3.1 Changelog

**Release Date**: November 2026
**Release Type**: Patch
**Branch**: `release/1.3.1`

---

## Overview

v1.3.1 sets `engines.node` back to the Node.js version the package needs at runtime, `>=16.12.0`, instead of the 22.22.0 development toolchain floor that v1.3.0 put there. The 22.22.0 floor moves to npm's `devEngines`, which only applies when you work on this repository.

The `UUID` API, the generated UUIDs and the import paths are the same as in v1.3.0. Installs on Node.js 16.12 through 22.21 no longer get an `EBADENGINE` warning.

---

## 🐛 Bug Fixes

### `engines.node` is the runtime floor again ([#85](#85))

v1.3.0 raised `engines.node` from `>=16.12.0` to `>=22.22.0` because the development toolchain (tsup 9 among others) doesn't run on earlier 22.x releases. The published package doesn't need any of that toolchain, so the floor was stricter than the code. `engines.node` is `>=16.12.0` again, and the bundles are built for `node16` (tsup `target`, was `node20`).

`import` works on Node.js 16.12.0 and later. `require("@cldmv/uuid")` loads the ES module build synchronously, which needs `require(esm)`: Node.js ^20.19.0 or >=22.13.0. On a Node.js without it, the CommonJS entry now says exactly that (`require() needs Node.js ^20.19.0 or >=22.13.0`, code `ERR_REQUIRE_ESM`) and points to `import()`; v1.3.0's message asked for 22.22.0.

## 📦 Requirements

- **Runtime:** Node.js 16.12.0 or later for `import` (`engines.node` is `>=16.12.0`, was `>=22.22.0`). `require()` needs Node.js ^20.19.0 or >=22.13.0; use `import()` on older versions. Browser bundles are unaffected.
- **Development:** working on this repository needs Node.js 22.22.0 or later, declared in `devEngines.runtime` with `onFail: "error"`. This doesn't affect anyone installing the package.

## 🔧 CI & tooling

- The CI and publish workflows keep `min_node_version` at 22.22.0; its description and a comment now say it's the dev toolchain floor and should match `devEngines`, not `engines` ([#85](#85), [#87](#87)).

## 📚 Documentation

- **NEW:** [docs/changelog/v1/v1.3.1.md](./v1.3.1.md): this changelog.
- README: the requirements list the `import` floor, the `require()` range and the development floor separately, and the CommonJS example names the `require()` range ([#85](#85)).
- The v1.3.0 changelog and README entry list its Node.js floor under Requirements instead of Breaking Changes ([#84](#84)).
- README What's New promoted to v1.3.1.

---

## Upgrade notes

- No breaking changes; drop-in for v1.3.0. Apart from the CommonJS entry's error message and the `node16` build target, no library code changed.
- If you stayed on v1.2.6 because of v1.3.0's 22.22.0 floor, v1.3.1 installs on Node.js 16.12 and later again. `@cldmv/uuid/main` is still a deprecated alias, as in v1.3.0.



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

---

<!-- coverage-start -->

![coverage](https://img.shields.io/badge/coverage-89.4%25-green?style=for-the-badge&logo=vitest&logoColor=white)

| Metric | Coverage |
|--------|----------|
| Statements | 88.3% |
| Branches   | 88.2% |
| Functions  | 93.1% |
| Lines      | 88.1% |

*Avg: **89.4%** · `b07ba33` · Node lts/**

<!-- coverage-end -->

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files type: dependencies Relates to dependency updates, version bumps, or package management type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant