Skip to content

Chore: declare the Node floor the API actually needs - #4

Merged
SandObserver merged 1 commit into
mainfrom
chore/node-engine-floor
Aug 9, 2026
Merged

SandObserver merged 1 commit into
mainfrom
chore/node-engine-floor

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Raise engines.node in api/package.json from >=20 to >=20.19. api/src/routes/config.js requires ui/js/link-url.js, which is an ES module, and require(esm) was behind --experimental-require-module on Node 20.x until 20.19.0; below it the require throws and routes.js fails to load the route at startup.
  • Add two tests to api/test/link-url.test.js: one asserting the declared floor is at or above 20.19, one asserting a src module still requires across the CommonJS/ESM boundary, so the floor can be revisited if that ever stops being true.

Testing
All green. Added 2 tests; verified by mutation that reverting the floor to >=20 fails the first one.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

routes/config.js requires ui/js/link-url.js, an ES module, and that route is
loaded at startup. require() of an ES module was behind a flag on Node 20.x
until 20.19.0, so the declared floor of >=20 named versions where the API does
not start at all.

Raise it to >=20.19 and pin it: one test fails if the floor drops below the
release where require(esm) stopped needing a flag, another fails if the
cross-boundary require goes away and the floor can be revisited.
@SandObserver SandObserver added the bug Something isn't working label Aug 9, 2026
@SandObserver
SandObserver merged commit de3b2bb into main Aug 9, 2026
4 checks passed
@SandObserver
SandObserver deleted the chore/node-engine-floor branch August 9, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant