diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest.java index b41331765c..2df13ef405 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2025 DiffPlug + * Copyright 2016-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,13 +29,13 @@ void useNodeAndNpmFromNodeGradlePlugin() throws Exception { setFile("build.gradle").toLines( "plugins {", " id 'com.diffplug.spotless'", - " id 'com.github.node-gradle.node' version '3.5.1'", + " id 'com.github.node-gradle.node' version '7.1.0'", "}", "repositories { mavenCentral() }", "node {", " download = true", - " version = '18.16.1'", - " npmVersion = '9.5.1'", + " version = '22.14.0'", + " npmVersion = '10.9.2'", " workDir = file(\"${buildDir}/nodejs\")", " npmWorkDir = file(\"${buildDir}/npm\")", "}", @@ -106,12 +106,12 @@ void useNpmFromNodeGradlePlugin() throws Exception { setFile("build.gradle").toLines( "plugins {", " id 'com.diffplug.spotless'", - " id 'com.github.node-gradle.node' version '3.5.1'", + " id 'com.github.node-gradle.node' version '7.1.0'", "}", "repositories { mavenCentral() }", "node {", " download = true", - " version = '18.16.1'", + " version = '22.14.0'", " workDir = file(\"${buildDir}/nodejs\")", "}", "def prettierConfig = [:]", @@ -145,12 +145,12 @@ void useNpmNextToConfiguredNodePluginFromNodeGradlePlugin() throws Exception { setFile("build.gradle").toLines( "plugins {", " id 'com.diffplug.spotless'", - " id 'com.github.node-gradle.node' version '3.5.1'", + " id 'com.github.node-gradle.node' version '7.1.0'", "}", "repositories { mavenCentral() }", "node {", " download = true", - " version = '18.13.0'", + " version = '22.14.0'", " workDir = file(\"${buildDir}/nodejs\")", "}", "def prettierConfig = [:]", diff --git a/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_1.gradle b/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_1.gradle index c0fa255bcc..67789283e3 100644 --- a/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_1.gradle +++ b/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_1.gradle @@ -4,13 +4,13 @@ */ plugins { id 'com.diffplug.spotless' - id 'com.github.node-gradle.node' version '3.5.1' + id 'com.github.node-gradle.node' version '7.1.0' } repositories { mavenCentral() } node { download = true - version = '18.16.1' - npmVersion = '9.5.1' + version = '22.14.0' + npmVersion = '10.9.2' // when setting both these directories, npm and node will be in separate directories workDir = file("${buildDir}/nodejs") npmWorkDir = file("${buildDir}/npm") diff --git a/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_2.gradle b/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_2.gradle index 6d77bc3d69..59f694b299 100644 --- a/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_2.gradle +++ b/plugin-gradle/src/test/resources/com/diffplug/gradle/spotless/NpmTestsWithoutNpmInstallationTest_gradle_node_plugin_example_2.gradle @@ -4,12 +4,12 @@ */ plugins { id 'com.diffplug.spotless' - id 'com.github.node-gradle.node' version '3.5.1' + id 'com.github.node-gradle.node' version '7.1.0' } repositories { mavenCentral() } node { download = true - version = '18.16.1' + version = '22.14.0' // when not setting an explicit `npmWorkDir`, the npm binary will be installed next to the node binary workDir = file("${buildDir}/nodejs") } diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/npm/NpmTestsWithDynamicallyInstalledNpmInstallationTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/npm/NpmTestsWithDynamicallyInstalledNpmInstallationTest.java index 78830bf09d..dd840796b7 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/npm/NpmTestsWithDynamicallyInstalledNpmInstallationTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/npm/NpmTestsWithDynamicallyInstalledNpmInstallationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 DiffPlug + * Copyright 2023-2026 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ public class NpmTestsWithDynamicallyInstalledNpmInstallationTest extends MavenIn @Test void useDownloadedNpmInstallation() throws Exception { writePomWithPrettierSteps( - pomPluginLines("v18.13.0", null), + pomPluginLines("v22.14.0", null), "src/main/typescript/test.ts", "", " " + installedNpmPath() + "",