Skip to content

Add engines.node field to package.json - #432

Merged
Osuochasam merged 2 commits into
Open-audit-foundation:mainfrom
angelraph:add-engines-node-field
Aug 30, 2026
Merged

Add engines.node field to package.json#432
Osuochasam merged 2 commits into
Open-audit-foundation:mainfrom
angelraph:add-engines-node-field

Conversation

@angelraph

Copy link
Copy Markdown
Contributor

Closes #425

Problem

package.json had no engines field, so nothing warns (or blocks) a contributor running the project on an incompatible Node version.

What I checked

The Node version is already implicit in three places, all consistent with each other:

  • .github/workflows/validate-docs.ymlnode-version: 20
  • Dockerfile.web / Dockerfile.worker → both FROM node:20-alpine
  • next@16.2.10 (a direct dependency) declares its own engines.node: ">=20.9.0" in the published package

Change

  • Added "engines": { "node": ">=20.9.0" } to package.json — matches CI/Docker and the floor Next itself already requires. Not a new requirement, just an explicit one.
  • Corrected README.md and CONTRIBUTING.md, which both said Node.js >= 18. That was already inaccurate (Next 16 needs 20.9+) and would now directly contradict the new engines field.
  • package-lock.json was regenerated by npm install. It was missing a few devDependencies entries (@eslint/eslintrc, @types/react-syntax-highlighter, etc.) — out of sync with package.json. Worth flagging: both Dockerfiles run npm ci, which fails hard on a lockfile/package.json mismatch, so this was a latent build risk independent of this issue.

Verification

Ran npm install on Node v24.18.0 (satisfies >=20.9.0): completed with no EBADENGINE/engines warning.

package.json had no engines field, so nothing warned or blocked a
contributor running the project on an incompatible Node version.

The version was already implicit elsewhere:
- .github/workflows/validate-docs.yml pins node-version: 20
- Dockerfile.web / Dockerfile.worker both build from node:20-alpine
- next@16.2.10 (a direct dependency) itself declares engines.node
  ">=20.9.0"

Set engines.node to ">=20.9.0" to match all three, making the
existing requirement explicit instead of introducing a new one.

Also corrected README.md and CONTRIBUTING.md, which both still said
"Node.js >= 18" - already inaccurate given Next 16's own floor, and
now directly contradicted by the new engines field.

package-lock.json was regenerated by `npm install` to resync with
package.json (it was missing a few devDependencies entries, e.g.
@eslint/eslintrc and @types/react-syntax-highlighter). This was
already a latent problem: both Dockerfiles run `npm ci`, which fails
outright on a package.json/package-lock.json mismatch.

Closes Open-audit-foundation#425
@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam this PR is ready for review — closes #425 (add engines.node field).

One heads up: the Validate docs/reality drift check is stuck at action_required since I'm an outside contributor — it needs a maintainer to approve the workflow run before it can execute. Would appreciate an approve + review when you have a moment.

@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam friendly follow-up on this one — would appreciate a review when you get a chance. Happy to make any adjustments needed.

@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam checking in again — this is still awaiting the workflow-run approval and a review. Let me know if anything needs changing.

@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam bumping this once more — still sitting unreviewed with the workflow run unapproved. Whenever you have a moment.

@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam bumping this too — still awaiting the workflow-run approval and a review. Happy to adjust anything.

@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam same here — this one's also been waiting a while, including on the workflow-run approval needed to run CI. Would appreciate a review soon.

@angelraph

Copy link
Copy Markdown
Contributor Author

@Osuochasam kindly check and review its long overdue already #432

@Osuochasam
Osuochasam merged commit f3f252b into Open-audit-foundation:main Aug 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an engines field to package.json

2 participants