Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 47220b0

Browse files
authored
1x node v18 test and fixes (#5518)
* fix for webpack hash algo on node v18 * CI tests on node v18 * openssl legacy provider in tests for node >=17 * openssl-legacy-provider var * ci.sh env var fix * package json change revert
1 parent 1b42e65 commit 47220b0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646
strategy:
4747
matrix:
48-
node: [14, 16]
48+
node: [14, 16, 18]
4949
env:
5050
TEST: "unit"
5151
steps:
@@ -124,7 +124,7 @@ jobs:
124124
runs-on: ubuntu-latest
125125
strategy:
126126
matrix:
127-
node: [14, 16]
127+
node: [14, 16, 18]
128128
env:
129129
TEST: "eth2"
130130
steps:

scripts/ci.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# Exit immediately on error
88
set -o errexit
99

10+
[[ "$(node -v | cut -c 2-3)" -ge 17 ]] && export NODE_OPTIONS=--openssl-legacy-provider;
11+
1012
if [ "$TEST" = "unit" ]; then
1113

1214
npm run build

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
const path = require("path");
22
const webpack = require("webpack");
33
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
4+
// https://github.com/webpack/webpack/issues/13572#issuecomment-923736472
5+
const crypto = require("crypto");
6+
const crypto_createHash_alg = crypto.createHash;
7+
crypto.createHash = (algorithm, options ) => crypto_createHash_alg(algorithm == "md4" ? "sha256" : algorithm, options);
48

59
module.exports = {
610
mode: "production",

0 commit comments

Comments
 (0)