Skip to content

fix(ruby,node,python): declare supported runtimes in package metadata - #2084

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/package-metadata
Oct 17, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/package-metadata

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Declares the runtimes the generated Ruby, Node and Python packages actually support.

  • Ruby: the gemspec had no required_ruby_version. The code targets Ruby 2.7 (TargetRubyVersion: 2.7 in the RuboCop config) and the e2e matrix starts at ruby:2.7-alpine, so the gemspec now declares >= 2.7.
  • Node: package.json had no engines. The SDK depends on undici ^6.27.0, whose own engines is node >= 18.17, so older Node installed the SDK and then failed at load. package.json and the lock template now declare "node": ">=18.17". Only the root engines entry was added to the lock template; the update script's unrelated transitive bumps were left out.
  • Python: the setup.py and pyproject.toml classifiers stopped at 3.12 while the e2e matrix also runs Python 3.13. 3.13 is now listed. There is no 3.14 e2e job, so 3.14 is not claimed.

React Native's expo-file-system: 18.*.* pin is deliberately left alone. 18.x (Expo SDK 52/53) has no expo-file-system/legacy export, and from 19.x (SDK 54) on the top-level readAsStringAsync/writeAsStringAsync throw at runtime and only expo-file-system/legacy works. No single import covers both, so widening the range needs the #1691 import change plus a decision to drop SDK 52/53.

Test Plan

  • New testPackageMetadataIsDeclared table in tests/generation/GenerationTest.php asserts the Ruby floor, the Node engines in package.json and package-lock.json, and the Python 3.9 to 3.13 classifiers in both setup.py and pyproject.toml. It fails on main (3 failures) and passes here.
  • vendor/bin/phpunit --testsuite Generation: 113 tests pass.
  • Regenerated Ruby, Python and Node server SDKs: RuboCop 1.90.0, Black 25.11.0, and Node format:check, lint, analyse all clean.
  • composer lint-twig, composer refactor:check, composer lint, max-line-length check: clean.

Related PRs and Issues

Closes #2088

…pport

The gemspec named no Ruby floor although the code targets 2.7 and the e2e matrix starts there. The Node package.json had no engines field although undici 6 requires Node 18.17, so older runtimes installed it and failed at load. The Python classifiers stopped at 3.12 while the e2e matrix also runs 3.13.
@hansi-codes

hansi-codes Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

This change declares Ruby, Node, and Python runtime metadata in the generated package manifests. It also adds generation tests that check the declared runtime floors and interpreter classifiers.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 6
File Change
templates/node/package-lock.json.twig Adds the Node runtime engine to the generated lockfile metadata.
templates/node/package.json.twig Declares the minimum supported Node.js version.
templates/python/pyproject.toml.twig Adds Python 3.13 to the package classifiers.
templates/python/setup.py.twig Adds Python 3.13 to the setup.py classifiers.
templates/ruby/gemspec.twig Declares Ruby 2.7 as the minimum supported version.
tests/generation/GenerationTest.php Adds table-driven checks for generated package runtime metadata.
🔇 Filtered out · 1

Findings Hansi considered but did not post.

Finding Why
Generate the lock template through the updater Verifier: The diff does not establish that the template was edited by hand rather than generated by the updater. The added root engines metadata exactly matches templates/node/package.json.twig lines 18–20 and is metadata npm would include when scripts/update-lockfiles.sh generates the lockfile. Existing Twig expressions are preserved. Rule 6 governs the update workflow; there is no observable code violation or manifest/lockfile drift here.

Reviewed ae6ae92 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k ChiragAgg5k self-assigned this Oct 17, 2026
@ChiragAgg5k
ChiragAgg5k merged commit f4dd261 into main Oct 17, 2026
61 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/package-metadata branch October 17, 2026 10:03
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.

Declare supported runtimes in the Ruby, Node and Python package metadata

1 participant