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 Node.js to version 20 #7782

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Upgrade Node.js to version 20 #7782

merged 2 commits into from
Nov 1, 2023

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented Nov 1, 2023

See individual commits.

@fviernau fviernau changed the title Node 20x Upgreade Node.js to version 20 Nov 1, 2023
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d0efc19) 67.84% compared to head (cad94e3) 67.84%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7782   +/-   ##
=========================================
  Coverage     67.84%   67.84%           
  Complexity     2045     2045           
=========================================
  Files           357      357           
  Lines         16770    16770           
  Branches       2378     2378           
=========================================
  Hits          11378    11378           
  Misses         4402     4402           
  Partials        990      990           
Flag Coverage Δ
funTest-docker 65.79% <ø> (ø)
funTest-non-docker 36.16% <ø> (ø)
test 35.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sschuberth sschuberth changed the title Upgreade Node.js to version 20 Upgrade Node.js to version 20 Nov 1, 2023
}
result.issues.filter {
it.source == "NPM" && it.severity == Severity.ERROR && it.message.contains("Unexpected token")
} shouldHaveSize 1
Copy link
Member

Choose a reason for hiding this comment

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

How about using the shouldHaveSingleElement { condition } matcher? Also, prefer the in operator over contains().

Copy link
Member Author

Choose a reason for hiding this comment

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

I've done it slightly differently now, but following your underlying idea to use assertions instead of comparisons.

@@ -9,8 +9,8 @@ GO_DEP_VERSION=0.5.4
GO_VERSION=1.21.1
HASKELL_STACK_VERSION=2.7.5
JAVA_VERSION=17
NODEJS_VERSION=18.17.1
NPM_VERSION=8.15.1
NODEJS_VERSION=20.9.0
Copy link
Member

Choose a reason for hiding this comment

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

Commit message nit:

Use the LTS version

Maybe say "current LTS version" as the LTS version changes over time.

ORT's Npm integration maps Npm's error output to a set of issues. In
case of a malformed `package.json`, this yields a single issue with the
currently used Npm version. A more recent Npm versions, 10.1.0, yields
two issues. Also the wording of the issue to be matched slightly
differs.

So, relax the test assertion such that it does not break when upgrading
Npm to 10.1.0 which is needed in order to upgrade Node to version 20.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau marked this pull request as ready for review November 1, 2023 21:28
@fviernau fviernau requested a review from a team as a code owner November 1, 2023 21:28
Use the current LTS version for `Node.js` in `.versions` and in
`Dockerfile`. When that version is installed via `nvm`, in Dockerfile,
Npm version 10.1.0 is installed.

So, also upgrade the Npm to that version.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau merged commit e2ed458 into main Nov 1, 2023
27 of 28 checks passed
@fviernau fviernau deleted the node-20x branch November 1, 2023 22:25
@fviernau
Copy link
Member Author

fviernau commented Nov 1, 2023

Merged regardless of unrelated detect failure.

@fviernau fviernau added the release On the topic of making releases label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release On the topic of making releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants