diff --git a/.gitignore b/.gitignore
index f7314d0646ec..41747ca0cd23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,9 +65,7 @@ junit.xml
# Yarn
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
-.pnp.*
.yarn/*
-.yarnrc.yml
!.yarn/patches
!.yarn/plugins
!.yarn/sdks
@@ -78,7 +76,4 @@ node/
node_modules/
# Generated JavaScript Bundles
-jsbundles
-
-# In case someone accidentally runs npm install instead of yarn install
-package-lock.json
+war/src/main/webapp/jsbundles/
diff --git a/.prettierignore b/.prettierignore
index 042e5d268c0c..66cf7311b1ca 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -7,8 +7,6 @@ node/
.git
-.yarnrc.yml
-
# libraries / external deps / generated files
war/src/main/js/plugin-setup-wizard/bootstrap-detached.js
war/src/main/webapp/scripts/yui
diff --git a/.yarnrc.yml b/.yarnrc.yml
new file mode 100644
index 000000000000..5004f58b1bfd
--- /dev/null
+++ b/.yarnrc.yml
@@ -0,0 +1,2 @@
+enableGlobalCache: false
+nodeLinker: node-modules
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1be9d4f3f9cf..17d4b17733f9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,12 +53,12 @@ MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/ja
### Running the Yarn frontend build
> [!TIP]
-> If you already have Node.js installed, you do not need to change your path. Start using `yarn` by enabling [Corepack](https://yarnpkg.com/corepack) with `corepack enable`, if it isn't already; this will add the `yarn` binary to your PATH.
+> If you already have Node.js installed, you do not need to change your path. Start using Yarn by enabling [Corepack](https://yarnpkg.com/corepack) with `corepack enable`, if it isn't already; this will add the `yarn` binary to your path.
To run the Yarn frontend build, after [building the WAR file](#building-the-war-file), add the downloaded versions of Node and Yarn to your path:
```sh
-export PATH=$PWD/node:$PWD/node/yarn/dist/bin:$PATH
+export PATH=$PWD/node:$PWD/node/node_modules/corepack/shims:$PATH
```
Then you can run Yarn with e.g.
diff --git a/package.json b/package.json
index 365fadb619ed..bd04a58d1b3e 100644
--- a/package.json
+++ b/package.json
@@ -65,5 +65,8 @@
"defaults",
"not IE 11"
],
+ "engines": {
+ "node": ">=20.0.0"
+ },
"packageManager": "yarn@4.5.0"
}
diff --git a/pom.xml b/pom.xml
index 8dc88a8f32ef..2f7da141b1e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,11 +99,6 @@ THE SOFTWARE.
8.1
20.17.0
-
- 1.22.19
-
- 4.5.0
- cc00dce5de4f68d11450519a0f69eadf2a1cbe5cc0d8e740bfac817a31d76874
yarn install
- yarn
+ corepack
initialize
+
+ yarn install
+
yarn build
- yarn
+ corepack
generate-sources
- build
+ yarn build
@@ -517,11 +486,11 @@ THE SOFTWARE.
yarn lint:ci
- yarn
+ corepack
test
- lint:ci
+ yarn lint:ci
${yarn.lint.skip}
@@ -550,11 +519,11 @@ THE SOFTWARE.
yarn lint
- yarn
+ corepack
test
- lint
+ yarn lint
${yarn.lint.skip}
diff --git a/war/.gitignore b/war/.gitignore
deleted file mode 100644
index 045972f591e6..000000000000
--- a/war/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-work
-/rebel.xml
-junit.xml
-
-# Yarn
-# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
-.pnp.*
-.yarn/*
-.yarnrc.yml
-!.yarn/patches
-!.yarn/plugins
-!.yarn/sdks
-!.yarn/versions
-
-# Node
-node/
-node_modules/
-
-# Generated JavaScript Bundles
-jsbundles