chore(js): bump deps and drop support for node 16,18#677
chore(js): bump deps and drop support for node 16,18#677
Conversation
WalkthroughThree configuration and template files are modified: the package version is bumped to 0.9.2, a Node.js runtime versions section is added to the installation documentation template, and multiple JavaScript package dependencies and the minimum Node.js engine version are updated in the package template. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@config/clients/js/template/README_installation.mustache`:
- Around line 11-15: The README_installation.mustache references
./SUPPORTED_RUNTIMES.md which doesn't exist; either add a SUPPORTED_RUNTIMES.md
template (containing supported Node.js versions and policy) into the template
set (e.g., create the file under config/clients/js/template/ or the shared
templates folder config/common/files/) and ensure it is included in generated
packages, or remove/replace the link in README_installation.mustache with a
valid existing reference (or inline the supported runtimes text) so the README
no longer points to a missing file.
🧹 Nitpick comments (2)
config/clients/js/template/package.mustache (2)
24-24:josepinned to exact5.10.0— intentional?Previously
^5.10.0(with caret), now pinned to exact5.10.0. This prevents receiving patch-level security fixes automatically. If this is intentional (e.g., to avoid a known regression), a comment explaining the pin would help future maintainers.
28-28: Inconsistent version pinning strategy across dependencies.Some packages are pinned exact (
@types/jest:30.0.0,eslint:9.39.2,jest:30.2.0,ts-jest:29.4.6) while others use caret ranges. If exact pinning is intentional for these, consider documenting the rationale. Otherwise, consider using consistent caret ranges for devDependencies to receive compatible updates.Also applies to: 33-33, 35-35, 37-37
| ``` | ||
|
|
||
| #### Supported Node.js Versions | ||
|
|
||
| For details on the supported Node.js versions and our support policy, see [SUPPORTED_RUNTIMES.md](./SUPPORTED_RUNTIMES.md). |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for SUPPORTED_RUNTIMES template or reference in the JS client config
rg -rn "SUPPORTED_RUNTIMES" config/clients/js/
# Also check if there's a shared template
rg -rn "SUPPORTED_RUNTIMES" config/Repository: openfga/sdk-generator
Length of output: 356
🏁 Script executed:
#!/bin/bash
# Read the README_installation.mustache file to see the actual content
cat -n config/clients/js/template/README_installation.mustache | head -20Repository: openfga/sdk-generator
Length of output: 478
🏁 Script executed:
#!/bin/bash
# Search for SUPPORTED_RUNTIMES.md files in the repository
find . -name "*SUPPORTED_RUNTIMES*" -type f
# Also check if there's a template that generates it
find config/ -name "*.mustache" -type f | xargs grep -l "SUPPORTED_RUNTIMES" 2>/dev/null || echo "No other templates reference SUPPORTED_RUNTIMES"Repository: openfga/sdk-generator
Length of output: 120
🏁 Script executed:
#!/bin/bash
# Check if there's a generator config or manifest that lists files to be generated
find config/clients/js/ -type f | head -30
# Look for any configuration that might generate SUPPORTED_RUNTIMES.md
rg -l "SUPPORTED_RUNTIMES" config/Repository: openfga/sdk-generator
Length of output: 1403
🏁 Script executed:
#!/bin/bash
# Check the config files to see if SUPPORTED_RUNTIMES.md is listed as a generated file
cat config/clients/js/config.overrides.json | head -100Repository: openfga/sdk-generator
Length of output: 1141
🏁 Script executed:
#!/bin/bash
# Get the full config.overrides.json file
cat config/clients/js/config.overrides.json | jq '.files | keys' 2>/dev/null || rg "destinationFilename" config/clients/js/config.overrides.jsonRepository: openfga/sdk-generator
Length of output: 134
🏁 Script executed:
#!/bin/bash
# Check template-source.json to see how README files are configured
cat config/clients/js/template-source.jsonRepository: openfga/sdk-generator
Length of output: 457
🏁 Script executed:
#!/bin/bash
# Search the entire repository for SUPPORTED_RUNTIMES (including documentation and non-config files)
find . -type f \( -name "*.md" -o -name "*.mustache" -o -name "*.json" \) -exec grep -l "SUPPORTED_RUNTIMES" {} \;
# Also check if there are any README template files in parent generator
find . -type f -name "*SUPPORTED*"Repository: openfga/sdk-generator
Length of output: 179
🏁 Script executed:
#!/bin/bash
# Check if SUPPORTED_RUNTIMES.md exists in the repository root or docs directory
find . -name "SUPPORTED_RUNTIMES.md" -o -name "*SUPPORTED*RUNTIME*"
# Check the root directory for any README or documentation files
ls -la | grep -i readme
# Check if there's a docs directory
find . -maxdepth 3 -type d -name "docs" -o -type d -name "doc"Repository: openfga/sdk-generator
Length of output: 131
🏁 Script executed:
#!/bin/bash
# Check if there's a generation script or configuration that creates SUPPORTED_RUNTIMES.md
find . -type f \( -name "*.sh" -o -name "Makefile" -o -name "*.yaml" -o -name "*.yml" \) -exec grep -l "SUPPORTED_RUNTIMES" {} \;
# Check the docs directory to see what's there
ls -la docs/ 2>/dev/null || echo "docs directory not accessible"
# Search for any reference to runtime support or similar documentation
rg "Node.js" config/clients/js/ -A 2 -B 2Repository: openfga/sdk-generator
Length of output: 1272
🏁 Script executed:
#!/bin/bash
# Check if SUPPORTED_RUNTIMES.md should be a static file copied from elsewhere
find . -type f -name "*.md" | xargs grep -l "Node.js" | head -10
# Check the actual JS SDK repository or similar projects to see if they have SUPPORTED_RUNTIMES.md
rg "SUPPORTED_RUNTIMES" . --type md
# Check if there's a template or static file directory
ls -la config/clients/js/ | grep -v templateRepository: openfga/sdk-generator
Length of output: 356
🏁 Script executed:
#!/bin/bash
# Check the .openapi-generator-ignore to see if SUPPORTED_RUNTIMES.md is being ignored
cat config/clients/js/.openapi-generator-ignore
# Look for any static files or additional files that might be copied
find config/clients/js/ -type f ! -path "*/template/*" -name "*.md"Repository: openfga/sdk-generator
Length of output: 110
🏁 Script executed:
#!/bin/bash
# Check for generation scripts or workflows
find . -type f \( -name "*.sh" -o -name "*.ts" -o -name "*.js" \) -path "*/scripts/*" -o -path "*/.github/workflows/*"
# Look for any mention of file generation or copying
rg "SUPPORTED_RUNTIMES\|copy.*file\|static.*file" . --type json --type yaml --type yml
# Check if there's a static files directory
find config/ -type d -name "static" -o -type d -name "assets"Repository: openfga/sdk-generator
Length of output: 219
🏁 Script executed:
#!/bin/bash
# Check the common files/assets directory for SUPPORTED_RUNTIMES.md or similar
find config/common/files/ -type f | head -20
ls -la config/common/files/assets/Repository: openfga/sdk-generator
Length of output: 1038
🏁 Script executed:
#!/bin/bash
# Check if there's a SUPPORTED_RUNTIMES.md template anywhere
find config/ -name "*SUPPORTED_RUNTIMES*"
# Look at the build script to understand how files are generated
cat scripts/build_client.sh | head -50Repository: openfga/sdk-generator
Length of output: 1927
🏁 Script executed:
#!/bin/bash
# Check if SUPPORTED_RUNTIMES.md is supposed to be a static file in the repository
find . -type f -name "*.md" | xargs grep -l "supported.*runtime\|support.*policy" -i
# Check the OpenAPI Generator default templates to see if they generate such a file
rg "SUPPORTED_RUNTIMES" . --type allRepository: openfga/sdk-generator
Length of output: 303
Remove or provide the SUPPORTED_RUNTIMES.md file.
The link to ./SUPPORTED_RUNTIMES.md on line 15 references a file that does not exist in the repository and is not generated by the build process. Either create the SUPPORTED_RUNTIMES.md template in config/clients/js/template/ or config/common/files/, or remove this link and replace it with a valid reference.
🤖 Prompt for AI Agents
In `@config/clients/js/template/README_installation.mustache` around lines 11 -
15, The README_installation.mustache references ./SUPPORTED_RUNTIMES.md which
doesn't exist; either add a SUPPORTED_RUNTIMES.md template (containing supported
Node.js versions and policy) into the template set (e.g., create the file under
config/clients/js/template/ or the shared templates folder config/common/files/)
and ensure it is included in generated packages, or remove/replace the link in
README_installation.mustache with a valid existing reference (or inline the
supported runtimes text) so the README no longer points to a missing file.
There was a problem hiding this comment.
Pull request overview
Updates the JavaScript SDK generator templates to refresh dependency versions and raise the minimum supported Node.js version for generated packages.
Changes:
- Bumps runtime/dev dependency versions in the JS
package.jsontemplate (including Jest/ESLint updates). - Updates generated package metadata (repository URL format, Node engine requirement).
- Extends the generated README installation section with a link to Node.js runtime support info.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| config/clients/js/template/package.mustache | Updates dependency versions, repository URL scheme, and engines.node minimum. |
| config/clients/js/template/README_installation.mustache | Adds a “Supported Node.js Versions” section linking to runtime support documentation. |
| config/clients/js/config.overrides.json | Bumps the JS SDK package version. |
| "axios": "^1.12.2", | ||
| "jose": "^5.10.0", | ||
| "axios": "^1.13.5", | ||
| "jose": "5.10.0", |
There was a problem hiding this comment.
jose was changed from a semver range to an exact version. Pinning an exact dependency version can prevent consumers from receiving compatible patch/minor updates (including security fixes). Consider reverting to a caret range (or document why this must be pinned).
| "jose": "5.10.0", | |
| "jose": "^5.10.0", |
| "globals": "^17.3.0", | ||
| "jest": "30.2.0", | ||
| "nock": "^14.0.11", | ||
| "ts-jest": "29.4.6", |
There was a problem hiding this comment.
jest is bumped to v30 but ts-jest remains on the v29 major line. These typically have peer dependency/compatibility coupling, and this mismatch is likely to break npm test in generated SDKs. Align ts-jest's major version with jest (or keep jest on v29).
| "ts-jest": "29.4.6", | |
| "ts-jest": "30.0.0", |
| "engines": { | ||
| "node": ">=16.15.0" | ||
| "node": ">=20.19.0" | ||
| }, |
There was a problem hiding this comment.
The PR title says support is being dropped for Node 16 and 18, but the generated engines.node is set to >=20.19.0, which additionally excludes earlier Node 20.x releases. If the intent is simply “Node 20+”, consider loosening this to >=20 (or update the PR description/title and docs to explain the stricter minimum).
| @@ -20,21 +20,22 @@ | |||
| }, | |||
| "dependencies": { | |||
| "@opentelemetry/api": "^1.9.0", | |||
There was a problem hiding this comment.
How come we're still maintaining the package.json file in this repo? Is it just because of the version?
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit
Chores
Documentation
Dependencies