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

Upgrade for Node 18 compatibility #1431

Merged
merged 16 commits into from
Oct 8, 2023
Merged

Upgrade for Node 18 compatibility #1431

merged 16 commits into from
Oct 8, 2023

Conversation

javiertoledo
Copy link
Member

@javiertoledo javiertoledo commented Sep 20, 2023

In this branch we're working on a big upgrade to remove deprecated dependencies and start using Node 18.

TODO

  • Raised the node version to 18.18.0
  • Review why the core & cli packages unit tests are failing
  • Review why the AWS package unit tests are failing
  • Increase the node version for Azure Functions - currently set to node 14

Checks

  • Project Builds
  • Project passes tests and checks
  • Updated documentation accordingly

@javiertoledo javiertoledo self-assigned this Sep 20, 2023
@ghost
Copy link

ghost commented Sep 20, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@what-the-diff
Copy link

what-the-diff bot commented Sep 20, 2023

PR Summary

  • Updated Node.js version in GitHub actions files
    The version of Node.js used in our GitHub workflow files (.github/actions/build/action.yml, .github/workflows/re_test-integration-prepare.yml, etc.) has been updated to 18.18 to maintain up-to-date technology and improve the efficiency of our developments.

  • Shifted from Node.js 'Gallium' to 'Hydrogen' in Node Version Manager
    Our Node Version Manager (.nvmrc) has been changed from lts/gallium to lts/hydrogen. This is an upgrade in our underlying Node.js version, aiming at better stability and performance.

  • Added a new 'package.json' file
    A 'package.json' file, which forms the basis for Node.js projects and manages dependencies, has been added to further organize the project.

  • Updated Node.js version in 'package.json' of several packages
    The Node.js engine version has been updated to the range >=18.0.0 <19.0.0 in multiple packages (packages/application-tester/package.json, packages/cli/package.json, etc.). This ensures that these packages are compatible with our new Node.js version and work optimally.

  • Updated Node.js version in Rush Configuration
    The nodeSupportedVersionRange in our rush configuration (rush.json) has been updated from >=16.14.0 <17.0.0 to >=18.0.0 <19.0.0, making Rush compatible with the updated version of Node.js.

  • Updated Node.js version in Documentation
    The required Node.js version has also been updated >=18.0.0 <19.0.0 in our documentation files (website/docs/10_going-deeper/data-migrations.md, etc.) to guide users about the updated requirements.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 20, 2023

Oops, looks like you forgot to add a changeset.

⚠️ Please run rush change and commit the changeset file.

This command will prompt you for a change description and generate a changeset file. You can read more about changesets here.

Remember that you should use the version bump that is appropriate for the change you are making:

Version bump Meaning
patch Bug fixes, documentation changes, etc.
minor New features, non-breaking changes
major Breaking changes

If you are unsure about which version bump to use, please ask in the comments and we will help you out.

@@ -18,7 +18,7 @@ export function lambda(
apis: APIs
): Pick<FunctionProps, 'runtime' | 'timeout' | 'memorySize' | 'environment'> {
return {
runtime: Runtime.NODEJS_14_X,
runtime: Runtime.NODEJS_18_X,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Azure infrastructure also defines the runtime version in terraform-function-app.ts file. Current version is Node 14:

      siteConfig: {
        applicationStack: {
          nodeVersion: '~14',
        },
      },

I think we should update it too

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also I think the functionsExtensionVersion: '~3' needs to be updated to functionsExtensionVersion: '~4' in the same file

@javiertoledo javiertoledo changed the title Ultimate Upgrade (Node 18, Typescript 5+, etc.) Upgrade for Node 18 compatibility Sep 24, 2023
@javiertoledo javiertoledo linked an issue Oct 1, 2023 that may be closed by this pull request
@javiertoledo javiertoledo marked this pull request as ready for review October 3, 2023 21:43
@javiertoledo
Copy link
Member Author

/integration sha= 5e85f6e

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

⌛ Integration tests are running...

Check their status here 👈

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

✅ Integration tests have finished successfully!

@javiertoledo
Copy link
Member Author

javiertoledo commented Oct 8, 2023

@samueldominguez very good observation. Let's upgrade the SDK to v3 before merging this branch. I've created a new issue to track this: #1459

@javiertoledo javiertoledo marked this pull request as draft October 8, 2023 09:47
@javiertoledo javiertoledo changed the base branch from main to v2.x.x October 8, 2023 10:57
@javiertoledo javiertoledo marked this pull request as ready for review October 8, 2023 11:01
@javiertoledo
Copy link
Member Author

I've moved all pending tasks to separate issues and retargeted this PR to the new v2.x.x base branch. Both unit and integration tests are passing, so I'll merge it.

@javiertoledo javiertoledo merged commit 9e07e1e into v2.x.x Oct 8, 2023
6 checks passed
@javiertoledo javiertoledo deleted the upgrade/node-18 branch October 8, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Migrate to Node 18
4 participants