diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c8861983e8..7d9e064e8ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14, 16] + node: [14, 16, 18] env: TEST: "unit" steps: @@ -124,7 +124,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14, 16] + node: [14, 16, 18] env: TEST: "eth2" steps: diff --git a/scripts/ci.sh b/scripts/ci.sh index b3b23bcedb7..bed14c88849 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -7,6 +7,8 @@ # Exit immediately on error set -o errexit +[[ "$(node -v | cut -c 2-3)" -ge 17 ]] && export NODE_OPTIONS=--openssl-legacy-provider; + if [ "$TEST" = "unit" ]; then npm run build diff --git a/webpack.config.js b/webpack.config.js index def67b2e0cf..1b16d73ca1f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,10 @@ const path = require("path"); const webpack = require("webpack"); const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +// https://github.com/webpack/webpack/issues/13572#issuecomment-923736472 +const crypto = require("crypto"); +const crypto_createHash_alg = crypto.createHash; +crypto.createHash = (algorithm, options ) => crypto_createHash_alg(algorithm == "md4" ? "sha256" : algorithm, options); module.exports = { mode: "production",