diff --git a/.github/matrix.json b/.github/matrix.json index 81e37ac5f94b..447b8eca62fe 100644 --- a/.github/matrix.json +++ b/.github/matrix.json @@ -1,5 +1,6 @@ { "postgresql": ["12"], "ruby": ["2.7"], - "node": ["14"] + "node": ["16"], + "npm": ["6"] } diff --git a/.github/workflows/foreman.yml b/.github/workflows/foreman.yml index 674ba4eced85..84c1299ab1b6 100644 --- a/.github/workflows/foreman.yml +++ b/.github/workflows/foreman.yml @@ -91,6 +91,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + - name: "Install npm ${{ matrix.npm }}" + run: npm install -g npm@${{ matrix.npm }} - name: Setup NPM Cache uses: actions/cache@v4 with: diff --git a/.github/workflows/js_tests.yml b/.github/workflows/js_tests.yml index 7501009fb3e6..b5de0af68386 100644 --- a/.github/workflows/js_tests.yml +++ b/.github/workflows/js_tests.yml @@ -46,6 +46,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + - name: "Install npm ${{ matrix.npm }}" + run: npm install -g npm@${{ matrix.npm }} - name: Generate npm dependencies package-lock run: npm install --package-lock-only --no-audit - name: Install npm dependencies diff --git a/.github/workflows/plugins_react_tests.yml b/.github/workflows/plugins_react_tests.yml index 09615b630b27..c3abd3e798a5 100644 --- a/.github/workflows/plugins_react_tests.yml +++ b/.github/workflows/plugins_react_tests.yml @@ -47,6 +47,8 @@ jobs: node-version: ${{ matrix.node }} # We could update the postinstall action for foreman to look for an environment variable for plugin webpack dirs # before kicking off the ruby script to find them, this would eliminate the ruby dep and running `npm install` in plugins. + - name: "Install npm ${{ matrix.npm }}" + run: npm install -g npm@${{ matrix.npm }} - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} diff --git a/Dockerfile b/Dockerfile index b5e8fe1571dc..888601e4236b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Base container that is used for both building and running the app FROM quay.io/centos/centos:stream8 as base ARG RUBY_VERSION="2.7" -ARG NODEJS_VERSION="14" +ARG NODEJS_VERSION="16" ENV FOREMAN_FQDN=foreman.example.com ENV FOREMAN_DOMAIN=example.com diff --git a/developer_docs/foreman_dev_setup.asciidoc b/developer_docs/foreman_dev_setup.asciidoc index 70b9e4894d94..a6e701ca7b96 100644 --- a/developer_docs/foreman_dev_setup.asciidoc +++ b/developer_docs/foreman_dev_setup.asciidoc @@ -8,7 +8,7 @@ Foreman will run with the following requirements (aside from rubygem dependencies): * Ruby 2.7.x -* NodeJS 14 +* NodeJS 16.x * NPM 6.x * PostgreSQL 13 diff --git a/package.json b/package.json index 3c3e2a1da234..1feb12e4fada 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "description": "Foreman isn't really a node module, these are just dependencies needed to build the webpack bundle. 'dependencies' are the asset libraries in use and 'devDependencies' are used for the build process.", "private": true, "engines": { - "node": ">14.0.0 <16.0.0" + "node": "^16.0.0", + "npm": "^6.0.0" }, "scripts": { "lint": "tfm-lint", @@ -25,6 +26,7 @@ "graphql-tag": "^2.11.0", "intl": "~1.2.5", "jed": "^1.1.1", + "npm": "^6.14.18", "os-browserify": "^0.3.0", "react-intl": "^2.8.0" }, @@ -55,7 +57,6 @@ "pretty-format": "26.6.2", "raw-loader": "^0.5.1", "react-dnd-test-backend": "^9.4.0", - "react-dnd-test-utils": "^9.4.0", "react-remarkable": "^1.1.3", "redux-mock-store": "^1.2.2", "sass": "~1.60.0",