Skip to content

Commit

Permalink
Change min required Node.JS version to 18.17.0 (#4652)
Browse files Browse the repository at this point in the history
  • Loading branch information
saberduck authored Apr 5, 2024
1 parent 1699276 commit abe7b44
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"homepage": "https://github.com/SonarSource/SonarJS#readme",
"engines": {
"node": "^18.17.1 || ^20.9.0 || >=21.1.0"
"node": "^18.17.0 || ^20.9.0 || >=21.1.0"
},
"type": "commonjs",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion sonar-plugin/sonar-javascript-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
<!-- This is used to get plugin version at runtime using getPackage().getImplementationVersion() -->
<Implementation-Version>${project.version}</Implementation-Version>
<!-- Keep in sync with NodeDeprecationWarning#MIN_SUPPORTED_NODE_VERSION -->
<NodeJs-Min-Version>18.17.1</NodeJs-Min-Version>
<NodeJs-Min-Version>18.17.0</NodeJs-Min-Version>
</manifestEntries>
</transformer>
</transformers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public class NodeDeprecationWarning {
* <p>
* The minor version is a requirement from the ESLint version that the bridge uses.
*/
static final Version MIN_SUPPORTED_NODE_VERSION = Version.create(18, 17, 1);
static final Version MIN_SUPPORTED_NODE_VERSION = Version.create(18, 17, 0);
static final int MIN_RECOMMENDED_NODE_VERSION = 18;
static final List<Integer> RECOMMENDED_NODE_VERSIONS = Arrays.asList(18, 20);
static final List<String> RECOMMENDED_NODE_VERSIONS = List.of("^18.18.0", "^20.9.0");
static final List<Integer> ALL_RECOMMENDED_NODE_VERSIONS = Arrays.asList(18, 20, 21);
private final AnalysisWarningsWrapper analysisWarnings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void test_recommended() {
void test_19() {
deprecationWarning.logNodeDeprecation(19);
assertWarnings(
"Node.js version 19 is not recommended, you might experience issues. Please use a recommended version of Node.js [18, 20]"
"Node.js version 19 is not recommended, you might experience issues. Please use a recommended version of Node.js [^18.18.0, ^20.9.0]"
);
}

Expand Down

0 comments on commit abe7b44

Please sign in to comment.