Skip to content

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

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

Shinrai merged 2 commits 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

📦 Dependencies

No dependency updates

🔧 Other Changes

👥 Contributors

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

Constraints found:
- dependencies / peerDependencies: none.
- Shipped code (src/, dist/): no node: built-ins and no Node-version-specific
  APIs; syntax is ES2020-level (optional chaining, ??, BigInt, dynamic
  import()), which Node.js 18 runs. The ESM build was smoke-tested on
  Node.js 18.0.0 (parse, a year subpath).
- Last release before 2026-10-31 (v1.1.5) declared >=18.0.0.

Result: engines.node >=18.0.0.

require() still goes through require(esm), so the CJS entry and the
year-module wrappers now say it needs Node.js ^20.19.0 or >=22.13.0.
tsup targets ["es2022", "node18"]: es2022 keeps the browser syntax level,
node18 matches the runtime floor.

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/run. CI min_node_version stays at 22.22.0 with a comment saying
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 ba8cdc1 into next Nov 2, 2026
28 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/runtime-engines-floor branch November 2, 2026 01:39
cldmv-bot Bot added a commit that referenced this pull request Nov 2, 2026
# `@cldmv/jsonv` v1.2.1 Changelog

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

---

## Overview

jsonv goes back to `engines.node` `>=18.0.0`. v1.2.0 raised it to `>=22.22.0`, the version the development toolchain needs, but jsonv has no dependencies and nothing in the package needs more than Node.js 18 for `import`. The toolchain floor moves to npm's `devEngines`, where it only applies to working on this repository.

The parser and every public specifier are unchanged from v1.2.0.

---

## 📦 Requirements

### `engines.node` is `>=18.0.0` again ([#118](#118))

`engines.node` drops from `>=22.22.0` to `>=18.0.0`, the range v1.1.5 and earlier declared. `import` works from Node.js 18.0.0, and jsonv still runs in browsers. `require()` loads the ESM build through Node's `require(esm)`, so it needs Node.js `^20.19.0` or `>=22.13.0`; the `ERR_REQUIRE_ESM` message that every CommonJS wrapper throws on a Node.js without `require(esm)` now names that range instead of `>=22.22.0`.

Developing the package still needs Node.js 22.22.0 or later. That floor is now declared in `devEngines` (`runtime` `node` `>=22.22.0`, `onFail: "error"`), so npm enforces it in a checkout of this repository and never for consumers installing the package.

---

## 🔧 CI & tooling

- tsup's target is now `["es2022", "node18"]` instead of `es2022`, so the build emits only syntax that both browsers at the ES2022 level and Node.js 18 support ([#118](#118)).
- The CI and publish matrices still start at Node.js 22.22.0; the `min_node_version` descriptions now say it is the dev toolchain floor and should match `devEngines`, not `engines` ([#118](#118)).

## 🧪 Tests

- `tests/cjs/entry.test.cjs` checks for the new `^20.19.0 or >=22.13.0` guard message ([#118](#118)).

## 📚 Documentation

- The README requirements and `docs/versioning-and-exports.md` list Node.js 18.0.0 for `import`, `^20.19.0` or `>=22.13.0` for `require()`, and the 22.22.0 `devEngines` floor for development ([#118](#118)).
- The v1.2.0 notes no longer call its Node.js floor "a real requirement change" ([#117](#117)).
- **NEW:** [docs/changelog/v1/v1.2.1.md](./v1.2.1.md) — this changelog.

## 🔧 Dependencies

_No dependency updates._

---

## Upgrade notes

- No breaking changes — drop-in for v1.2.0.
- Node.js 18 and 20 can install the package again without an `EBADENGINE` warning. On those versions, load it with `import`, or with `require()` on Node.js 20.19.0 or later.



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

- @Shinrai

</details>

---

<!-- coverage-start -->

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

| Metric | Coverage |
|--------|----------|
| Statements | 98.7% |
| Branches   | 97.3% |
| Functions  | 100.0% |
| Lines      | 98.8% |

*Avg: **98.7%** · `b054636` · 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