From 1366dddde4f7424c0c3010a4dca64f75bb84b418 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sun, 22 Sep 2024 15:40:29 -0700 Subject: [PATCH] Use eirslett/frontend-maven-plugin#1157 --- .gitignore | 7 +------ .prettierignore | 2 -- .yarnrc.yml | 2 ++ CONTRIBUTING.md | 4 ++-- pom.xml | 55 +++++++++++-------------------------------------- war/.gitignore | 20 ------------------ 6 files changed, 17 insertions(+), 73 deletions(-) create mode 100644 .yarnrc.yml delete mode 100644 war/.gitignore 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..2877980bdad0 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 20.x LTS 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/pom.xml b/pom.xml index 56c71c9fee33..86d225293e1b 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