Repository navigation
Chore: declare the Node floor the API actually needs - #4
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
engines.nodeinapi/package.jsonfrom>=20to>=20.19.api/src/routes/config.jsrequiresui/js/link-url.js, which is an ES module, andrequire(esm)was behind--experimental-require-moduleon Node 20.x until 20.19.0; below it the require throws androutes.jsfails to load the route at startup.api/test/link-url.test.js: one asserting the declared floor is at or above 20.19, one asserting asrcmodule 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
>=20fails the first one.Checklist