Skip to content

Commit

Permalink
Add node 18 support (#197)
Browse files Browse the repository at this point in the history
* Add node 18 to CI matrix

* Upgrade webpack to 5.61.0

Node.js uses OpenSSL version 3 by default since v17. OpenSSL version 3 doesn't enable the MD4 algorithm support which is used by webpack to generate file hashes.
Webpack 5.61.0 implemented MD4 using web assembly.

To support Node 18, Upgrading webpack to version >= 5.61 is required is
required.

More info: https://sebhastian.com/error-0308010c-digital-envelope-routines-unsupported/

* Update build script by replacing npm with yarn

* Update dev and lint script by replacing npm with yarn
  • Loading branch information
ahangarha committed Sep 1, 2023
1 parent ec1d6e5 commit a03a789
Show file tree
Hide file tree
Showing 6 changed files with 384 additions and 1,278 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^26.2.2",
"raw-loader": "^4.0.2",
"webpack": "^4.44.1",
"webpack": "^5.61.0",
"webpack-merge": "^5.8.0"
}
}
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

$(npm bin)/babel \
$(yarn bin)/babel \
--out-dir lib \
src
2 changes: 1 addition & 1 deletion scripts/dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

$(npm bin)/babel \
$(yarn bin)/babel \
--out-dir lib \
--watch \
src
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

$(npm bin)/eslint \
$(yarn bin)/eslint \
--ext .js,.jsx \
.
Loading

0 comments on commit a03a789

Please sign in to comment.