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: add node 22 support #2695

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

feat: add node 22 support #2695

wants to merge 8 commits into from

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented May 15, 2024

High Level Overview of Change

This PR adds CI for Node 22 and updates all the actions to the latest versions.

Context of Change

node v22 was just released

Type of Change

  • Tests (You added tests for code that already exists, or your new feature included in this PR)

Test Plan

CI should pass with node 22.

Summary by CodeRabbit

  • New Features

    • Expanded Node.js version support in CI/CD workflow to include version 22.x.
    • Upgraded npm version in CI/CD workflow to 10.
  • Bug Fixes

    • Adjusted npm version constraints in package.json to allow compatibility with npm versions up to 11.0.0.
  • Chores

    • Enhanced build script verbosity for the ripple-keypairs package to improve diagnostics during compilation.

@mvadari
Copy link
Collaborator Author

mvadari commented May 15, 2024

This works locally, and in a Linux docker container, but not in CI for some reason.....

@mvadari
Copy link
Collaborator Author

mvadari commented May 15, 2024

This is likely related: nodejs/node#52797

@justinr1234
Copy link
Collaborator

@CodeRabbit full review

@justinr1234
Copy link
Collaborator

@coderabbitai full review

Copy link

coderabbitai bot commented Sep 19, 2024

Actions performed

Full review triggered.

Copy link

coderabbitai bot commented Sep 19, 2024

Walkthrough

The changes involve updates to the CI/CD workflow configuration and package definitions. The Node.js and npm versions in the CI/CD pipeline have been upgraded, expanding the Node.js version matrix and updating the npm version. Additionally, the package.json files for certain packages have been modified to reflect these version changes, including a more verbose build command in one package. These updates aim to enhance compatibility and improve the build process.

Changes

File(s) Change Summary
.github/workflows/nodejs.yml Updated Node.js version matrix to include 22.x, upgraded npm from 9 to 10, and modified cache keys. Steps for building and testing commented out.
package.json Updated npm version constraint from >=7.10.0 < 10.0.0 to >=7.10.0 < 11.0.0.
packages/ripple-keypairs/package.json Modified build script to include --verbose flag for enhanced output during TypeScript compilation.

Sequence Diagram(s)

sequenceDiagram
    participant CI as CI/CD Pipeline
    participant Node as Node.js
    participant NPM as npm
    participant Package as Package

    CI->>NPM: Upgrade npm to version 10
    CI->>Node: Expand Node.js version matrix to include 22.x
    CI->>Package: Update package.json for npm version compatibility
    Package->>Package: Modify build script to add --verbose flag
Loading

Poem

🐰 In the garden where code does grow,
New versions sprout, putting on a show.
With npm ten and Node twenty-two,
Our builds are bright, and the tests are too!
Hopping along, let the changes ring,
A joyful leap for the code we bring! 🌼


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f3960c3 and 210fc84.

Files selected for processing (3)
  • .github/workflows/nodejs.yml (8 hunks)
  • package.json (1 hunks)
  • packages/ripple-keypairs/package.json (1 hunks)
Additional comments not posted (11)
packages/ripple-keypairs/package.json (1)

6-6: LGTM!

The addition of the --verbose flag to the TypeScript compiler command is a good change that enhances the logging output during the build process. This can be helpful for developers to diagnose issues or understand the build process better.

The change does not alter the functionality of the build command and is unlikely to have any negative impact on the package.

package.json (1)

68-68: Verify compatibility with npm versions 10.x.x.

The change to allow npm versions up to 11.0.0 is reasonable and expands the compatibility range. However, it's crucial to ensure that the package has been thoroughly tested with npm versions 10.x.x to avoid any unexpected issues or breaking changes.

Please confirm that the package has been tested with npm versions 10.x.x and that no compatibility issues were encountered.

.github/workflows/nodejs.yml (9)

31-33: LGTM!

The global installation of npm version 10 using the official npm registry looks good. This ensures that the latest compatible version of npm is available for the subsequent steps in the workflow.


62-62: Great addition!

Expanding the Node.js version matrix to include version 22.x is a valuable update. Testing against the latest stable version of Node.js ensures that the codebase remains compatible and helps identify any potential issues early in the development process. This change enhances the overall quality and maintainability of the project.


71-73: LGTM!

The global installation of npm version 10 using the official npm registry looks good. This ensures that the latest compatible version of npm is available for the subsequent steps in the workflow.


93-97: Verify the intent behind commenting out the steps.

The tmate session setup and the build and test steps have been commented out. While this might be a temporary change for troubleshooting or development purposes, it's important to ensure that these steps are uncommented and properly executed before merging the changes to the main branch.

Please provide more context on the reasoning behind commenting out these steps and confirm that they will be restored prior to merging.


105-105: Great addition!

Expanding the Node.js version matrix to include version 22.x is a valuable update. Testing against the latest stable version of Node.js ensures that the codebase remains compatible and helps identify any potential issues early in the development process. This change enhances the overall quality and maintainability of the project.


119-121: LGTM!

The global installation of npm version 10 using the official npm registry looks good. This ensures that the latest compatible version of npm is available for the subsequent steps in the workflow.


170-172: LGTM!

The global installation of npm version 10 using the official npm registry looks good. This ensures that the latest compatible version of npm is available for the subsequent steps in the workflow.


207-207: Great addition!

Expanding the Node.js version matrix to include version 22.x is a valuable update. Testing against the latest stable version of Node.js ensures that the codebase remains compatible and helps identify any potential issues early in the development process. This change enhances the overall quality and maintainability of the project.


216-218: LGTM!

The global installation of npm version 10 using the official npm registry looks good. This ensures that the latest compatible version of npm is available for the subsequent steps in the workflow.


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.

@mvadari
Copy link
Collaborator Author

mvadari commented Sep 19, 2024

@coderabbitai full review

Copy link

coderabbitai bot commented Sep 19, 2024

Actions performed

Full review triggered.

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.

2 participants