diff --git a/.java-version b/.java-version new file mode 100644 index 000000000..625934097 --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +1.8 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..3266595fb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,21 @@ +# Developing + +## Running tests locally + +### Run all invoker tests + +`mvn verify -PintegrationTests` + +### Run single invoker test + +`mvn verify -PintegrationTests -Dinvoker.test=` + +## Docker images with node version managers + +### Build docker image + +`docker build -f docker//Dockerfile -t fmp-local/base-with- ./docker` + +### Run project with docker image + +e.g. `docker run --rm -it -v $(pwd):/source -v ~/.m2:/root/.m2 fmp-local/base-with-` will mount project into /source directory \ No newline at end of file diff --git a/FORK_CHANGELOG.md b/FORK_CHANGELOG.md index b3767fc79..e2afb2c15 100644 --- a/FORK_CHANGELOG.md +++ b/FORK_CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [1.15.1-atlassian-4] - 2024-12-06 + +### Added +- [DCA11Y-1145]: Added support for using already installed node from default install directory of node version manager (fnm, mise, asdf, nvm, nvs). Use of version manager is enabled by default and can be controlled with `useNodeVersionManager` configuration property. + +### Changed +- [DCA11Y-1145]: `nodeVersion` property is not required any more, if `useNodeVersionManager` is not set to false + ## [1.15.1-atlassian-3] - 2024-11-29 ### Fixed diff --git a/README.md b/README.md index 23d09c26f..50a9e89a4 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,10 @@ Only Atlassians may release a new version, [follow this guide](https://hello.atl ## Usage guidance +### Using Node Version Manager + +By default, node based goals will try to use a node available from one of supported node version managers (`fnm`, `mise`, `asdf`, `nvm`, `nvs`). If a given node version is not available `frontend-maven-plugin` will fallback to standard installation. You can disable this behaviour with `useNodeVersionManager` configuration property. + ### Format of the Node version It shouldn't matter if the `v` prefix is present, e.g. `14.8.0` and `v14.8.0`. diff --git a/docker/fnm/Dockerfile b/docker/fnm/Dockerfile new file mode 100644 index 000000000..bb84b66a4 --- /dev/null +++ b/docker/fnm/Dockerfile @@ -0,0 +1,46 @@ +FROM docker.atl-paas.net/sox/buildeng/agent-baseagent:latest + +ARG MAVEN_VERSION=3.9.6 +ARG NODE_VERSION=20.11.0 +ARG YARN_VERSION=1.22.19 +ARG NODE_GYP_VERSION=10.0.1 + +USER root +ENV HOME /root + +#install all needed dependencies for common build and testing tools for AUI, WRM, etc. +RUN apt-get update -y \ + && apt-get install --no-install-recommends -y \ + apt-utils \ + bzip2 \ + curl \ + fontconfig \ + libgtk2.0-0 \ + libgtk-3-0 \ + libgbm-dev \ + libnotify-dev \ + libgconf-2-4 \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + libxss1 \ + vim \ + xauth \ + xmlstarlet \ + xvfb \ + zip \ + && rm -rf /var/lib/apt/lists/* + +# Remobve "global" node +RUN rm /usr/bin/node \ + && rm -rf /usr/lib/node_modules + +# Prebake latest maven +RUN cd $HOME \ + && echo "mvn_version=$MAVEN_VERSION" > mvnvm.properties \ + && mvn --version \ + && rm mvnvm.properties + +# Install node version manager +RUN curl -fsSL https://fnm.vercel.app/install | bash \ No newline at end of file diff --git a/docker/mise/Dockerfile b/docker/mise/Dockerfile new file mode 100644 index 000000000..32dacd41d --- /dev/null +++ b/docker/mise/Dockerfile @@ -0,0 +1,46 @@ +FROM docker.atl-paas.net/sox/buildeng/agent-baseagent:latest + +ARG MAVEN_VERSION=3.9.6 +ARG NODE_VERSION=20.11.0 +ARG YARN_VERSION=1.22.19 +ARG NODE_GYP_VERSION=10.0.1 + +USER root +ENV HOME /root + +#install all needed dependencies for common build and testing tools for AUI, WRM, etc. +RUN apt-get update -y \ + && apt-get install --no-install-recommends -y \ + apt-utils \ + bzip2 \ + curl \ + fontconfig \ + libgtk2.0-0 \ + libgtk-3-0 \ + libgbm-dev \ + libnotify-dev \ + libgconf-2-4 \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + libxss1 \ + vim \ + xauth \ + xmlstarlet \ + xvfb \ + zip \ + && rm -rf /var/lib/apt/lists/* + +# Remobve "global" node +RUN rm /usr/bin/node \ + && rm -rf /usr/lib/node_modules + +# Prebake latest maven +RUN cd $HOME \ + && echo "mvn_version=$MAVEN_VERSION" > mvnvm.properties \ + && mvn --version \ + && rm mvnvm.properties + +RUN curl https://mise.run | bash \ + && echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc \ No newline at end of file diff --git a/docker/nvm/Dockerfile b/docker/nvm/Dockerfile new file mode 100644 index 000000000..c3ab13b7c --- /dev/null +++ b/docker/nvm/Dockerfile @@ -0,0 +1,45 @@ +FROM docker.atl-paas.net/sox/buildeng/agent-baseagent:latest + +ARG MAVEN_VERSION=3.9.6 +ARG NODE_VERSION=20.11.0 +ARG YARN_VERSION=1.22.19 +ARG NODE_GYP_VERSION=10.0.1 + +USER root +ENV HOME /root + +#install all needed dependencies for common build and testing tools for AUI, WRM, etc. +RUN apt-get update -y \ + && apt-get install --no-install-recommends -y \ + apt-utils \ + bzip2 \ + curl \ + fontconfig \ + libgtk2.0-0 \ + libgtk-3-0 \ + libgbm-dev \ + libnotify-dev \ + libgconf-2-4 \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + libxss1 \ + vim \ + xauth \ + xmlstarlet \ + xvfb \ + zip \ + && rm -rf /var/lib/apt/lists/* + +# Remobve "global" node +RUN rm /usr/bin/node \ + && rm -rf /usr/lib/node_modules + +# Prebake latest maven +RUN cd $HOME \ + && echo "mvn_version=$MAVEN_VERSION" > mvnvm.properties \ + && mvn --version \ + && rm mvnvm.properties + +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash \ No newline at end of file diff --git a/docker/nvs/Dockerfile b/docker/nvs/Dockerfile new file mode 100644 index 000000000..0d3831ed0 --- /dev/null +++ b/docker/nvs/Dockerfile @@ -0,0 +1,47 @@ +FROM docker.atl-paas.net/sox/buildeng/agent-baseagent:latest + +ARG MAVEN_VERSION=3.9.6 +ARG NODE_VERSION=20.11.0 +ARG YARN_VERSION=1.22.19 +ARG NODE_GYP_VERSION=10.0.1 + +USER root +ENV HOME /root + +#install all needed dependencies for common build and testing tools for AUI, WRM, etc. +RUN apt-get update -y \ + && apt-get install --no-install-recommends -y \ + apt-utils \ + bzip2 \ + curl \ + fontconfig \ + libgtk2.0-0 \ + libgtk-3-0 \ + libgbm-dev \ + libnotify-dev \ + libgconf-2-4 \ + libnss3 \ + libxss1 \ + libasound2 \ + libxtst6 \ + libxss1 \ + vim \ + xauth \ + xmlstarlet \ + xvfb \ + zip \ + && rm -rf /var/lib/apt/lists/* + +# Remobve "global" node +RUN rm /usr/bin/node \ + && rm -rf /usr/lib/node_modules + +# Prebake latest maven +RUN cd $HOME \ + && echo "mvn_version=$MAVEN_VERSION" > mvnvm.properties \ + && mvn --version \ + && rm mvnvm.properties + +RUN export NVS_HOME="$HOME/.nvs" \ + && git clone https://github.com/jasongin/nvs "$NVS_HOME" \ + && . "$NVS_HOME/nvs.sh" install \ No newline at end of file diff --git a/frontend-maven-plugin/pom.xml b/frontend-maven-plugin/pom.xml index 535d7a05f..cfc2a6c9a 100644 --- a/frontend-maven-plugin/pom.xml +++ b/frontend-maven-plugin/pom.xml @@ -119,7 +119,7 @@ org.apache.maven.plugins maven-invoker-plugin - 3.6.0 + 3.8.0 true @@ -132,6 +132,12 @@ ${repository.proxy.url} + + **/pom.xml + + + **/sub*/pom.xml + diff --git a/frontend-maven-plugin/src/it/custom-install-directory/pom.xml b/frontend-maven-plugin/src/it/custom-install-directory/pom.xml index 0a47dcebd..2527efbfc 100644 --- a/frontend-maven-plugin/src/it/custom-install-directory/pom.xml +++ b/frontend-maven-plugin/src/it/custom-install-directory/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/custom-working-directory/pom.xml b/frontend-maven-plugin/src/it/custom-working-directory/pom.xml index 5daac9184..fe1511c4a 100644 --- a/frontend-maven-plugin/src/it/custom-working-directory/pom.xml +++ b/frontend-maven-plugin/src/it/custom-working-directory/pom.xml @@ -17,6 +17,7 @@ src/main/frontend + false diff --git a/frontend-maven-plugin/src/it/example project/pom.xml b/frontend-maven-plugin/src/it/example project/pom.xml index 48fb4dd1f..1cd774e4c 100644 --- a/frontend-maven-plugin/src/it/example project/pom.xml +++ b/frontend-maven-plugin/src/it/example project/pom.xml @@ -16,6 +16,10 @@ @project.version@ + + false + + diff --git a/frontend-maven-plugin/src/it/node-provided-npm/pom.xml b/frontend-maven-plugin/src/it/node-provided-npm/pom.xml index a67f387c0..efdd006fc 100644 --- a/frontend-maven-plugin/src/it/node-provided-npm/pom.xml +++ b/frontend-maven-plugin/src/it/node-provided-npm/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/.tool-versions b/frontend-maven-plugin/src/it/node-version-manager/asdf/.tool-versions new file mode 100644 index 000000000..6f8e7986e --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/.tool-versions @@ -0,0 +1 @@ +nodejs 20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/install-asdf.sh b/frontend-maven-plugin/src/it/node-version-manager/asdf/install-asdf.sh new file mode 100755 index 000000000..b2a6440cb --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/install-asdf.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export ASDF_DIR="$HOME/.asdf"; +mkdir "$ASDF_DIR" +echo "ASDF_DIR set: $ASDF_DIR"; + +git clone https://github.com/asdf-vm/asdf.git "$ASDF_DIR" --branch v0.14.1 +echo "ASDF checked out"; + +. "$HOME/.asdf/asdf.sh" \ + && asdf plugin add nodejs \ + && asdf install nodejs v20.15.1 diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/asdf/invoker.properties new file mode 100644 index 000000000..aa5c3f9c2 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/invoker.properties @@ -0,0 +1,2 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/asdf +invoker.environmentVariables.ASDF_DIR=${basedir}/target/it/node-version-manager/asdf/.asdf diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/asdf/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/package.json b/frontend-maven-plugin/src/it/node-version-manager/asdf/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/asdf/pom.xml new file mode 100644 index 000000000..35989bb2d --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.github.eirslett + example + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/asdf/prebuild.groovy new file mode 100644 index 000000000..501e26789 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-asdf.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/asdf/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/asdf/verify.groovy new file mode 100644 index 000000000..5c5861301 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/asdf/verify.groovy @@ -0,0 +1,8 @@ +import org.codehaus.plexus.util.FileUtils + +// assert +assert !new File(basedir, 'node/node').exists() : "Node was installed in the custom install directory" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using ASDF version manager') : 'Node has been installed with a different version manager' diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/.nvmrc b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/.nvmrc new file mode 100644 index 000000000..78a949591 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/.nvmrc @@ -0,0 +1 @@ +v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/install-fnm.sh b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/install-fnm.sh new file mode 100755 index 000000000..175118d22 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/install-fnm.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export FNM_DIR="$HOME/.fnm"; +mkdir "$FNM_DIR" + +curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "$FNM_DIR" --skip-shell --force-install \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/invoker.properties new file mode 100644 index 000000000..88345b5cb --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/invoker.properties @@ -0,0 +1,3 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/fnm/with-no-installed-version +invoker.environmentVariables.FNM_DIR=${basedir}/target/it/node-version-manager/fnm/with-no-installed-version/.fnm +invoker.environmentVariables.XDG_DATA_HOME=${basedir}/target/it/node-version-manager/fnm/with-no-installed-version \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/package.json b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/pom.xml new file mode 100644 index 000000000..64bd24ab2 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + com.github.eirslett + fnm-with-no-installed-version + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/prebuild.groovy new file mode 100644 index 000000000..3956734f2 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-fnm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/verify.groovy new file mode 100644 index 000000000..7c0b721c3 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-no-installed-version/verify.groovy @@ -0,0 +1,9 @@ +import org.codehaus.plexus.util.FileUtils + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Requested node version v20.15.1 is not installed in version') : 'Node has been installed with a different version manager' + +assert new File(basedir, 'node').exists() : "Node was installed using version manager" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +assert buildLog.contains('node/node_modules/npm/bin/npm-cli.js, ci') : 'npm was called from a different node version' \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/.nvmrc b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/.nvmrc new file mode 100644 index 000000000..119f15a0a --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/.nvmrc @@ -0,0 +1 @@ +20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/install-fnm.sh b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/install-fnm.sh new file mode 100755 index 000000000..b5fb8041b --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/install-fnm.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export FNM_DIR="$HOME/.fnm"; +mkdir "$FNM_DIR" + +curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "$FNM_DIR" --skip-shell --force-install + +eval "$($HOME/.fnm/fnm env)" \ + && $HOME/.fnm/fnm install 20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/invoker.properties new file mode 100644 index 000000000..00f8dfeb2 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/invoker.properties @@ -0,0 +1,3 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/fnm/with-npm +invoker.environmentVariables.FNM_DIR=${basedir}/target/it/node-version-manager/fnm/with-npm/.fnm +invoker.environmentVariables.XDG_DATA_HOME=${basedir}/target/it/node-version-manager/fnm/with-npm \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/package.json b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/pom.xml new file mode 100644 index 000000000..9304df9e6 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + + com.github.eirslett + fnm-with-npm + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/prebuild.groovy new file mode 100644 index 000000000..5198859f6 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/prebuild.groovy @@ -0,0 +1,3 @@ +// TODO share installation as test utils https://maven.apache.org/plugins/maven-invoker-plugin/integration-test-mojo.html#addTestClassPath +def p = "bash $basedir/install-fnm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/verify.groovy new file mode 100644 index 000000000..24b755ebe --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-npm/verify.groovy @@ -0,0 +1,7 @@ +import org.codehaus.plexus.util.FileUtils + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using FNM version manager') : 'Node has been installed with a different version manager' + +assert !new File(basedir, 'node/node').exists() : "Node was installed bypassing version manager" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/.nvmrc b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/.nvmrc new file mode 100644 index 000000000..3f784dcf9 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/.nvmrc @@ -0,0 +1 @@ +v16.20.2 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/install-fnm.sh b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/install-fnm.sh new file mode 100755 index 000000000..f4159c5f0 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/install-fnm.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export FNM_DIR="$HOME/.fnm"; +mkdir "$FNM_DIR" + +curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "$FNM_DIR" --skip-shell --force-install + +eval "$($HOME/.fnm/fnm env)" \ + && $HOME/.fnm/fnm install v16.20.2 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/invoker.properties new file mode 100644 index 000000000..e31bb9ad6 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/invoker.properties @@ -0,0 +1,3 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/fnm/with-webpack +invoker.environmentVariables.FNM_DIR=${basedir}/target/it/node-version-manager/fnm/with-webpack/.fnm +invoker.environmentVariables.XDG_DATA_HOME=${basedir}/target/it/node-version-manager/fnm/with-webpack \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/package.json b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/package.json new file mode 100644 index 000000000..0bea68b0e --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/package.json @@ -0,0 +1,14 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "devDependencies": { + "webpack": "5.0.0", + "webpack-cli": "5.0.0" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/pom.xml new file mode 100644 index 000000000..22b6ca9ba --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + com.github.eirslett + fnm-with-webpack + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + v1.22.22 + ${basedir} + + + + + install node + + install-node-and-yarn + + + + yarn install + + yarn + + + install --frozen-lockfile + + + + webpack run + + webpack + + + --config webpack.config.js + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/prebuild.groovy new file mode 100644 index 000000000..3956734f2 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-fnm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/src/index.js b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/src/index.js new file mode 100644 index 000000000..e442383b0 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/src/index.js @@ -0,0 +1 @@ +console.log('index.js') \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/verify.groovy new file mode 100644 index 000000000..01c9f3cea --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/verify.groovy @@ -0,0 +1,8 @@ +import org.codehaus.plexus.util.FileUtils + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using FNM version manager') : 'Node has been installed with a different version manager' + +assert !new File(basedir, 'node/node').exists() : "Node was installed bypassing version manager" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" +assert new File(basedir, 'dist').exists() : "Webpack has not generated distribution output" \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/webpack.config.js b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/webpack.config.js new file mode 100644 index 000000000..fe5ae48ad --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/webpack.config.js @@ -0,0 +1,4 @@ +// webpack.config.js is a trigger file for webpack mojo +module.exports = { + mode: 'production' +}; \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/yarn.lock b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/yarn.lock new file mode 100644 index 000000000..261390029 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-webpack/yarn.lock @@ -0,0 +1,1157 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@gar/promisify@^1.0.1": + version "1.1.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" + integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== + +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.5.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@npmcli/fs@^1.0.0": + version "1.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@npmcli/fs/-/fs-1.1.1.tgz#72f719fe935e687c56a4faecf3c03d06ba593257" + integrity sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ== + dependencies: + "@gar/promisify" "^1.0.1" + semver "^7.3.5" + +"@npmcli/move-file@^1.0.1": + version "1.1.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" + integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + +"@types/eslint-scope@^3.7.0": + version "3.7.7" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "9.6.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" + integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "1.0.6" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/estree@^0.0.45": + version "0.0.45" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884" + integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g== + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.15" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@*": + version "22.7.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc" + integrity sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg== + dependencies: + undici-types "~6.19.2" + +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.0.0": + version "2.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.0": + version "2.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.0": + version "2.0.5" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +acorn@^8.0.3, acorn@^8.8.2: + version "8.12.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://packages.atlassian.com/api/npm/npm-remote/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://packages.atlassian.com/api/npm/npm-remote/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +browserslist@^4.14.3: + version "4.24.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/browserslist/-/browserslist-4.24.0.tgz#a1325fe4bc80b64fda169629fc01b3d6cecd38d4" + integrity sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A== + dependencies: + caniuse-lite "^1.0.30001663" + electron-to-chromium "^1.5.28" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +cacache@^15.0.5: + version "15.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" + integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== + dependencies: + "@npmcli/fs" "^1.0.0" + "@npmcli/move-file" "^1.0.1" + chownr "^2.0.0" + fs-minipass "^2.0.0" + glob "^7.1.4" + infer-owner "^1.0.4" + lru-cache "^6.0.0" + minipass "^3.1.1" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" + mkdirp "^1.0.3" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^8.0.1" + tar "^6.0.2" + unique-filename "^1.1.1" + +caniuse-lite@^1.0.30001663: + version "1.0.30001664" + resolved "https://packages.atlassian.com/api/npm/npm-remote/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz#d588d75c9682d3301956b05a3749652a80677df4" + integrity sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g== + +chownr@^2.0.0: + version "2.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +chrome-trace-event@^1.0.2: + version "1.0.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz#05bffd7ff928465093314708c93bdfa9bd1f0f5b" + integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== + +classnames@^2.3.2: + version "2.5.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" + integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow== + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +colorette@^2.0.14: + version "2.0.20" + resolved "https://packages.atlassian.com/api/npm/npm-remote/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^2.20.0: + version "2.20.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^9.4.1: + version "9.5.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +electron-to-chromium@^1.5.28: + version "1.5.29" + resolved "https://packages.atlassian.com/api/npm/npm-remote/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz#aa592a3caa95d07cc26a66563accf99fa573a1ee" + integrity sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw== + +enhanced-resolve@^5.2.0: + version "5.17.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +envinfo@^7.7.3: + version "7.14.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/envinfo/-/envinfo-7.14.0.tgz#26dac5db54418f2a4c1159153a0b2ae980838aae" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== + +escalade@^3.2.0: + version "3.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +eslint-scope@^5.1.0: + version "5.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +events@^3.2.0: + version "3.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://packages.atlassian.com/api/npm/npm-remote/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +find-cache-dir@^3.3.1: + version "3.3.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.2.4: + version "4.2.11" + resolved "https://packages.atlassian.com/api/npm/npm-remote/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hasown@^2.0.2: + version "2.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +import-local@^3.0.2: + version "3.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +infer-owner@^1.0.4: + version "1.0.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://packages.atlassian.com/api/npm/npm-remote/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +is-core-module@^2.13.0: + version "2.15.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + dependencies: + hasown "^2.0.2" + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jest-worker@^26.5.0: + version "26.6.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +loader-runner@^4.1.0: + version "4.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-dir@^3.0.2: + version "3.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27: + version "2.1.35" + resolved "https://packages.atlassian.com/api/npm/npm-remote/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +minimatch@^3.1.1: + version "3.1.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2: + version "1.2.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass@^3.0.0, minipass@^3.1.1: + version "3.3.6" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://packages.atlassian.com/api/npm/npm-remote/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-releases@^2.0.18: + version "2.0.18" + resolved "https://packages.atlassian.com/api/npm/npm-remote/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + +once@^1.3.0: + version "1.4.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://packages.atlassian.com/api/npm/npm-remote/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.1.0: + version "1.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== + +pkg-dir@^4.1.0, pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== + +punycode@^2.1.0: + version "2.3.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.20.0: + version "1.22.8" + resolved "https://packages.atlassian.com/api/npm/npm-remote/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +schema-utils@^3.0.0: + version "3.3.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +semver@^6.0.0: + version "6.3.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.5: + version "7.6.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + +serialize-javascript@^5.0.1: + version "5.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +source-list-map@^2.0.0, source-list-map@^2.0.1: + version "2.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://packages.atlassian.com/api/npm/npm-remote/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +ssri@^8.0.1: + version "8.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" + integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== + dependencies: + minipass "^3.1.1" + +supports-color@^7.0.0: + version "7.2.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.0.0, tapable@^2.2.0: + version "2.2.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +tar@^6.0.2: + version "6.2.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +terser-webpack-plugin@^4.1.0: + version "4.2.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz#28daef4a83bd17c1db0297070adc07fc8cfc6a9a" + integrity sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ== + dependencies: + cacache "^15.0.5" + find-cache-dir "^3.3.1" + jest-worker "^26.5.0" + p-limit "^3.0.2" + schema-utils "^3.0.0" + serialize-javascript "^5.0.1" + source-map "^0.6.1" + terser "^5.3.4" + webpack-sources "^1.4.3" + +terser@^5.3.4: + version "5.34.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/terser/-/terser-5.34.1.tgz#af40386bdbe54af0d063e0670afd55c3105abeb6" + integrity sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +undici-types@~6.19.2: + version "6.19.8" + resolved "https://packages.atlassian.com/api/npm/npm-remote/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +update-browserslist-db@^1.1.0: + version "1.1.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" + integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +watchpack@^2.0.0: + version "2.4.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" + integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +webpack-cli@5.0.0: + version "5.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/webpack-cli/-/webpack-cli-5.0.0.tgz#bd380a9653e0cd1a08916c4ff1adea17201ef68f" + integrity sha512-AACDTo20yG+xn6HPW5xjbn2Be4KUzQPebWXsDMHwPPyKh9OnTOJgZN2Nc+g/FZKV3ObRTYsGvibAvc+5jAUrVA== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.0.0" + "@webpack-cli/info" "^2.0.0" + "@webpack-cli/serve" "^2.0.0" + colorette "^2.0.14" + commander "^9.4.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-merge@^5.7.3: + version "5.10.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + +webpack-sources@^1.4.3: + version "1.4.3" + resolved "https://packages.atlassian.com/api/npm/npm-remote/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack-sources@^2.0.1: + version "2.3.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/webpack-sources/-/webpack-sources-2.3.1.tgz#570de0af163949fe272233c2cefe1b56f74511fd" + integrity sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA== + dependencies: + source-list-map "^2.0.1" + source-map "^0.6.1" + +webpack@5.0.0: + version "5.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/webpack/-/webpack-5.0.0.tgz#c028b2f0c1db2322de1f4a30cc36f6e373d5a26a" + integrity sha512-OK+Q9xGgda3idw/DgCf75XsVFxRLPu48qPwygqI3W9ls5sDdKif5Ay4SM/1UVob0w4juJy14Zv9nNv0WeyV0aA== + dependencies: + "@types/eslint-scope" "^3.7.0" + "@types/estree" "^0.0.45" + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^8.0.3" + browserslist "^4.14.3" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.2.0" + eslint-scope "^5.1.0" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.4" + json-parse-better-errors "^1.0.2" + loader-runner "^4.1.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + pkg-dir "^4.2.0" + schema-utils "^3.0.0" + tapable "^2.0.0" + terser-webpack-plugin "^4.1.0" + watchpack "^2.0.0" + webpack-sources "^2.0.1" + +which@^2.0.1: + version "2.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +wrappy@1: + version "1.0.2" + resolved "https://packages.atlassian.com/api/npm/npm-remote/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://packages.atlassian.com/api/npm/npm-remote/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/.nvmrc b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/.nvmrc new file mode 100644 index 000000000..78a949591 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/.nvmrc @@ -0,0 +1 @@ +v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/install-fnm.sh b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/install-fnm.sh new file mode 100755 index 000000000..b5fb8041b --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/install-fnm.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export FNM_DIR="$HOME/.fnm"; +mkdir "$FNM_DIR" + +curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "$FNM_DIR" --skip-shell --force-install + +eval "$($HOME/.fnm/fnm env)" \ + && $HOME/.fnm/fnm install 20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/invoker.properties new file mode 100644 index 000000000..ed63d1a06 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/invoker.properties @@ -0,0 +1,3 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/fnm/with-yarn +invoker.environmentVariables.FNM_DIR=${basedir}/target/it/node-version-manager/fnm/with-yarn/.fnm +invoker.environmentVariables.XDG_DATA_HOME=${basedir}/target/it/node-version-manager/fnm/with-yarn \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/package.json b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/pom.xml new file mode 100644 index 000000000..626fbc94d --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + com.github.eirslett + fnm-with-yarn + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + v1.22.22 + ${basedir} + + + + + install node + + install-node-and-yarn + + + + yarn install + + yarn + + + + install --frozen-lockfile + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/prebuild.groovy new file mode 100644 index 000000000..3956734f2 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-fnm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/verify.groovy new file mode 100644 index 000000000..29bb3a947 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/verify.groovy @@ -0,0 +1,8 @@ +import org.codehaus.plexus.util.FileUtils + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using FNM version manager') : 'Node has been installed with a different version manager' + +assert !new File(basedir, 'node/node').exists() : "Node was installed bypassing version manager" +assert new File(basedir, 'node/yarn').exists() : "Yarn wrapper has been downloaded" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/yarn.lock b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/yarn.lock new file mode 100644 index 000000000..edc3a157b --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/fnm/with-yarn/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +classnames@^2.3.2: + version "2.5.1" + resolved "https://packages.atlassian.com/api/npm/npm-remote/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" + integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow== diff --git a/frontend-maven-plugin/src/it/node-version-manager/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/invoker.properties new file mode 100644 index 000000000..c18c59f18 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/invoker.properties @@ -0,0 +1,6 @@ +# ignoring windows for now +invoker.os.family=!windows,unix,mac +invoker.environmentVariables.SHELL=bash +invoker.environmentVariables.NVM_DIR=non-existing-dir +invoker.environmentVariables.FNM_DIR=non-existing-dir +invoker.environmentVariables.FNM_MULTISHELL_PATH=${basedir}/target/it/node-version-manager/fnm/with-npm/.fnm/.multishells \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/.tool-versions b/frontend-maven-plugin/src/it/node-version-manager/mise/.tool-versions new file mode 100644 index 000000000..6f8e7986e --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/.tool-versions @@ -0,0 +1 @@ +nodejs 20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/install-mise.sh b/frontend-maven-plugin/src/it/node-version-manager/mise/install-mise.sh new file mode 100755 index 000000000..d20f60827 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/install-mise.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -x + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export MISE_INSTALL_PATH="$HOME/.mise/bin/mise" +mkdir "$HOME/.mise/bin" +echo "MISE_INSTALL_PATH set: $MISE_INSTALL_PATH" + +export MISE_DEBUG=1 +export MISE_VERBOSE=1 +curl https://mise.run | sh +echo "MISE has been installed" + +eval "$(${HOME}/.mise/bin/mise activate bash --shims)" +export MISE_NODE_GPG_VERIFY=0 +mise --version +mise install node@20.15.1 diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/mise/invoker.properties new file mode 100644 index 000000000..369eab046 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/invoker.properties @@ -0,0 +1,3 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/mise +invoker.environmentVariables.MISE_INSTALL_PATH=${basedir}/target/it/node-version-manager/mise/.mise/bin/mise +invoker.environmentVariables.MISE_VERBOSE=1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/mise/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/package.json b/frontend-maven-plugin/src/it/node-version-manager/mise/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/mise/pom.xml new file mode 100644 index 000000000..35989bb2d --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.github.eirslett + example + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/mise/prebuild.groovy new file mode 100644 index 000000000..9933c93b5 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-mise.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/mise/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/mise/verify.groovy new file mode 100644 index 000000000..da78a0658 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/mise/verify.groovy @@ -0,0 +1,8 @@ +import org.codehaus.plexus.util.FileUtils + +// assert +assert !new File(basedir, 'node/node').exists() : "Node was installed in the custom install directory" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using MISE version manager') : 'Node has been installed with a different version manager' diff --git a/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/invoker.properties new file mode 100644 index 000000000..2e0ccbfff --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/invoker.properties @@ -0,0 +1,3 @@ +invoker.buildResult=success + +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/no-version-manager \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/package.json b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/pom.xml new file mode 100644 index 000000000..9952505b3 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + com.github.eirslett + fnm-with-no-version-manager + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + + v20.15.1 + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/verify.groovy new file mode 100644 index 000000000..088a868aa --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/no-version-manager/verify.groovy @@ -0,0 +1,5 @@ +import org.codehaus.plexus.util.FileUtils + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('You have configured `useNodeVersionManager=true` but node version manager couldn\'t be identified') : 'Should notify the user about missing node version manager' +assert buildLog.contains('Installing node version v20.15.1') : 'Should trigger standard installation' diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/.nvmrc b/frontend-maven-plugin/src/it/node-version-manager/nvm/.nvmrc new file mode 100644 index 000000000..78a949591 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/.nvmrc @@ -0,0 +1 @@ +v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/install-nvm.sh b/frontend-maven-plugin/src/it/node-version-manager/nvm/install-nvm.sh new file mode 100755 index 000000000..4ec282545 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/install-nvm.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export NVM_DIR="$HOME/.nvm"; +mkdir "$NVM_DIR" +echo "NVM_DIR set"; + +( + git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" && + cd "$NVM_DIR" && + git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` +); +echo "NVM checked out"; + +. "$NVM_DIR/nvm.sh" \ + && nvm install v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/nvm/invoker.properties new file mode 100644 index 000000000..68b04e2af --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/invoker.properties @@ -0,0 +1,2 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/nvm +invoker.environmentVariables.NVM_DIR=${basedir}/target/it/node-version-manager/nvm/.nvm \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/nvm/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/package.json b/frontend-maven-plugin/src/it/node-version-manager/nvm/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/nvm/pom.xml new file mode 100644 index 000000000..35989bb2d --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.github.eirslett + example + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/nvm/prebuild.groovy new file mode 100644 index 000000000..ff633a606 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-nvm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvm/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/nvm/verify.groovy new file mode 100644 index 000000000..784bcda78 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvm/verify.groovy @@ -0,0 +1,8 @@ +import org.codehaus.plexus.util.FileUtils + +// assert +assert !new File(basedir, 'node/node').exists() : "Node was installed in the custom install directory" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using NVM version manager') : 'Node has been installed with a different version manager' diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/.nvmrc b/frontend-maven-plugin/src/it/node-version-manager/nvs/.nvmrc new file mode 100644 index 000000000..78a949591 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/.nvmrc @@ -0,0 +1 @@ +v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/install-nvs.sh b/frontend-maven-plugin/src/it/node-version-manager/nvs/install-nvs.sh new file mode 100755 index 000000000..0eab08f1c --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/install-nvs.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export NVS_HOME="$HOME/.nvs" +mkdir "$NVS_HOME" +echo "NVS_HOME set: $NVS_HOME"; + +export NVS_HOME="$HOME/.nvs" +git clone https://github.com/jasongin/nvs "$NVS_HOME" +echo "NVS checked out"; + +. "$NVS_HOME/nvs.sh" install +echo "NVS has installed itself into the shell" + +. "$NVS_HOME/nvs.sh" \ + && nvs add v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/invoker.properties b/frontend-maven-plugin/src/it/node-version-manager/nvs/invoker.properties new file mode 100644 index 000000000..55b73e227 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/invoker.properties @@ -0,0 +1,2 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager/nvs +invoker.environmentVariables.NVS_HOME=${basedir}/target/it/node-version-manager/nvs/.nvs \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/package-lock.json b/frontend-maven-plugin/src/it/node-version-manager/nvs/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/package.json b/frontend-maven-plugin/src/it/node-version-manager/nvs/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/pom.xml b/frontend-maven-plugin/src/it/node-version-manager/nvs/pom.xml new file mode 100644 index 000000000..35989bb2d --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + com.github.eirslett + example + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/prebuild.groovy b/frontend-maven-plugin/src/it/node-version-manager/nvs/prebuild.groovy new file mode 100644 index 000000000..371a54ad0 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-nvs.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/node-version-manager/nvs/verify.groovy b/frontend-maven-plugin/src/it/node-version-manager/nvs/verify.groovy new file mode 100644 index 000000000..4a32e4367 --- /dev/null +++ b/frontend-maven-plugin/src/it/node-version-manager/nvs/verify.groovy @@ -0,0 +1,8 @@ +import org.codehaus.plexus.util.FileUtils + +// assert +assert !new File(basedir, 'node/node').exists() : "Node was installed in the custom install directory" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert buildLog.contains('Using NVS version manager') : 'Node has been installed with a different version manager' diff --git a/frontend-maven-plugin/src/it/npx-integration/pom.xml b/frontend-maven-plugin/src/it/npx-integration/pom.xml index afe8f3cc9..4026e1a2e 100644 --- a/frontend-maven-plugin/src/it/npx-integration/pom.xml +++ b/frontend-maven-plugin/src/it/npx-integration/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/pnpm-integration/pom.xml b/frontend-maven-plugin/src/it/pnpm-integration/pom.xml index 6ec0b5a92..b0cf73e05 100644 --- a/frontend-maven-plugin/src/it/pnpm-integration/pom.xml +++ b/frontend-maven-plugin/src/it/pnpm-integration/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/provided-node-dir/invoker.properties b/frontend-maven-plugin/src/it/provided-node-dir/invoker.properties new file mode 100644 index 000000000..478480d68 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/invoker.properties @@ -0,0 +1,2 @@ +# ignoring windows for now +invoker.os.family=!windows,unix,mac diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/.nvmrc b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/.nvmrc new file mode 100644 index 000000000..78a949591 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/.nvmrc @@ -0,0 +1 @@ +v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/install-nvm.sh b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/install-nvm.sh new file mode 100755 index 000000000..4ec282545 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/install-nvm.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export NVM_DIR="$HOME/.nvm"; +mkdir "$NVM_DIR" +echo "NVM_DIR set"; + +( + git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" && + cd "$NVM_DIR" && + git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` +); +echo "NVM checked out"; + +. "$NVM_DIR/nvm.sh" \ + && nvm install v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/invoker.properties b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/invoker.properties new file mode 100644 index 000000000..9d5f3b916 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/invoker.properties @@ -0,0 +1,2 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/provided-node-dir/with-env-var +invoker.environmentVariables.AFMP_INSTALLED_NODE_DIRECTORY=${basedir}/target/it/provided-node-dir/with-env-var/.nvm/versions/node/v20.15.1/bin diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/package-lock.json b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/package.json b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/pom.xml b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/pom.xml new file mode 100644 index 000000000..c95dca358 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + com.github.eirslett + example + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + + v20.16.0 + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/prebuild.groovy b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/prebuild.groovy new file mode 100644 index 000000000..ff633a606 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-nvm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/verify.groovy b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/verify.groovy new file mode 100644 index 000000000..b62bd1791 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-env-var/verify.groovy @@ -0,0 +1,9 @@ +import org.codehaus.plexus.util.FileUtils + +// assert +assert !new File(basedir, 'node/node').exists() : "Node was installed in the custom install directory" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert !buildLog.contains('Using NVM') : 'Node has been installed with a version manager but should use provided node' +assert buildLog.contains('Provided node executable has version v20.15.1, but v20.16.0 was requested in configuration.') : 'FMP should warn about version mismatch' diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/.nvmrc b/frontend-maven-plugin/src/it/provided-node-dir/with-property/.nvmrc new file mode 100644 index 000000000..78a949591 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/.nvmrc @@ -0,0 +1 @@ +v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/install-nvm.sh b/frontend-maven-plugin/src/it/provided-node-dir/with-property/install-nvm.sh new file mode 100755 index 000000000..4ec282545 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/install-nvm.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# invoker env variables are not loaded yet +export HOME="$(dirname "$0")" + +export NVM_DIR="$HOME/.nvm"; +mkdir "$NVM_DIR" +echo "NVM_DIR set"; + +( + git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" && + cd "$NVM_DIR" && + git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` +); +echo "NVM checked out"; + +. "$NVM_DIR/nvm.sh" \ + && nvm install v20.15.1 \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/invoker.properties b/frontend-maven-plugin/src/it/provided-node-dir/with-property/invoker.properties new file mode 100644 index 000000000..59b0c4dd9 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/invoker.properties @@ -0,0 +1 @@ +invoker.environmentVariables.HOME=${basedir}/target/it/provided-node-dir/with-property diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/package-lock.json b/frontend-maven-plugin/src/it/provided-node-dir/with-property/package-lock.json new file mode 100644 index 000000000..1a8b7d458 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "example", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + } + }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + }, + "dependencies": { + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + } + } +} diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/package.json b/frontend-maven-plugin/src/it/provided-node-dir/with-property/package.json new file mode 100644 index 000000000..e36bdbfca --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/package.json @@ -0,0 +1,10 @@ +{ + "name": "example", + "version": "0.0.1", + "dependencies": { + "classnames": "^2.3.2" + }, + "scripts": { + "prebuild": "npm install" + } +} diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/pom.xml b/frontend-maven-plugin/src/it/provided-node-dir/with-property/pom.xml new file mode 100644 index 000000000..2af771b68 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + + com.github.eirslett + example + 0 + pom + + + + + com.github.eirslett + frontend-maven-plugin + + @project.version@ + + + ${basedir} + ${basedir}/.nvm/versions/node/v20.15.1/bin + + v20.16.0 + + + + + install node + + install-node-and-npm + + + + npm ci + + npm + + + + ci + + + + + + + + diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/prebuild.groovy b/frontend-maven-plugin/src/it/provided-node-dir/with-property/prebuild.groovy new file mode 100644 index 000000000..ff633a606 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/prebuild.groovy @@ -0,0 +1,2 @@ +def p = "bash $basedir/install-nvm.sh".execute() +p.waitForProcessOutput(System.out, System.err) \ No newline at end of file diff --git a/frontend-maven-plugin/src/it/provided-node-dir/with-property/verify.groovy b/frontend-maven-plugin/src/it/provided-node-dir/with-property/verify.groovy new file mode 100644 index 000000000..b62bd1791 --- /dev/null +++ b/frontend-maven-plugin/src/it/provided-node-dir/with-property/verify.groovy @@ -0,0 +1,9 @@ +import org.codehaus.plexus.util.FileUtils + +// assert +assert !new File(basedir, 'node/node').exists() : "Node was installed in the custom install directory" +assert new File(basedir, 'node_modules').exists() : "Node modules were not installed in the base directory" + +String buildLog = FileUtils.fileRead(new File(basedir, 'build.log')) +assert !buildLog.contains('Using NVM') : 'Node has been installed with a version manager but should use provided node' +assert buildLog.contains('Provided node executable has version v20.15.1, but v20.16.0 was requested in configuration.') : 'FMP should warn about version mismatch' diff --git a/frontend-maven-plugin/src/it/mise-config-file/.mise.toml b/frontend-maven-plugin/src/it/version-file/mise-config-file/.mise.toml similarity index 100% rename from frontend-maven-plugin/src/it/mise-config-file/.mise.toml rename to frontend-maven-plugin/src/it/version-file/mise-config-file/.mise.toml diff --git a/frontend-maven-plugin/src/it/mise-config-file/package-lock.json b/frontend-maven-plugin/src/it/version-file/mise-config-file/package-lock.json similarity index 100% rename from frontend-maven-plugin/src/it/mise-config-file/package-lock.json rename to frontend-maven-plugin/src/it/version-file/mise-config-file/package-lock.json diff --git a/frontend-maven-plugin/src/it/mise-config-file/package.json b/frontend-maven-plugin/src/it/version-file/mise-config-file/package.json similarity index 100% rename from frontend-maven-plugin/src/it/mise-config-file/package.json rename to frontend-maven-plugin/src/it/version-file/mise-config-file/package.json diff --git a/frontend-maven-plugin/src/it/mise-config-file/pom.xml b/frontend-maven-plugin/src/it/version-file/mise-config-file/pom.xml similarity index 94% rename from frontend-maven-plugin/src/it/mise-config-file/pom.xml rename to frontend-maven-plugin/src/it/version-file/mise-config-file/pom.xml index 2dd31616a..aff974661 100644 --- a/frontend-maven-plugin/src/it/mise-config-file/pom.xml +++ b/frontend-maven-plugin/src/it/version-file/mise-config-file/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/mise-config-file/verify.groovy b/frontend-maven-plugin/src/it/version-file/mise-config-file/verify.groovy similarity index 100% rename from frontend-maven-plugin/src/it/mise-config-file/verify.groovy rename to frontend-maven-plugin/src/it/version-file/mise-config-file/verify.groovy diff --git a/frontend-maven-plugin/src/it/mise-env-config-file/TESTDIR/mise.TESTPROFILE.toml b/frontend-maven-plugin/src/it/version-file/mise-env-config-file/TESTDIR/mise.TESTPROFILE.toml similarity index 100% rename from frontend-maven-plugin/src/it/mise-env-config-file/TESTDIR/mise.TESTPROFILE.toml rename to frontend-maven-plugin/src/it/version-file/mise-env-config-file/TESTDIR/mise.TESTPROFILE.toml diff --git a/frontend-maven-plugin/src/it/mise-env-config-file/package-lock.json b/frontend-maven-plugin/src/it/version-file/mise-env-config-file/package-lock.json similarity index 100% rename from frontend-maven-plugin/src/it/mise-env-config-file/package-lock.json rename to frontend-maven-plugin/src/it/version-file/mise-env-config-file/package-lock.json diff --git a/frontend-maven-plugin/src/it/mise-env-config-file/package.json b/frontend-maven-plugin/src/it/version-file/mise-env-config-file/package.json similarity index 100% rename from frontend-maven-plugin/src/it/mise-env-config-file/package.json rename to frontend-maven-plugin/src/it/version-file/mise-env-config-file/package.json diff --git a/frontend-maven-plugin/src/it/mise-env-config-file/pom.xml b/frontend-maven-plugin/src/it/version-file/mise-env-config-file/pom.xml similarity index 94% rename from frontend-maven-plugin/src/it/mise-env-config-file/pom.xml rename to frontend-maven-plugin/src/it/version-file/mise-env-config-file/pom.xml index 2dd31616a..aff974661 100644 --- a/frontend-maven-plugin/src/it/mise-env-config-file/pom.xml +++ b/frontend-maven-plugin/src/it/version-file/mise-env-config-file/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/mise-env-config-file/verify.groovy b/frontend-maven-plugin/src/it/version-file/mise-env-config-file/verify.groovy similarity index 100% rename from frontend-maven-plugin/src/it/mise-env-config-file/verify.groovy rename to frontend-maven-plugin/src/it/version-file/mise-env-config-file/verify.groovy diff --git a/frontend-maven-plugin/src/it/nested-project-nvmrc-file/package-lock.json b/frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/package-lock.json similarity index 100% rename from frontend-maven-plugin/src/it/nested-project-nvmrc-file/package-lock.json rename to frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/package-lock.json diff --git a/frontend-maven-plugin/src/it/nested-project-nvmrc-file/package.json b/frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/package.json similarity index 100% rename from frontend-maven-plugin/src/it/nested-project-nvmrc-file/package.json rename to frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/package.json diff --git a/frontend-maven-plugin/src/it/nested-project-nvmrc-file/pom.xml b/frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/pom.xml similarity index 94% rename from frontend-maven-plugin/src/it/nested-project-nvmrc-file/pom.xml rename to frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/pom.xml index 2dd31616a..aff974661 100644 --- a/frontend-maven-plugin/src/it/nested-project-nvmrc-file/pom.xml +++ b/frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/nested-project-nvmrc-file/verify.groovy b/frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/verify.groovy similarity index 100% rename from frontend-maven-plugin/src/it/nested-project-nvmrc-file/verify.groovy rename to frontend-maven-plugin/src/it/version-file/nested-project-nvmrc-file/verify.groovy diff --git a/frontend-maven-plugin/src/it/specified-node-version-file/dotfiles/.nvmrc b/frontend-maven-plugin/src/it/version-file/specified-node-version-file/dotfiles/.nvmrc similarity index 100% rename from frontend-maven-plugin/src/it/specified-node-version-file/dotfiles/.nvmrc rename to frontend-maven-plugin/src/it/version-file/specified-node-version-file/dotfiles/.nvmrc diff --git a/frontend-maven-plugin/src/it/specified-node-version-file/package-lock.json b/frontend-maven-plugin/src/it/version-file/specified-node-version-file/package-lock.json similarity index 100% rename from frontend-maven-plugin/src/it/specified-node-version-file/package-lock.json rename to frontend-maven-plugin/src/it/version-file/specified-node-version-file/package-lock.json diff --git a/frontend-maven-plugin/src/it/specified-node-version-file/package.json b/frontend-maven-plugin/src/it/version-file/specified-node-version-file/package.json similarity index 100% rename from frontend-maven-plugin/src/it/specified-node-version-file/package.json rename to frontend-maven-plugin/src/it/version-file/specified-node-version-file/package.json diff --git a/frontend-maven-plugin/src/it/specified-node-version-file/pom.xml b/frontend-maven-plugin/src/it/version-file/specified-node-version-file/pom.xml similarity index 94% rename from frontend-maven-plugin/src/it/specified-node-version-file/pom.xml rename to frontend-maven-plugin/src/it/version-file/specified-node-version-file/pom.xml index 7500afe23..0cea9a388 100644 --- a/frontend-maven-plugin/src/it/specified-node-version-file/pom.xml +++ b/frontend-maven-plugin/src/it/version-file/specified-node-version-file/pom.xml @@ -18,6 +18,7 @@ ${project.basedir}/dotfiles/.nvmrc target + false diff --git a/frontend-maven-plugin/src/it/specified-node-version-file/verify.groovy b/frontend-maven-plugin/src/it/version-file/specified-node-version-file/verify.groovy similarity index 100% rename from frontend-maven-plugin/src/it/specified-node-version-file/verify.groovy rename to frontend-maven-plugin/src/it/version-file/specified-node-version-file/verify.groovy diff --git a/frontend-maven-plugin/src/it/tool-versions-file/.tool-versions b/frontend-maven-plugin/src/it/version-file/tool-versions-file/.tool-versions similarity index 100% rename from frontend-maven-plugin/src/it/tool-versions-file/.tool-versions rename to frontend-maven-plugin/src/it/version-file/tool-versions-file/.tool-versions diff --git a/frontend-maven-plugin/src/it/tool-versions-file/package-lock.json b/frontend-maven-plugin/src/it/version-file/tool-versions-file/package-lock.json similarity index 100% rename from frontend-maven-plugin/src/it/tool-versions-file/package-lock.json rename to frontend-maven-plugin/src/it/version-file/tool-versions-file/package-lock.json diff --git a/frontend-maven-plugin/src/it/tool-versions-file/package.json b/frontend-maven-plugin/src/it/version-file/tool-versions-file/package.json similarity index 100% rename from frontend-maven-plugin/src/it/tool-versions-file/package.json rename to frontend-maven-plugin/src/it/version-file/tool-versions-file/package.json diff --git a/frontend-maven-plugin/src/it/tool-versions-file/pom.xml b/frontend-maven-plugin/src/it/version-file/tool-versions-file/pom.xml similarity index 94% rename from frontend-maven-plugin/src/it/tool-versions-file/pom.xml rename to frontend-maven-plugin/src/it/version-file/tool-versions-file/pom.xml index 2dd31616a..aff974661 100644 --- a/frontend-maven-plugin/src/it/tool-versions-file/pom.xml +++ b/frontend-maven-plugin/src/it/version-file/tool-versions-file/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/tool-versions-file/verify.groovy b/frontend-maven-plugin/src/it/version-file/tool-versions-file/verify.groovy similarity index 100% rename from frontend-maven-plugin/src/it/tool-versions-file/verify.groovy rename to frontend-maven-plugin/src/it/version-file/tool-versions-file/verify.groovy diff --git a/frontend-maven-plugin/src/it/yarn-berry-integration/pom.xml b/frontend-maven-plugin/src/it/yarn-berry-integration/pom.xml index 3a1a604ef..fb8454e74 100644 --- a/frontend-maven-plugin/src/it/yarn-berry-integration/pom.xml +++ b/frontend-maven-plugin/src/it/yarn-berry-integration/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/it/yarn-integration/pom.xml b/frontend-maven-plugin/src/it/yarn-integration/pom.xml index c446ecf57..06be52d53 100644 --- a/frontend-maven-plugin/src/it/yarn-integration/pom.xml +++ b/frontend-maven-plugin/src/it/yarn-integration/pom.xml @@ -17,6 +17,7 @@ target + false diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java index 5df28889f..68018930a 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java @@ -65,6 +65,19 @@ public abstract class AbstractFrontendMojo extends AbstractMojo { @Parameter(defaultValue = "${repositorySystemSession}", readonly = true) private RepositorySystemSession repositorySystemSession; + /** + * Enables node installation using node version manager + */ + @Parameter(property = "useNodeVersionManager", defaultValue = "true") + private boolean useNodeVersionManager; + + /** + * Directory with an existing installation of node + * Also can be provided as environment variable AFMP_INSTALLED_NODE_DIRECTORY + */ + @Parameter(property = "installedNodeDirectory") + private File installedNodeDirectory; + /** * Determines if this execution should be skipped. */ @@ -97,8 +110,10 @@ public void execute() throws MojoFailureException { installDirectory = workingDirectory; } try { - execute(new FrontendPluginFactory(workingDirectory, installDirectory, - new RepositoryCacheResolver(repositorySystemSession))); + execute(new FrontendPluginFactory( + workingDirectory, installDirectory, + new RepositoryCacheResolver(repositorySystemSession), + useNodeVersionManager, installedNodeDirectory)); } catch (TaskRunnerException e) { if (testFailureIgnore && isTestingPhase()) { getLog().error("There are test failures.\nFailed to run task: " + e.getMessage(), e); diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/BunMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/BunMojo.java index 1462d067f..e0ddb02d5 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/BunMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/BunMojo.java @@ -54,6 +54,12 @@ public final class BunMojo extends AbstractFrontendMojo { @Parameter(property = "skip.bun", defaultValue = "${skip.bun}") private boolean skip; + /** + * Node Version Manager usage disabled for Bun execution + */ + @Parameter(property = "useNodeVersionManager", readonly = true, defaultValue = "false") + private boolean useNodeVersionManager; + @Override protected boolean skipExecution() { return this.skip; diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallBunMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallBunMojo.java index 48b02a344..55e90a6a0 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallBunMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallBunMojo.java @@ -45,6 +45,12 @@ public final class InstallBunMojo extends AbstractFrontendMojo { @Parameter(property = "skip.installbun", alias = "skip.installbun", defaultValue = "${skip.installbun}") private boolean skip; + /** + * Node Version Manager usage disabled for Bun execution + */ + @Parameter(property = "useNodeVersionManager", readonly = true, defaultValue = "false") + private boolean useNodeVersionManager; + @Component(role = SettingsDecrypter.class) private SettingsDecrypter decrypter; diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndCorepackMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndCorepackMojo.java index a5d52348f..45b228382 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndCorepackMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndCorepackMojo.java @@ -115,6 +115,7 @@ public void execute(FrontendPluginFactory factory) throws Exception { } String validNodeVersion = getDownloadableVersion(nodeVersion); + factory.loadNodeVersionManager(validNodeVersion); try { if (isAtlassianProject(project) && isBlank(serverId) && diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndNpmMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndNpmMojo.java index c5f8f178c..629144962 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndNpmMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndNpmMojo.java @@ -6,7 +6,6 @@ import com.github.eirslett.maven.plugins.frontend.lib.DownloadException; import com.github.eirslett.maven.plugins.frontend.lib.FrontendPluginFactory; import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; -import com.github.eirslett.maven.plugins.frontend.lib.NPMInstaller; import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionDetector; import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionHelper; import com.github.eirslett.maven.plugins.frontend.lib.ProxyConfig; @@ -121,6 +120,7 @@ public void execute(FrontendPluginFactory factory) throws Exception { } String validNodeVersion = getDownloadableVersion(nodeVersion); + factory.loadNodeVersionManager(validNodeVersion); String nodeDownloadRoot = getNodeDownloadRoot(); String npmDownloadRoot = getNpmDownloadRoot(); diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndPnpmMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndPnpmMojo.java index 50e3f66a6..e47fab9b1 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndPnpmMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndPnpmMojo.java @@ -8,7 +8,6 @@ import com.github.eirslett.maven.plugins.frontend.lib.InstallationException; import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionDetector; import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionHelper; -import com.github.eirslett.maven.plugins.frontend.lib.PnpmInstaller; import com.github.eirslett.maven.plugins.frontend.lib.ProxyConfig; import org.apache.maven.execution.MavenSession; import org.apache.maven.lifecycle.LifecycleExecutionException; @@ -121,6 +120,7 @@ public void execute(FrontendPluginFactory factory) throws Exception { } String validNodeVersion = getDownloadableVersion(nodeVersion); + factory.loadNodeVersionManager(validNodeVersion); // Use different names to avoid confusion with fields `nodeDownloadRoot` and // `pnpmDownloadRoot`. diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndYarnMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndYarnMojo.java index 2d03b1d02..1e7f1096c 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndYarnMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/InstallNodeAndYarnMojo.java @@ -114,6 +114,7 @@ public void execute(FrontendPluginFactory factory) throws Exception { } String validNodeVersion = getDownloadableVersion(nodeVersion); + factory.loadNodeVersionManager(validNodeVersion); boolean isYarnYamlFilePresent = isYarnrcYamlFilePresent(this.session, this.workingDirectory); diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/NpmMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/NpmMojo.java index 83a18c4f7..edef2b990 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/NpmMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/NpmMojo.java @@ -3,9 +3,11 @@ import com.github.eirslett.maven.plugins.frontend.lib.FrontendPluginFactory; import com.github.eirslett.maven.plugins.frontend.lib.IncrementalBuildExecutionDigest.ExecutionCoordinates; import com.github.eirslett.maven.plugins.frontend.lib.IncrementalMojoHelper; +import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionHelper; import com.github.eirslett.maven.plugins.frontend.lib.NpmRunner; import com.github.eirslett.maven.plugins.frontend.lib.ProxyConfig; import org.apache.maven.execution.MavenSession; +import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; @@ -20,6 +22,9 @@ import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsReporter.Goal.NPM; import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsReporter.incrementExecutionCount; import static com.github.eirslett.maven.plugins.frontend.lib.IncrementalMojoHelper.DEFAULT_EXCLUDED_FILENAMES; +import static com.github.eirslett.maven.plugins.frontend.lib.NodeVersionDetector.getNodeVersion; +import static com.github.eirslett.maven.plugins.frontend.lib.NodeVersionHelper.getDownloadableVersion; +import static java.util.Objects.isNull; @Mojo(name="npm", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true) public final class NpmMojo extends AbstractFrontendMojo { @@ -50,6 +55,19 @@ public final class NpmMojo extends AbstractFrontendMojo { @Parameter(property = "session", defaultValue = "${session}", readonly = true) private MavenSession session; + /** + * The version of Node.js to install. IMPORTANT! Most Node.js version names start with 'v', for example + * 'v0.10.18' + */ + @Parameter(property = "nodeVersion", defaultValue = "", required = false) + private String nodeVersion; + + /** + * The path to the file that contains the Node version to use + */ + @Parameter(property = "nodeVersionFile", defaultValue = "", required = false) + private String nodeVersionFile; + /** * Files that should be checked for changes for incremental builds in addition * to the defaults in {@link IncrementalMojoHelper}. Directories will be searched. @@ -84,6 +102,19 @@ protected boolean skipExecution() { @Override public synchronized void execute(FrontendPluginFactory factory) throws Exception { + String nodeVersion = getNodeVersion(workingDirectory, this.nodeVersion, this.nodeVersionFile, project.getArtifactId(), getFrontendMavenPluginVersion()); + + if (isNull(nodeVersion)) { + throw new LifecycleExecutionException("Node version could not be detected from a file and was not set"); + } + + if (!NodeVersionHelper.validateVersion(nodeVersion)) { + throw new LifecycleExecutionException("Node version (" + nodeVersion + ") is not valid. If you think it actually is, raise an issue"); + } + + String validNodeVersion = getDownloadableVersion(nodeVersion); + factory.loadNodeVersionManager(validNodeVersion); + NpmRunner runner = factory.getNpmRunner(getProxyConfig(), getRegistryUrl()); ExecutionCoordinates coordinates = new ExecutionCoordinates(execution.getGoal(), execution.getExecutionId(), execution.getLifecyclePhase()); diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/WebpackMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/WebpackMojo.java index b0e3b78b1..2fc434c9e 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/WebpackMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/WebpackMojo.java @@ -1,6 +1,9 @@ package com.github.eirslett.maven.plugins.frontend.mojo; import com.github.eirslett.maven.plugins.frontend.lib.FrontendPluginFactory; +import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionDetector; +import com.github.eirslett.maven.plugins.frontend.lib.NodeVersionHelper; +import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; @@ -13,7 +16,10 @@ import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsReporter.Goal.WEBPACK; import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsReporter.incrementExecutionCount; +import static com.github.eirslett.maven.plugins.frontend.lib.NodeVersionDetector.getNodeVersion; +import static com.github.eirslett.maven.plugins.frontend.lib.NodeVersionHelper.getDownloadableVersion; import static com.github.eirslett.maven.plugins.frontend.mojo.MojoUtils.incrementalBuildEnabled; +import static java.util.Objects.isNull; @Mojo(name="webpack", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true) public final class WebpackMojo extends AbstractFrontendMojo { @@ -47,6 +53,19 @@ public final class WebpackMojo extends AbstractFrontendMojo { @Parameter(property = "outputdir") private File outputdir; + /** + * The version of Node.js to install. IMPORTANT! Most Node.js version names start with 'v', for example + * 'v0.10.18' + */ + @Parameter(property = "nodeVersion", defaultValue = "", required = false) + private String nodeVersion; + + /** + * The path to the file that contains the Node version to use + */ + @Parameter(property = "nodeVersionFile", defaultValue = "", required = false) + private String nodeVersionFile; + /** * Skips execution of this mojo. */ @@ -66,6 +85,19 @@ public synchronized void execute(FrontendPluginFactory factory) throws Exception boolean incrementalEnabled = incrementalBuildEnabled(buildContext); boolean shouldExecute = shouldExecute(); + String nodeVersion = getNodeVersion(workingDirectory, this.nodeVersion, this.nodeVersionFile, project.getArtifactId(), getFrontendMavenPluginVersion()); + + if (isNull(nodeVersion)) { + throw new LifecycleExecutionException("Node version could not be detected from a file and was not set"); + } + + if (!NodeVersionHelper.validateVersion(nodeVersion)) { + throw new LifecycleExecutionException("Node version (" + nodeVersion + ") is not valid. If you think it actually is, raise an issue"); + } + + String validNodeVersion = getDownloadableVersion(nodeVersion); + factory.loadNodeVersionManager(validNodeVersion); + incrementExecutionCount(project.getArtifactId(), arguments, WEBPACK, getFrontendMavenPluginVersion(), incrementalEnabled, !shouldExecute, () -> { if (shouldExecute) { diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/FrontendPluginFactory.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/FrontendPluginFactory.java index 2b30f1824..ad0f4ddbe 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/FrontendPluginFactory.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/FrontendPluginFactory.java @@ -1,35 +1,52 @@ package com.github.eirslett.maven.plugins.frontend.lib; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerCache; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerRunner; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerType; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerLocator; +import jdk.nashorn.internal.objects.Global; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.io.File; +import java.util.Arrays; public final class FrontendPluginFactory { + private static final Logger logger = LoggerFactory.getLogger(FrontendPluginFactory.class); + private static final Platform defaultPlatform = Platform.guess(); private static final String DEFAULT_CACHE_PATH = "cache"; private final File workingDirectory; private final File installDirectory; private final CacheResolver cacheResolver; + private final boolean useNodeVersionManager; + private final File installedNodeDirectory; public FrontendPluginFactory(File workingDirectory, File installDirectory){ - this(workingDirectory, installDirectory, getDefaultCacheResolver(installDirectory)); + this(workingDirectory, installDirectory, getDefaultCacheResolver(installDirectory), false, null); } - public FrontendPluginFactory(File workingDirectory, File installDirectory, CacheResolver cacheResolver){ + public FrontendPluginFactory(File workingDirectory, File installDirectory, CacheResolver cacheResolver, boolean useNodeVersionManager, File installedNodeDirectory){ this.workingDirectory = workingDirectory; this.installDirectory = installDirectory; this.cacheResolver = cacheResolver; + this.useNodeVersionManager = useNodeVersionManager; + this.installedNodeDirectory = installedNodeDirectory; + + initializeGlobalCache(); } public BunInstaller getBunInstaller(ProxyConfig proxy) { return new BunInstaller(getInstallConfig(), new DefaultArchiveExtractor(), new DefaultFileDownloader(proxy)); } public NodeInstaller getNodeInstaller(ProxyConfig proxy) { - return new NodeInstaller(getInstallConfig(), new DefaultArchiveExtractor(), new DefaultFileDownloader(proxy)); + return new NodeInstaller(getInstallConfig(), getVersionManagerCache(), new DefaultArchiveExtractor(), new DefaultFileDownloader(proxy)); } public NPMInstaller getNPMInstaller(ProxyConfig proxy) { - return new NPMInstaller(getInstallConfig(), new DefaultArchiveExtractor(), new DefaultFileDownloader(proxy)); + return new NPMInstaller(getInstallConfig(), getVersionManagerCache(), new DefaultArchiveExtractor(), new DefaultFileDownloader(proxy)); } public CorepackInstaller getCorepackInstaller(ProxyConfig proxy) { @@ -96,15 +113,56 @@ public WebpackRunner getWebpackRunner(){ return new DefaultWebpackRunner(getExecutorConfig()); } + public VersionManagerRunner getVersionManagerRunner() { + return new VersionManagerRunner(getInstallConfig(), getVersionManagerCache()); + } + private NodeExecutorConfig getExecutorConfig() { - return new InstallNodeExecutorConfig(getInstallConfig()); + return new InstallNodeExecutorConfig(getInstallConfig(), getVersionManagerCache()); } private InstallConfig getInstallConfig() { - return new DefaultInstallConfig(installDirectory, workingDirectory, cacheResolver, defaultPlatform); + return GlobalCache.getInstallConfig(); } - private static final CacheResolver getDefaultCacheResolver(File root) { + private VersionManagerCache getVersionManagerCache() { + return GlobalCache.getVersionManagerCache(); + } + + private static CacheResolver getDefaultCacheResolver(File root) { return new DirectoryCacheResolver(new File(root, DEFAULT_CACHE_PATH)); } + + private void initializeGlobalCache() { + InstallConfig installConfig = new DefaultInstallConfig(installDirectory, workingDirectory, cacheResolver, defaultPlatform, useNodeVersionManager, installedNodeDirectory); + GlobalCache.setInstallConfig(installConfig); + + if (installConfig.isUseNodeVersionManager()) { + VersionManagerType versionManagerType = getVersionManagerType(installConfig); + GlobalCache.setVersionManagerCache( + new VersionManagerCache(versionManagerType) + ); + } else { + GlobalCache.setVersionManagerCache(new VersionManagerCache()); + } + } + + private static VersionManagerType getVersionManagerType(InstallConfig installConfig) { + VersionManagerLocator versionManagerLocator = new VersionManagerLocator(installConfig); + VersionManagerType versionManagerType = versionManagerLocator.findAvailable(); + if (versionManagerType == null) { + logger.warn("You have configured `useNodeVersionManager=true` but node version manager couldn't be identified. " + + "If you want to use node version manager, please install a supported manager " + Arrays.toString(VersionManagerType.values()) + " in your environment."); + } + return versionManagerType; + } + + public void loadNodeVersionManager(String nodeVersion) { + if (getInstallConfig().isUseNodeVersionManager()) { + VersionManagerType versionManagerType = getVersionManagerType(getInstallConfig()); + if (versionManagerType != null) { + getVersionManagerRunner().populateCacheForVersion(nodeVersion); + } + } + } } diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/GlobalCache.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/GlobalCache.java new file mode 100644 index 000000000..43bbf7956 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/GlobalCache.java @@ -0,0 +1,29 @@ +package com.github.eirslett.maven.plugins.frontend.lib; + +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerCache; + +public class GlobalCache { + + private static InstallConfig installConfig; + + private static VersionManagerCache versionManagerCache; + + + public static InstallConfig getInstallConfig() { + assert installConfig != null; + return installConfig; + } + + public static void setInstallConfig(InstallConfig installConfig) { + GlobalCache.installConfig = installConfig; + } + + public static VersionManagerCache getVersionManagerCache() { + assert versionManagerCache != null; + return versionManagerCache; + } + + public static void setVersionManagerCache(VersionManagerCache versionManagerCache) { + GlobalCache.versionManagerCache = versionManagerCache; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/InstallConfig.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/InstallConfig.java index 9f118e88d..3b016d8db 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/InstallConfig.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/InstallConfig.java @@ -4,26 +4,35 @@ public interface InstallConfig { File getInstallDirectory(); + void setInstallDirectory(File installDirectory); File getWorkingDirectory(); CacheResolver getCacheResolver(); Platform getPlatform(); + boolean isUseNodeVersionManager(); + File getInstalledNodeDirectory(); } final class DefaultInstallConfig implements InstallConfig { - private final File installDirectory; + private File installDirectory; private final File workingDirectory; private final CacheResolver cacheResolver; private final Platform platform; + private final boolean useNodeVersionManager; + private final File installedNodeDirectory; public DefaultInstallConfig(File installDirectory, File workingDirectory, CacheResolver cacheResolver, - Platform platform) { + Platform platform, + boolean useNodeVersionManager, + File installedNodeDirectory) { this.installDirectory = installDirectory; this.workingDirectory = workingDirectory; this.cacheResolver = cacheResolver; this.platform = platform; + this.useNodeVersionManager = useNodeVersionManager; + this.installedNodeDirectory = installedNodeDirectory; } @Override @@ -31,6 +40,11 @@ public File getInstallDirectory() { return this.installDirectory; } + @Override + public void setInstallDirectory(File installDirectory) { + this.installDirectory = installDirectory; + } + @Override public File getWorkingDirectory() { return this.workingDirectory; @@ -45,4 +59,13 @@ public Platform getPlatform() { return this.platform; } + @Override + public boolean isUseNodeVersionManager() { + return useNodeVersionManager; + } + + @Override + public File getInstalledNodeDirectory() { + return this.installedNodeDirectory; + } } \ No newline at end of file diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NPMInstaller.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NPMInstaller.java index 9777f0c8e..2c9bb877b 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NPMInstaller.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NPMInstaller.java @@ -6,6 +6,8 @@ import java.io.IOException; import java.util.Arrays; import java.util.HashMap; + +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerCache; import java.util.Map; import org.apache.commons.io.FileUtils; @@ -41,11 +43,14 @@ public class NPMInstaller { private final FileDownloader fileDownloader; - NPMInstaller(InstallConfig config, ArchiveExtractor archiveExtractor, FileDownloader fileDownloader) { + private final VersionManagerCache versionManagerCache; + + NPMInstaller(InstallConfig config, VersionManagerCache versionManagerCache, ArchiveExtractor archiveExtractor, FileDownloader fileDownloader) { this.logger = LoggerFactory.getLogger(getClass()); this.config = config; this.archiveExtractor = archiveExtractor; this.fileDownloader = fileDownloader; + this.versionManagerCache = versionManagerCache; } public NPMInstaller setNodeVersion(String nodeVersion) { @@ -98,6 +103,7 @@ public AtlassianDevMetricsInstallationWork install() throws InstallationExceptio this.npmDownloadRoot = DEFAULT_NPM_DOWNLOAD_ROOT; } + boolean npmProvided = npmProvided(); if (npmProvided) work = PROVIDED; boolean npmInstalled = npmIsAlreadyInstalled(); diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeExecutorConfig.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeExecutorConfig.java index 80c743b1e..74e71f517 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeExecutorConfig.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeExecutorConfig.java @@ -1,6 +1,11 @@ package com.github.eirslett.maven.plugins.frontend.lib; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerCache; + import java.io.File; +import java.nio.file.Paths; + +import static java.util.Objects.isNull; public interface NodeExecutorConfig { File getNodePath(); @@ -13,6 +18,7 @@ public interface NodeExecutorConfig { File getInstallDirectory(); File getWorkingDirectory(); Platform getPlatform(); + boolean hasProvidedNode(); } final class InstallNodeExecutorConfig implements NodeExecutorConfig { @@ -27,18 +33,31 @@ final class InstallNodeExecutorConfig implements NodeExecutorConfig { private final InstallConfig installConfig; + private final VersionManagerCache versionManagerCache; + public InstallNodeExecutorConfig(InstallConfig installConfig) { + this(installConfig, null); + } + + public InstallNodeExecutorConfig(InstallConfig installConfig, VersionManagerCache versionManagerCache) { this.installConfig = installConfig; + this.versionManagerCache = versionManagerCache; } @Override public File getNodePath() { + if (hasProvidedNode()) return getInstalledNodeExecutable(); + if (versionManagerCache != null && versionManagerCache.isNodeAvailable()) return versionManagerCache.getNodeExecutable(); + String nodeExecutable = getPlatform().isWindows() ? NODE_WINDOWS : NODE_DEFAULT; return new File(installConfig.getInstallDirectory() + nodeExecutable); } @Override public File getNpmPath() { + if (hasProvidedNode()) return getInstalledNpmExecutable(); + if (versionManagerCache != null && versionManagerCache.isNodeAvailable()) return versionManagerCache.getNpmExecutable(); + return new File(installConfig.getInstallDirectory() + Utils.normalize(NPM)); } @@ -77,4 +96,42 @@ public File getWorkingDirectory() { public Platform getPlatform() { return installConfig.getPlatform(); } + + private File getProvidedNodeDirectory() { + File configuredNodeDirectory = installConfig.getInstalledNodeDirectory(); + if (!isNull(configuredNodeDirectory) && configuredNodeDirectory.exists()) return configuredNodeDirectory; + + String systemNodeDirectoryPath = System.getenv("AFMP_INSTALLED_NODE_DIRECTORY"); + if (!isNull(systemNodeDirectoryPath)) { + File systemNodeDirectory = new File(systemNodeDirectoryPath); + if (systemNodeDirectory.exists()) return systemNodeDirectory; + } + + return null; + } + + private File getInstalledNodeExecutable() { + File nodeDirectory = getProvidedNodeDirectory(); + if (getPlatform().isWindows()) { + return new File(nodeDirectory, "node.exe"); + } + return new File(nodeDirectory, "node"); + } + + @Override + public boolean hasProvidedNode() { + File nodeExecutable = getProvidedNodeDirectory(); + return !isNull(nodeExecutable) && nodeExecutable.exists(); + } + + private File getInstalledNpmExecutable() { + File nodeDirectory = getProvidedNodeDirectory(); + File npmCli = new File(nodeDirectory, "npm"); + if (npmCli.exists()) return npmCli; + + npmCli = Paths.get(nodeDirectory.getParent(), "lib", "/node_modules/npm/bin/npm-cli.js").toFile(); + if (npmCli.exists()) return npmCli; + + throw new RuntimeException("Npm cli couldn't be found for provided node directory."); + } } diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java index 5d173dd0b..d1eeeeed7 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/NodeInstaller.java @@ -13,6 +13,8 @@ import java.util.Arrays; import java.util.Map; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerCache; + import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsInstallationWork.CACHED; import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsInstallationWork.DOWNLOADED; import static com.github.eirslett.maven.plugins.frontend.lib.AtlassianDevMetricsInstallationWork.INSTALLED; @@ -35,15 +37,18 @@ public class NodeInstaller { private final InstallConfig config; + private final VersionManagerCache versionManagerCache; + private final ArchiveExtractor archiveExtractor; private final FileDownloader fileDownloader; - NodeInstaller(InstallConfig config, ArchiveExtractor archiveExtractor, FileDownloader fileDownloader) { + NodeInstaller(InstallConfig config, VersionManagerCache versionManagerCache, ArchiveExtractor archiveExtractor, FileDownloader fileDownloader) { this.logger = LoggerFactory.getLogger(getClass()); this.config = config; this.archiveExtractor = archiveExtractor; this.fileDownloader = fileDownloader; + this.versionManagerCache = versionManagerCache; } public NodeInstaller setNodeVersion(String nodeVersion) { @@ -97,8 +102,11 @@ public AtlassianDevMetricsInstallationWork install() throws InstallationExceptio if (this.nodeDownloadRoot == null || this.nodeDownloadRoot.isEmpty()) { this.nodeDownloadRoot = this.config.getPlatform().getNodeDownloadRoot(); } + + // try to install the standard way if (!nodeIsAlreadyInstalled()) { this.logger.info("Installing node version {}", this.nodeVersion); + if (!this.nodeVersion.startsWith("v")) { this.logger.warn("Node version does not start with naming convention 'v'."); } @@ -120,7 +128,8 @@ public AtlassianDevMetricsInstallationWork install() throws InstallationExceptio private boolean nodeIsAlreadyInstalled() { try { - NodeExecutorConfig executorConfig = new InstallNodeExecutorConfig(this.config); + NodeExecutorConfig executorConfig = new InstallNodeExecutorConfig(this.config, versionManagerCache); + File nodeFile = executorConfig.getNodePath(); if (nodeFile.exists()) { final String version = @@ -130,6 +139,10 @@ private boolean nodeIsAlreadyInstalled() { this.logger.info("Node {} is already installed.", version); return true; } else { + if (executorConfig.hasProvidedNode()) { + this.logger.warn("Provided node executable has version {}, but {} was requested in configuration. Node executable: {}", version, this.nodeVersion, executorConfig.getNodePath()); + return true; + } this.logger.info("Node {} was installed, but we need version {}", version, this.nodeVersion); return false; @@ -342,7 +355,8 @@ private File getTempDirectory() { } private File getInstallDirectory() { - File installDirectory = new File(this.config.getInstallDirectory(), INSTALL_PATH); + File installDirectory= new File(this.config.getInstallDirectory(), INSTALL_PATH); + if (!installDirectory.exists()) { this.logger.debug("Creating install directory {}", installDirectory); installDirectory.mkdirs(); diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java index 011c20e70..fe3046bdb 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/Platform.java @@ -68,7 +68,7 @@ public String getCodename(){ } } -class Platform { +public class Platform { /** * Node.js supports Apple silicon since v16 @@ -145,6 +145,10 @@ public boolean isMac(){ return os == OS.Mac; } + public String getArchitectureName() { + return architecture.name(); + } + public String getLongNodeFilename(String nodeVersion, boolean archiveOnWindows) { if(isWindows() && !archiveOnWindows){ return "node.exe"; diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutionException.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutionException.java new file mode 100644 index 000000000..a2b349a63 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutionException.java @@ -0,0 +1,13 @@ +package com.github.eirslett.maven.plugins.frontend.lib; + +public final class ProcessExecutionException extends Exception { + private static final long serialVersionUID = 1L; + + public ProcessExecutionException(String message) { + super(message); + } + + public ProcessExecutionException(Throwable cause) { + super(cause); + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutor.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutor.java index 0e273f167..5bbfaedc2 100644 --- a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutor.java +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/ProcessExecutor.java @@ -4,6 +4,7 @@ import java.io.File; import java.io.IOException; import java.io.OutputStream; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -19,29 +20,20 @@ import org.apache.commons.exec.ShutdownHookProcessDestroyer; import org.slf4j.Logger; -final class ProcessExecutionException extends Exception { - private static final long serialVersionUID = 1L; - - public ProcessExecutionException(String message) { - super(message); - } - public ProcessExecutionException(Throwable cause) { - super(cause); - } -} - -final class ProcessExecutor { +public final class ProcessExecutor { private final static String PATH_ENV_VAR = "PATH"; - private final Map environment; + private Map environment; private CommandLine commandLine; private final Executor executor; + private final Platform platform; public ProcessExecutor(File workingDirectory, List paths, List command, Platform platform, Map additionalEnvironment){ this(workingDirectory, paths, command, platform, additionalEnvironment, 0); } public ProcessExecutor(File workingDirectory, List paths, List command, Platform platform, Map additionalEnvironment, long timeoutInSeconds) { + this.platform = platform; this.environment = createEnvironment(paths, platform, additionalEnvironment); this.commandLine = createCommandLine(command); this.executor = createExecutor(workingDirectory, timeoutInSeconds); @@ -64,7 +56,14 @@ public int executeAndRedirectOutput(final Logger logger) throws ProcessExecution return execute(logger, stdout, stdout); } - private int execute(final Logger logger, final OutputStream stdout, final OutputStream stderr) + public int execute(List command, List paths, final Logger logger, final OutputStream stdout, final OutputStream stderr) + throws ProcessExecutionException { + this.commandLine = createCommandLine(command); + this.environment = createEnvironment(paths, platform, Collections.emptyMap()); + return execute(logger, stdout, stderr); + } + + public int execute(final Logger logger, final OutputStream stdout, final OutputStream stderr) throws ProcessExecutionException { logger.debug("Executing command line {}", commandLine); try { diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerCache.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerCache.java new file mode 100644 index 000000000..cab0c049d --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerCache.java @@ -0,0 +1,44 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager; + +import java.io.File; + +public class VersionManagerCache { + + private VersionManagerType versionManagerType; + + private File nodeExecutable; + private File npmExecutable; + + public VersionManagerCache(VersionManagerType versionManagerType) { + this.versionManagerType = versionManagerType; + } + + public VersionManagerCache() { + + } + + public VersionManagerType getVersionManagerType() { + return versionManagerType; + } + + public File getNodeExecutable() { + return nodeExecutable; + } + + public void setNodeExecutable(File nodeExecutable) { + this.nodeExecutable = nodeExecutable; + } + + public File getNpmExecutable() { + return npmExecutable; + } + + public void setNpmExecutable(File npmExecutable) { + this.npmExecutable = npmExecutable; + } + + public boolean isNodeAvailable() { + File nodeExecutable = getNodeExecutable(); + return nodeExecutable != null && nodeExecutable.exists(); + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerLocator.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerLocator.java new file mode 100644 index 000000000..b664d34cf --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerLocator.java @@ -0,0 +1,25 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.client.VersionManagerClient; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.client.VersionManagerFactory; + +import java.util.Arrays; + +public class VersionManagerLocator { + + private final InstallConfig installConfig; + + public VersionManagerLocator(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + public VersionManagerType findAvailable() { + VersionManagerFactory versionManagerFactory = new VersionManagerFactory(installConfig); + for (VersionManagerType versionManagerType : VersionManagerType.values()) { + VersionManagerClient versionManagerClient = versionManagerFactory.getClient(versionManagerType); + if (versionManagerClient.isInstalled()) return versionManagerType; + } + return null; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerRunner.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerRunner.java new file mode 100644 index 000000000..6e9fb7630 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerRunner.java @@ -0,0 +1,39 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import com.github.eirslett.maven.plugins.frontend.lib.Utils; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.client.VersionManagerClient; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.client.VersionManagerFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; + +public class VersionManagerRunner { + + final Logger logger = LoggerFactory.getLogger(getClass()); + + private final VersionManagerCache versionManagerCache; + + private final VersionManagerClient versionManagerClient; + + public VersionManagerRunner(InstallConfig installConfig, VersionManagerCache versionManagerCache) { + this.versionManagerCache = versionManagerCache; + + VersionManagerFactory versionManagerFactory = new VersionManagerFactory(installConfig); + this.versionManagerClient = versionManagerFactory.getClient(versionManagerCache.getVersionManagerType()); + } + + public void populateCacheForVersion(String nodeVersion) { + logger.debug("Populating version manager cache for node: {}", nodeVersion); + + this.versionManagerCache.setNodeExecutable(versionManagerClient.getNodeExecutable(nodeVersion)); + this.versionManagerCache.setNpmExecutable(versionManagerClient.getNpmExecutable(nodeVersion)); + + if (versionManagerCache.isNodeAvailable()) { + logger.info("Using {} version manager. Requested node version {} is already installed", versionManagerCache.getVersionManagerType(), nodeVersion); + } else { + logger.info("Requested node version {} is not installed in version manager", nodeVersion); + } + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerType.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerType.java new file mode 100644 index 000000000..2c67be261 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/VersionManagerType.java @@ -0,0 +1,9 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager; + +public enum VersionManagerType { + FNM, + MISE, + NVS, + ASDF, + NVM +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/AsdfClient.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/AsdfClient.java new file mode 100644 index 000000000..f29073761 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/AsdfClient.java @@ -0,0 +1,63 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class AsdfClient implements VersionManagerClient { + final Logger logger = LoggerFactory.getLogger(getClass()); + final InstallConfig installConfig; + + public AsdfClient(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + @Override + public boolean isInstalled() { + String asdfDir = getAsdfDir(); + logger.debug("Checking if ASDF installation directory exists: {}", asdfDir); + return asdfDir != null; + } + + @Override + public File getNodeExecutable(String nodeVersion) { + String asdfDir = getAsdfDir(); + return Paths.get(asdfDir, "installs", "nodejs", nodeVersion, "bin", "node").toFile(); + } + + @Override + public File getNpmExecutable(String nodeVersion) { + File nodeExec = getNodeExecutable(nodeVersion); + return Paths.get(nodeExec.getParent(), "npm").toFile(); + } + + private String getAsdfDir() { + String asdfDir = System.getenv("ASDF_DIR"); + if (asdfDir != null) { + Path path = Paths.get(asdfDir); + if (Files.exists(path)) { + return path.toString(); + } + } + + String home = System.getenv("HOME"); + if (home != null) { + Path path = Paths.get(home, ".asdf"); + if (Files.exists(path)) { + return path.toString(); + } + + path = Paths.get(home, ".local", "share", "asdf"); + if (Files.exists(path)) { + return path.toString(); + } + } + + return null; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/FnmClient.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/FnmClient.java new file mode 100644 index 000000000..f530e32b2 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/FnmClient.java @@ -0,0 +1,89 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import com.github.eirslett.maven.plugins.frontend.lib.Platform; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class FnmClient implements VersionManagerClient { + final Logger logger = LoggerFactory.getLogger(getClass()); + final InstallConfig installConfig; + + public FnmClient(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + @Override + public boolean isInstalled() { + String fnmDir = getFnmDir(); + logger.debug("Checking if FNM installation directory exists: {}", fnmDir); + + return fnmDir != null; + } + + @Override + public File getNodeExecutable(String nodeVersion) { + String nodeVersionWithV = nodeVersion.startsWith("v") ? nodeVersion : String.format("v%s", nodeVersion); + + String fnmDir = getFnmDir(); + Platform platform = installConfig.getPlatform(); + String architecture = platform.getArchitectureName(); + String osCodename = platform.getCodename(); + String nodeOnPlatform = String.format("node-%s-%s-%s", nodeVersionWithV, osCodename, architecture); + Path path = Paths.get(fnmDir, "node-versions", nodeVersionWithV, nodeOnPlatform, "bin", "node"); + + if (Files.exists(path)) { + return path.toFile(); + } + return Paths.get(fnmDir, "node-versions", nodeVersionWithV, "installation", "bin", "node").toFile(); + } + + @Override + public File getNpmExecutable(String nodeVersion) { + File nodeExec = getNodeExecutable(nodeVersion); + return new File(nodeExec.getParent(), "npm"); + } + + private String getFnmDir() { + String fnmDir = System.getenv("FNM_DIR"); + if (fnmDir != null) { + Path path = Paths.get(fnmDir); + if (Files.exists(path)) { + return path.toString(); + } + } + + String home = System.getenv("HOME"); + if (home != null) { + Path path = Paths.get(home, ".fnm"); + if (Files.exists(path)) { + return path.toString(); + } + + path = Paths.get(home, "Library", "Application Support", "fnm"); + if (Files.exists(path)) { + return path.toString(); + } + + path = Paths.get(home, ".local", "share", "fnm"); + if (Files.exists(path)) { + return path.toString(); + } + } + + String xdgDataHome = System.getenv("XDG_DATA_HOME"); + if (xdgDataHome != null ) { + Path path = Paths.get(xdgDataHome, "fnm"); + if (Files.exists(path)) { + return path.toString(); + } + } + + return null; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/MiseClient.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/MiseClient.java new file mode 100644 index 000000000..e77587832 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/MiseClient.java @@ -0,0 +1,70 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class MiseClient implements VersionManagerClient { + final Logger logger = LoggerFactory.getLogger(getClass()); + final InstallConfig installConfig; + + public MiseClient(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + @Override + public boolean isInstalled() { + String miseDir = getMiseDir(); + logger.debug("Checking if MISE installation directory exists: {}", miseDir); + + return miseDir != null; + } + + @Override + public File getNodeExecutable(String nodeVersion) { + String miseNodeDir = getMiseDir(); + if (miseNodeDir == null) return null; + + String cleanNodeVersion = nodeVersion.replace("v", ""); + return Paths.get(miseNodeDir, cleanNodeVersion, "bin", "node").toFile(); + } + + @Override + public File getNpmExecutable(String nodeVersion) { + File nodeExec = getNodeExecutable(nodeVersion); + return Paths.get(nodeExec.getParentFile().getParent(), "/lib/node_modules/npm/bin/npm-cli.js").toFile(); + } + + private String getMiseDir() { + String miseDataDir = System.getenv("MISE_DATA_DIR"); + if (miseDataDir != null) { + Path path = Paths.get(miseDataDir, "installs", "node"); + if (Files.exists(path)) { + return path.toString(); + } + } + + String xdgDataDir = System.getenv("XDG_DATA_HOME"); + if (miseDataDir != null) { + Path path = Paths.get(xdgDataDir, "mise", "installs", "node"); + if (Files.exists(path)) { + return path.toString(); + } + } + + String home = System.getenv("HOME"); + if (home != null) { + Path path = Paths.get(home, ".local", "share", "mise", "installs", "node"); + if (Files.exists(path)) { + return path.toString(); + } + } + + return null; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/NvmClient.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/NvmClient.java new file mode 100644 index 000000000..4eee443be --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/NvmClient.java @@ -0,0 +1,66 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class NvmClient implements VersionManagerClient { + final Logger logger = LoggerFactory.getLogger(getClass()); + final InstallConfig installConfig; + + public NvmClient(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + @Override + public boolean isInstalled() { + String nvmDir = getNvmDir(); + logger.debug("Checking if NVM installation directory exists: {}", nvmDir); + return nvmDir != null; + } + + @Override + public File getNodeExecutable(String nodeVersion) { + String nvmDir = getNvmDir(); + return Paths.get(nvmDir, "versions", "node", nodeVersion, "bin", "node").toFile(); + } + + @Override + public File getNpmExecutable(String nodeVersion) { + File nodeExec = getNodeExecutable(nodeVersion); + return new File(nodeExec.getParent(), "npm"); + } + + private String getNvmDir() { + String nvmDir = System.getenv("NVM_DIR"); + if (nvmDir != null) { + Path path = Paths.get(nvmDir); + if (Files.exists(path)) { + return path.toString(); + } + } + + String home = System.getenv("HOME"); + if (home != null) { + Path path = Paths.get(home, ".nvm"); + if (Files.exists(path)) { + return path.toString(); + } + } + + String xdgConfigHome = System.getenv("XDG_CONFIG_HOME"); + if (xdgConfigHome != null) { + Path path = Paths.get(xdgConfigHome, "nvm"); + if (Files.exists(path)) { + return path.toString(); + } + } + + return null; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/NvsClient.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/NvsClient.java new file mode 100644 index 000000000..3365e7ab5 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/NvsClient.java @@ -0,0 +1,60 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +public class NvsClient implements VersionManagerClient { + final Logger logger = LoggerFactory.getLogger(getClass()); + final InstallConfig installConfig; + + public NvsClient(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + @Override + public boolean isInstalled() { + String nvsDir = getNvsDir(); + logger.debug("Checking if NVS installation directory exists: {}", nvsDir); + return nvsDir != null; + } + + @Override + public File getNodeExecutable(String nodeVersion) { + String nvsDir = getNvsDir(); + String cleanNodeVersion = nodeVersion.replace("v", ""); + String architecture = installConfig.getPlatform().getArchitectureName(); + return Paths.get(nvsDir, "node", cleanNodeVersion, architecture, "bin", "node").toFile(); + } + + @Override + public File getNpmExecutable(String nodeVersion) { + File nodeExec = getNodeExecutable(nodeVersion); + return new File(nodeExec.getParent(), "npm"); + } + + private String getNvsDir() { + String nvsDir = System.getenv("NVS_DIR"); + if (nvsDir != null) { + Path path = Paths.get(nvsDir); + if (Files.exists(path)) { + return path.toString(); + } + } + + String home = System.getenv("HOME"); + if (home != null) { + Path path = Paths.get(home, ".nvs"); + if (Files.exists(path)) { + return path.toString(); + } + } + + return null; + } +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/VersionManagerClient.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/VersionManagerClient.java new file mode 100644 index 000000000..b4140384a --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/VersionManagerClient.java @@ -0,0 +1,12 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import java.io.File; + +public interface VersionManagerClient { + + boolean isInstalled(); + + File getNodeExecutable(String nodeVersion); + + File getNpmExecutable(String nodeVersion); +} diff --git a/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/VersionManagerFactory.java b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/VersionManagerFactory.java new file mode 100644 index 000000000..ed620b2d1 --- /dev/null +++ b/frontend-plugin-core/src/main/java/com/github/eirslett/maven/plugins/frontend/lib/version/manager/client/VersionManagerFactory.java @@ -0,0 +1,29 @@ +package com.github.eirslett.maven.plugins.frontend.lib.version.manager.client; + +import com.github.eirslett.maven.plugins.frontend.lib.InstallConfig; +import com.github.eirslett.maven.plugins.frontend.lib.version.manager.VersionManagerType; + +public class VersionManagerFactory { + + final InstallConfig installConfig; + + public VersionManagerFactory(InstallConfig installConfig) { + this.installConfig = installConfig; + } + + public VersionManagerClient getClient(VersionManagerType type) { + if (type == VersionManagerType.FNM) { + return new FnmClient(installConfig); + } else if (type == VersionManagerType.NVM) { + return new NvmClient(installConfig); + } else if (type == VersionManagerType.NVS) { + return new NvsClient(installConfig); + } else if (type == VersionManagerType.MISE) { + return new MiseClient(installConfig); + } else if (type == VersionManagerType.ASDF) { + return new AsdfClient(installConfig); + } + + throw new RuntimeException(String.format("Version manager (%s) type is not implemented", type)); + } +}