Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/express version #197

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brettchaldecott
Copy link

@brettchaldecott brettchaldecott commented Oct 4, 2024

Description (required)

Added requirements for use of express in conjunction with node.

Related issues & labels (optional)

  • Closes #
  • Suggested label:

Summary by CodeRabbit

  • New Features

    • Updated Java SDK documentation to allow for a range of dependency versions, enhancing flexibility in version management.
    • Added clarification in NodeJS SDK documentation regarding the required Node.js version when used with the Express SDK.
  • Bug Fixes

    • Improved accuracy of dependency requirements in the documentation.

Copy link
Contributor

coderabbitai bot commented Oct 4, 2024

Walkthrough

This pull request introduces updates to the documentation for the Java and NodeJS SDKs. The Java SDK documentation has been modified to reflect a change in dependency versioning, allowing for any version greater than or equal to 2.0.1 instead of a fixed version. The NodeJS SDK documentation has been updated to specify that Node.js version 20.x.x or newer is required when used with the Express SDK. These changes aim to enhance clarity and flexibility in SDK usage.

Changes

File Path Change Summary
src/content/docs/developer-tools/sdks/backend/java-sdk.mdx Updated Maven and Gradle dependency versions from 2.0.0 to ranges starting from 2.0.1.
src/content/docs/developer-tools/sdks/backend/nodejs-sdk.mdx Added requirement for Node.js version 20.x.x or newer when using the SDK with the Express SDK.

Possibly related PRs

  • Feature/java sdk rework #159: The changes in this PR involve updates to the Java SDK documentation, including dependency versioning, which is directly related to the versioning updates made in the main PR for the Java SDK dependencies.
  • Fix/all docs referring to non-m2m apps connecting to api #184: Although this PR focuses on correcting documentation for connecting to Kinde's API, it does not directly relate to the specific changes in dependency versioning made in the main PR. However, it is part of the broader context of SDK documentation updates.

Suggested labels

sdk

Suggested reviewers

  • clairekinde11
  • marcosmartini

Poem

In the land of code where bunnies hop,
Dependencies change, and we never stop.
With versions that range, oh what a delight,
Node.js now shines, all ready to write!
So let’s celebrate with a joyful cheer,
For SDKs that grow, year after year! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the sdk label Oct 4, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Outside diff range and nitpick comments (2)
src/content/docs/developer-tools/sdks/backend/nodejs-sdk.mdx (1)

19-19: Improve clarity and accuracy of the new Node.js version requirement

The addition of the Node.js version requirement for use with the Express SDK is valuable information. However, we can improve its clarity and accuracy:

  1. The phrase "in conjunction with" could be simplified.
  2. "ExpressJS" should be spelled as "Express.js" for consistency with official naming.
  3. The sentence structure can be improved for better readability.

Consider revising the line as follows:

-- Node version 18.x.x or newer. If used in conjunction with the ExpressJS sdk [Express SDK](https://github.com/kinde-oss/kinde-node-express), then Node 20.x.x or new is required.
++ Node version 18.x.x or newer. When used with the [Express.js SDK](https://github.com/kinde-oss/kinde-node-express), Node 20.x.x or newer is required.

This revision maintains the essential information while improving clarity and accuracy.

🧰 Tools
🪛 LanguageTool

[style] ~19-~19: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ...- Node version 18.x.x or newer. If used in conjunction with the ExpressJS sdk [Express SDK](https:/...

(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)


[uncategorized] ~19-~19: The official spelling of this programming framework is “Express.js”.
Context: ... newer. If used in conjunction with the ExpressJS sdk [Express SDK](https://github.com/ki...

(NODE_JS)

src/content/docs/developer-tools/sdks/backend/java-sdk.mdx (1)

Line range hint 62-716: Overall recommendation for dependency version management

Throughout the document, there's a consistent pattern of updating version numbers to allow for newer versions. While this can ensure access to the latest features and bug fixes, it also introduces potential risks:

  1. Maven dependencies now use [2.0.1,), which allows any version from 2.0.1 onwards.
  2. Gradle dependencies now use +, which always fetches the latest version.

These changes could lead to unexpected breaking changes and inconsistent behavior across different environments. To maintain stability while still allowing for updates, consider the following approach for all dependencies:

  1. For Maven:
    Use a version range that allows minor and patch updates but excludes major version changes, e.g., [2.0.1,3.0.0).

  2. For Gradle:
    Use a fixed version or a range that allows only patch updates, e.g., 2.0.1 or 2.0.+.

Implementing these changes consistently across all dependencies will provide a better balance between staying up-to-date and maintaining stability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 05573af and 12b7716.

📒 Files selected for processing (2)
  • src/content/docs/developer-tools/sdks/backend/java-sdk.mdx (7 hunks)
  • src/content/docs/developer-tools/sdks/backend/nodejs-sdk.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/nodejs-sdk.mdx

[style] ~19-~19: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ...- Node version 18.x.x or newer. If used in conjunction with the ExpressJS sdk [Express SDK](https:/...

(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)


[uncategorized] ~19-~19: The official spelling of this programming framework is “Express.js”.
Context: ... newer. If used in conjunction with the ExpressJS sdk [Express SDK](https://github.com/ki...

(NODE_JS)

🔇 Additional comments (1)
src/content/docs/developer-tools/sdks/backend/nodejs-sdk.mdx (1)

Line range hint 1-1000: Documentation appears comprehensive and well-structured

While only one line was changed in this update, it's worth noting that the overall documentation for the NodeJS SDK is comprehensive and well-structured. It covers installation, configuration, integration, and various SDK features in detail, which is valuable for developers using the Kinde NodeJS SDK.

🧰 Tools
🪛 LanguageTool

[style] ~19-~19: ‘in conjunction with’ might be wordy. Consider a shorter alternative.
Context: ...- Node version 18.x.x or newer. If used in conjunction with the ExpressJS sdk [Express SDK](https:/...

(EN_WORDINESS_PREMIUM_IN_CONJUNCTION_WITH)


[uncategorized] ~19-~19: The official spelling of this programming framework is “Express.js”.
Context: ... newer. If used in conjunction with the ExpressJS sdk [Express SDK](https://github.com/ki...

(NODE_JS)

@@ -638,15 +638,15 @@ To use configure Spring Boot to use Kinde for authentication, include the follow
<dependency>
<groupId>com.kinde.spring</groupId>
<artifactId>kinde-springboot-starter</artifactId>
<version>2.0.0</version>
<version>[2.0.1,)</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using a more restrictive version range for kinde-springboot-starter

Consistent with the previous Maven dependencies, the version range [2.0.1,) allows for any version from 2.0.1 onwards, including potential major version updates. To ensure compatibility and avoid unexpected breaking changes, consider using a more restrictive range.

-      <version>[2.0.1,)</version>
+      <version>[2.0.1,3.0.0)</version>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<version>[2.0.1,)</version>
<version>[2.0.1,3.0.0)</version>

@@ -59,7 +59,7 @@ Kinde’s SDK is available through [Maven](https://search.maven.org/). To insta
<dependency>
<groupId>com.kinde</groupId>
<artifactId>java-sdk</artifactId>
<version>2.0.0</version>
<version>[2.0.1,)</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using a more restrictive version range

The current version range [2.0.1,) allows for any version from 2.0.1 onwards, including potential major version updates. This could lead to unexpected breaking changes in the future. Consider using a more restrictive range to ensure compatibility, such as [2.0.1,3.0.0) which would allow all 2.x versions but exclude 3.0.0 and above.

-  <version>[2.0.1,)</version>
+  <version>[2.0.1,3.0.0)</version>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<version>[2.0.1,)</version>
<version>[2.0.1,3.0.0)</version>

@@ -533,7 +533,7 @@ In order to use this SDK include following POM dependency.
<dependency>
<groupId>com.kinde</groupId>
<artifactId>kinde-j2ee</artifactId>
<version>2.0.0</version>
<version>[2.0.1,)</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using a more restrictive version range for kinde-j2ee

Similar to the previous Maven dependency, the version range [2.0.1,) allows for any version from 2.0.1 onwards, including potential major version updates. To ensure compatibility and avoid unexpected breaking changes, consider using a more restrictive range.

-      <version>[2.0.1,)</version>
+      <version>[2.0.1,3.0.0)</version>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<version>[2.0.1,)</version>
<version>[2.0.1,3.0.0)</version>

@@ -704,7 +704,7 @@ To use this SDK, include the following dependency in your `pom.xml`:
<dependency>
<groupId>com.kinde</groupId>
<artifactId>kinde-management</artifactId>
<version>2.0.0</version>
<version>[2.0.1,).0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Fix version range syntax and consider using a more restrictive range

There's a typo in the version range syntax. The .0 at the end should be removed. Additionally, as with previous Maven dependencies, consider using a more restrictive range to avoid potential breaking changes.

-   <version>[2.0.1,).0</version>
+   <version>[2.0.1,3.0.0)</version>

This change removes the typo and restricts the range to versions 2.0.1 up to, but not including, 3.0.0.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<version>[2.0.1,).0</version>
<version>[2.0.1,3.0.0)</version>

@@ -713,7 +713,7 @@ To use this SDK, include the following dependency in your `pom.xml`:
For Gradle, add the following dependency to your build file:

```groovy
implementation('com.kinde:kinde-management:2.0.0')
implementation('com.kinde:kinde-management:+')
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid using the latest version syntax (+) for kinde-management in production

Consistent with the previous Gradle dependencies, using + for the version can lead to unpredictable builds and potential breaking changes. For production use, it's recommended to specify a fixed version or a more controlled range.

Consider using a specific version or a range with an upper bound:

-implementation('com.kinde:kinde-management:+')
+implementation('com.kinde:kinde-management:2.0.1')

Or if you want to allow patch updates:

-implementation('com.kinde:kinde-management:+')
+implementation('com.kinde:kinde-management:2.0.+')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
implementation('com.kinde:kinde-management:+')
implementation('com.kinde:kinde-management:2.0.1')

</dependency>
```
#### Gradle

To use the SDK with a Gradle build process, use the following dependency.

```groovy
configuration('com.kinde.spring:kinde-springboot-starter:2.0.0')
configuration('com.kinde.spring:kinde-springboot-starter:+')
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid using the latest version syntax (+) for kinde-springboot-starter in production

Consistent with the previous Gradle dependencies, using + for the version can lead to unpredictable builds and potential breaking changes. For production use, it's recommended to specify a fixed version or a more controlled range.

Consider using a specific version or a range with an upper bound:

-    configuration('com.kinde.spring:kinde-springboot-starter:+')
+    configuration('com.kinde.spring:kinde-springboot-starter:2.0.1')

Or if you want to allow patch updates:

-    configuration('com.kinde.spring:kinde-springboot-starter:+')
+    configuration('com.kinde.spring:kinde-springboot-starter:2.0.+')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
configuration('com.kinde.spring:kinde-springboot-starter:+')
configuration('com.kinde.spring:kinde-springboot-starter:2.0.1')

@@ -542,7 +542,7 @@ In order to use this SDK include following POM dependency.
In order to use the SDK with a Gradle build process please use the following dependency.

```groovy
configuration('com.kinde:kinde-j2ee:2.0.0')
configuration('com.kinde:kinde-j2ee:+')
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid using the latest version syntax (+) for kinde-j2ee in production

As with the previous Gradle dependency, using + for the version can lead to unpredictable builds and potential breaking changes. For production use, it's recommended to specify a fixed version or a more controlled range.

Consider using a specific version or a range with an upper bound:

-    configuration('com.kinde:kinde-j2ee:+')
+    configuration('com.kinde:kinde-j2ee:2.0.1')

Or if you want to allow patch updates:

-    configuration('com.kinde:kinde-j2ee:+')
+    configuration('com.kinde:kinde-j2ee:2.0.+')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
configuration('com.kinde:kinde-j2ee:+')
configuration('com.kinde:kinde-j2ee:2.0.1')

@@ -74,7 +74,7 @@ repositories {
}

dependencies {
implementation "com.kinde:java-sdk:2.0.0
implementation "com.kinde:java-sdk:+
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Avoid using the latest version syntax (+) in production

Using + for the version in Gradle dependencies can lead to unpredictable builds and potential breaking changes. For production use, it's recommended to specify a fixed version or a more controlled range.

Consider using a specific version or a range with an upper bound:

-     implementation "com.kinde:java-sdk:+"
+     implementation "com.kinde:java-sdk:2.0.1"

Or if you want to allow patch updates:

-     implementation "com.kinde:java-sdk:+"
+     implementation "com.kinde:java-sdk:2.0.+"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
implementation "com.kinde:java-sdk:+”
implementation "com.kinde:java-sdk:2.0.1"

Copy link

@oliwolffkinde oliwolffkinde left a comment

Choose a reason for hiding this comment

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

Hey @brettchaldecott,
It looks like there is Java SDK changes here. Are you able to create a PR just for Express changes as I am not across Java so I can't review that.

@@ -16,7 +16,7 @@ You can view the [NodeJS docs](https://github.com/kinde-oss/kinde-nodejs-sdk) a

## Requirements

- Node version 18.x.x or newer.
- Node version 18.x.x or newer. If used in conjunction with the ExpressJS sdk [Express SDK](https://github.com/kinde-oss/kinde-node-express), then Node 20.x.x or new is required.

Choose a reason for hiding this comment

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

@brettchaldecott - shouldnt there be changes to the Express SDK doc, not the NodeJS SDK doc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants