Skip to content

fix(web): declare a Node floor the lint toolchain can actually run on - #1913

Closed
ChiragAgg5k wants to merge 1 commit into
mainfrom
fix/web-template-node-engines
Closed

ChiragAgg5k wants to merge 1 commit into
mainfrom
fix/web-template-node-engines

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

The Web and React Native templates declare "node": ">=18.0.0" in engines while their devDependencies pull @eslint/js 10.0.1 and eslint 10.10.0, both of which declare "node": "^20.19.0 || ^22.13.0 || >=24". Every SDK generated from those templates inherits the contradiction.

What it costs a contributor working on a generated SDK repo at the advertised Node version: engine warnings on install, a hard failure under engine-strict, and no way to run npm run lint or npm run lint:fix at all. Consumers are unaffected — npm does not apply devDependency engines to installers of a package — so this is a contributor-facing inconsistency rather than a runtime one.

The fix

engines.node becomes ^20.19.0 || ^22.13.0 || >=24 in both templates, matching what the lint toolchain accepts.

The other direction would be to hold eslint at a release that still supports Node 18. That trades a current toolchain for a promise nobody is keeping: Node 18 reached end of life in April 2025, and 20.19 is the lowest version eslint 10 will run on. This is the smallest range that makes the declaration true.

Only these two templates declare engines. The Node template pulls the same eslint 10 without one, so nothing there changes.

Verification

Generated the Console Web SDK against a patched generator and parsed the result: valid JSON, engines renders as {"node": "^20.19.0 || ^22.13.0 || >=24"}, and the rest of the package — including the impersonateuserid URL builders restored in #1912 — is byte-identical to a stock 5.0.2 generation.

Found by Greptile on appwrite/sdk-for-console#112, where the mismatch first shipped into a generated SDK. That PR is the 16.1.0 Console release; it is not blocked on this, so the corrected engines will land in whichever release follows.

The Web and React Native templates promise `"node": ">=18.0.0"` while pulling `@eslint/js` 10.0.1 and `eslint` 10.10.0, which declare `^20.19.0 || ^22.13.0 || >=24`. A contributor on the Node version the package advertises gets engine warnings, fails `npm ci` under `engine-strict`, and cannot run `npm run lint` at all.

The floor now matches what those dependencies accept. Narrowing it costs nothing real: Node 18 reached end of life in April 2025 and 20.19 is the lowest version eslint 10 runs on, so this is the smallest range that makes the declaration true. The alternative — holding lint tooling back to a release that still supports an EOL Node — trades a live toolchain for a promise nobody is keeping.

Only these two templates declare `engines`; the Node template pulls the same eslint 10 without one, so it is unaffected.
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR is not safe to merge until the Node requirement is separated from development-only lint constraints or the downstream runtime-support change is deliberately reconciled with the documented contract.

Fix All in Claude CodeFindings

  1. P1 Consumer Node Support Regresses
  2. P2 Generated Engine Metadata Conflicts
Fix with agent prompt
### Issue 1
templates/web/package.json.twig:37
These templates produce published SDK packages, so `engines.node` constrains downstream consumers as well as contributors. A consumer using the still-documented Node 18 runtime with `engine-strict` will now have installation rejected, even though the incompatible ESLint packages are development-only and absent from consumer installs. The same change appears in `templates/react-native/package.json.twig:37`, where Node 18 is also still documented as supported.

### Issue 2
templates/web/package.json.twig:37
The matching Web package-lock template still records the root package engine as `>=18.0.0`, while this generated package manifest now requires `^20.19.0 || ^22.13.0 || >=24`. The React Native templates have the same mismatch. Newly generated repositories will therefore contain contradictory Node requirements, and routine lockfile regeneration may produce unexplained repository changes.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR raises the generated Web and React Native SDK packages’ declared Node requirement to match ESLint 10.

  • The selected range is compatible with the pinned lint toolchain.
  • Because these are published package manifests, the change also rejects downstream Node 18 consumers despite the repository continuing to document that runtime as supported.
  • The matching package-lock templates retain the previous engine declaration.

Reviews (1) · Last reviewed commit: "fix(web): declare a Node floor the lint ..."

},
"engines": {
"node": ">=18.0.0"
"node": "^20.19.0 || ^22.13.0 || >=24"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Consumer Node Support Regresses

These templates produce published SDK packages, so engines.node constrains downstream consumers as well as contributors. A consumer using the still-documented Node 18 runtime with engine-strict will now have installation rejected, even though the incompatible ESLint packages are development-only and absent from consumer installs. The same change appears in templates/react-native/package.json.twig:37, where Node 18 is also still documented as supported.

Prompt To Fix With AI
This is a comment left during a code review.
Path: templates/web/package.json.twig
Line: 37

Comment:
**Consumer Node Support Regresses**

These templates produce published SDK packages, so `engines.node` constrains downstream consumers as well as contributors. A consumer using the still-documented Node 18 runtime with `engine-strict` will now have installation rejected, even though the incompatible ESLint packages are development-only and absent from consumer installs. The same change appears in `templates/react-native/package.json.twig:37`, where Node 18 is also still documented as supported.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

},
"engines": {
"node": ">=18.0.0"
"node": "^20.19.0 || ^22.13.0 || >=24"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Generated Engine Metadata Conflicts

The matching Web package-lock template still records the root package engine as >=18.0.0, while this generated package manifest now requires ^20.19.0 || ^22.13.0 || >=24. The React Native templates have the same mismatch. Newly generated repositories will therefore contain contradictory Node requirements, and routine lockfile regeneration may produce unexplained repository changes.

Prompt To Fix With AI
This is a comment left during a code review.
Path: templates/web/package.json.twig
Line: 37

Comment:
**Generated Engine Metadata Conflicts**

The matching Web package-lock template still records the root package engine as `>=18.0.0`, while this generated package manifest now requires `^20.19.0 || ^22.13.0 || >=24`. The React Native templates have the same mismatch. Newly generated repositories will therefore contain contradictory Node requirements, and routine lockfile regeneration may produce unexplained repository changes.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

@ChiragAgg5k

Copy link
Copy Markdown
Member Author

Closing this — not worth the trade.

The mismatch is real but contributor-facing only: npm does not apply devDependency engines to anyone installing a generated SDK, so nothing reaches consumers. Raising engines.node to satisfy the lint toolchain, on the other hand, narrows the support the published packages advertise, which is a bigger change than the problem justifies and reads as a regression rather than a fix.

If this is picked up again, the version that does not touch the consumer contract is holding the lint dependencies at a release that still runs on the advertised floor, rather than moving the floor to match the tooling.

@ChiragAgg5k
ChiragAgg5k deleted the fix/web-template-node-engines branch September 17, 2026 15:45
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.

1 participant