chore(deps): upgrade dependencies#248
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughPatch-level updates to devDependencies in package.json: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
✨ 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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
==========================================
- Coverage 88.86% 86.27% -2.59%
==========================================
Files 25 26 +1
Lines 1266 1268 +2
Branches 225 249 +24
==========================================
- Hits 1125 1094 -31
- Misses 96 100 +4
- Partials 45 74 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json(1 hunks)
🔇 Additional comments (2)
package.json (2)
32-32: Confirm Node types vs supported runtime (engines).You're bumping @types/node to v24.x while "engines.node" declares support starting at 16.15. Using Node 24 types can surface APIs not available on Node 16/18 and may leak into generated .d.ts, giving consumers a false sense of availability.
Please verify one of:
- The SDK’s minimum supported Node version is actually >= 20/22/24 and engines should be updated.
- Or keep @types/node aligned to the lowest supported Node LTS (e.g., 16 or 18) to ensure type-level compatibility for consumers.
32-35: LGTM on patch bumps.These are patch-level updates to devDependencies and should be low risk. Thanks for keeping them current.
b34c18c to
1e73666
Compare
There was a problem hiding this comment.
Pull request overview
Updates the repository’s Node/TypeScript tooling and test/lint setup to align with newer dependency versions, including dropping Node.js v16 support.
Changes:
- Upgrades runtime/dev dependencies (notably
axios,jose,jest,eslint) and raises the supported Node.js engine floor to>=18.18.0. - Updates Jest configuration and tests for Jest 30 compatibility.
- Introduces an ESLint v9 flat config and updates CI/metadata to reflect Node 16 deprecation.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Dependency upgrades and Node engine bump to >=18.18.0. |
package-lock.json |
Lockfile updates to match upgraded dependencies. |
.github/workflows/main.yaml |
Removes Node 16 from the CI matrix. |
CHANGELOG.md |
Notes dropping Node 16 support under Unreleased. |
tests/jest.config.js |
Adds transform configuration and exception to transform jose. |
tests/index.test.ts |
Replaces deprecated toThrowError() with toThrow(). |
tests/client.test.ts |
Replaces deprecated matcher usage for Jest 30. |
tests/streaming.test.ts |
Reformats test file (string literal/indent changes). |
eslint.config.js |
Adds ESLint v9 flat configuration. |
.eslintignore |
Removes legacy ignore file (superseded by flat config ignores). |
index.ts |
Removes blanket lint-disable comments at file top. |
errors.ts |
Uses this.endpointCategory for rate-limit error message. |
common.ts |
Removes an eslint-disable comment near JSON MIME regex. |
mise.toml |
Adds mise toolchain pin for Node. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1e73666 to
296bfb4
Compare
Pull request was converted to draft
|
Converting to draft so that we merge after the v0.9.2 release as it drops support for node@16, so best to release it separately |
e740c73 to
719ba36
Compare
719ba36 to
d399929
Compare
|
Documentation Updates 3 document(s) were updated by changes in this PR: Custom HTTP Headers SupportView Changes@@ -166,6 +166,18 @@
### JavaScript/TypeScript SDK
+#### Supported Node.js Versions
+
+The JavaScript SDK requires Node.js v20.19.0 or higher. Support for Node.js v16 and v18 has been dropped.
+
+The SDK is tested against the following Node.js versions:
+- Node.js 20.x (Maintenance)
+- Node.js 22.x (Maintenance)
+- Node.js 24.x (LTS)
+- Node.js 25.x (Current)
+
+For detailed information about the support policy, see the [SUPPORTED_RUNTIMES.md](https://github.com/openfga/js-sdk/blob/main/SUPPORTED_RUNTIMES.md) file in the SDK repository.
+
#### Calling Other Endpoints with executeApiRequest
The JavaScript SDK provides an `executeApiRequest` method for making raw HTTP calls to any OpenFGA endpoint, including endpoints not yet wrapped by the SDK. This is useful if you need to:
Retry-After Header and Retry StrategyView Changes@@ -24,9 +24,16 @@
# SDK-Specific Details
#### Node.js Version Support (JavaScript SDK)
-The minimum supported Node.js version for the JavaScript SDK is **v20.19.0**. Node.js v16 and v18 are no longer supported. For a detailed support policy and a list of tested Node.js versions, see [SUPPORTED_RUNTIMES.md](https://github.com/openfga/language/blob/main/pkg/js/SUPPORTED_RUNTIMES.md).
-
-We recommend using a Node.js version that is currently supported upstream (see [Node.js release schedule](https://nodejs.org/en/about/previous-releases)), such as 20 (maintenance), 22 (maintenance), 24 (LTS), or 25 (current).
+The minimum supported Node.js version for the JavaScript SDK is **v20.19.0**. Node.js v16 and v18 are no longer supported.
+
+The JavaScript SDK follows the upstream [Node.js release policy](https://nodejs.org/en/about/previous-releases), supporting versions that are in **LTS** (Long-Term Support) or **Maintenance** status. The following Node.js versions are actively tested in CI/CD pipelines:
+
+- **20.x** (Maintenance)
+- **22.x** (Maintenance)
+- **24.x** (LTS)
+- **25.x** (Current)
+
+For a detailed support policy, including best-effort support for EOL versions and long-term plans, see [SUPPORTED_RUNTIMES.md](https://github.com/openfga/js-sdk/blob/main/SUPPORTED_RUNTIMES.md).
#### Retry-After Handling
The SDK parses the `Retry-After` header as either an integer (seconds) or HTTP-date. If the value is between 1 second and 30 minutes (1800 seconds), it waits for the specified delay before retrying. If the header is missing, invalid, or out of bounds, the SDK falls back to exponential backoff with jitter.
@@ -58,7 +65,7 @@
- The maximum allowed `maxRetry` is now enforced at 15.
- No retries are performed for 501 errors, even if a `Retry-After` header is present.
- If you used the old `batchCheck` method, migrate to `clientBatchCheck` as per the [changelog](https://github.com/openfga/js-sdk/blob/ca4b9fcf9eaed35170d44a4b3697f439b81187f6/CHANGELOG.md#L8-L44).
-- For details on supported Node.js versions and our support policy, see [SUPPORTED_RUNTIMES.md](https://github.com/openfga/language/blob/main/pkg/js/SUPPORTED_RUNTIMES.md).
+- For details on supported Node.js versions and our support policy, see [SUPPORTED_RUNTIMES.md](https://github.com/openfga/js-sdk/blob/main/SUPPORTED_RUNTIMES.md).
### Java SDK
**Version Introduced:** v0.9.0 StreamedListObjects Feature OverviewView Changes@@ -84,6 +84,8 @@
### JS SDK
The JS SDK supports StreamedListObjects as of version v0.9.3. The method streams results using async iterators, allowing you to process each object as it arrives. See the [documentation](#streamed-list-objects) for usage details.
+**Runtime Requirements:** The JS SDK requires Node.js v20.19.0 or higher. Currently tested versions include Node.js 20.x, 22.x, 24.x, and 25.x. For detailed information about supported Node.js versions and the support policy, see [SUPPORTED_RUNTIMES.md](https://github.com/openfga/js-sdk/blob/main/SUPPORTED_RUNTIMES.md).
+
Additionally, the JS SDK provides `executeApiRequest` and `executeStreamedApiRequest` methods on `OpenFgaClient` that can be used to call arbitrary API endpoints that don't yet have dedicated SDK methods. Use `executeApiRequest` for regular endpoints and `executeStreamedApiRequest` for streaming endpoints like `/streamed-list-objects`. These methods act as an escape hatch while still providing SDK benefits like authentication, configuration, retries, and error handling.
**Example:** |
Description
We recently announced that we'll be explicit in our support policy to only support runtimes that are supported upstream, on that note this PR drops support for node @16 and @18 and bumps the min supported node runtime version to 20.
In addition, we updated several dependencies.
Note the we did not update to the recently released eslint v10.0.0, as typescript-eslint does not support it yet.
We have marked the minimum supported node runtime version as 20.19.0 in preparation.
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit