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

feat: added support for nodejs22 #941

Merged
merged 7 commits into from
Jan 17, 2025
Merged

feat: added support for nodejs22 #941

merged 7 commits into from
Jan 17, 2025

Conversation

dbarrosop
Copy link
Member

@dbarrosop dbarrosop commented Jan 16, 2025

PR Type

Enhancement


Description

  • Upgraded Node.js version to 22 in functions

  • Updated nhost/functions image to 1.4.0-beta1

  • Updated nhost/be dependency to latest version

  • Modified example project configuration


Changes walkthrough 📝

Relevant files
Enhancement
compose.go
Update nhost/functions image version                                         

dockercompose/compose.go

  • Updated nhost/functions image version to 1.4.0-beta1
+1/-1     
Configuration changes
nhost.toml
Upgrade Node.js version in example project                             

examples/myproject/nhost/nhost.toml

  • Changed functions.node.version from 20 to 22
+1/-1     
Dependencies
go.mod
Update nhost/be dependency version                                             

go.mod

  • Updated github.com/nhost/be dependency to latest version
+1/-1     
go.sum
Update go.sum with new nhost/be dependency                             

go.sum

  • Added new version of github.com/nhost/be dependency
  • Removed old version of github.com/nhost/be dependency
  • +2/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Version Compatibility

    Ensure that the new functions image version (1.4.0-beta1) is compatible with the updated Node.js version 22. Verify if there are any breaking changes or new features that need to be addressed.

    Image:       fmt.Sprintf("nhost/functions:%d-1.4.0-beta1", *cfg.GetFunctions().GetNode().Version),
    Configuration Update

    Confirm that changing the Node.js version to 22 in the example project configuration doesn't introduce any compatibility issues with other components or dependencies.

    version = 22

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Verify compatibility and conduct thorough testing with the newly introduced Node.js version

    Ensure that the Node.js version 22 is fully supported and tested with your current
    setup, as it's a relatively new version that might introduce compatibility issues.

    examples/myproject/nhost/nhost.toml [24]

     [functions.node]
    -version = 22
    +version = 22  # Ensure compatibility with all dependencies and test thoroughly
    Suggestion importance[1-10]: 8

    Why: Upgrading to Node.js version 22 is a significant change that could potentially impact system stability and compatibility. Thorough testing is crucial to ensure smooth operation with the new version.

    8
    General
    Extract hardcoded version string into a constant or configuration variable for better maintainability

    Consider using a constant or configuration variable for the version string
    "1.4.0-beta1" instead of hardcoding it. This will make future updates easier and
    reduce the risk of inconsistencies.

    dockercompose/compose.go [376]

    -Image:       fmt.Sprintf("nhost/functions:%d-1.4.0-beta1", *cfg.GetFunctions().GetNode().Version),
    +const functionsVersion = "1.4.0-beta1"
    +...
    +Image:       fmt.Sprintf("nhost/functions:%d-%s", *cfg.GetFunctions().GetNode().Version, functionsVersion),
    Suggestion importance[1-10]: 7

    Why: Extracting the hardcoded version string into a constant or configuration variable improves maintainability and reduces the risk of inconsistencies in future updates. This is a good practice for version management.

    7

    @dbarrosop dbarrosop merged commit 5096189 into main Jan 17, 2025
    9 checks passed
    @dbarrosop dbarrosop deleted the nodejs22 branch January 17, 2025 06:56
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants