Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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\")",
"}",
Expand Down Expand Up @@ -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 = [:]",
Expand Down Expand Up @@ -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 = [:]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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",
"<prettier>",
" <npmExecutable>" + installedNpmPath() + "</npmExecutable>",
Expand Down
Loading