Skip to content

Commit

Permalink
Update frontend deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zer0tonin committed Jun 16, 2023
1 parent 50a184f commit 4b34895
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 40 deletions.
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:19-alpine
FROM node:20-alpine

WORKDIR /app

Expand Down
45 changes: 13 additions & 32 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider preact build",
"build": "preact build",
"serve": "sirv build --port 5000 --cors --single --host 0.0.0.0",
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider preact watch -p 5000",
"dev": "preact watch -p 5000",
"lint": "eslint src",
"fix-lint": "eslint --fix src",
"test": "jest",
Expand All @@ -23,23 +23,22 @@
]
},
"devDependencies": {
"cross-env": "^7.0.3",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^4.0.0",
"eslint": "^8.30.0",
"eslint-config-preact": "^1.3.0",
"eslint-config-prettier": "^8.8.0",
"jest": "^27.0.0",
"jest-preset-preact": "^4.0.5",
"preact-cli": "^3.4.2",
"preact-cli": "^3.4.5",
"prettier": "2.8.7",
"sirv-cli": "^2.0.2",
"unimported": "^1.26.0"
},
"dependencies": {
"preact": "^10.11.3",
"preact-render-to-string": "^5.2.6",
"preact-router": "^3.2.1"
"preact": "^10.15.1",
"preact-render-to-string": "5.1.9",
"preact-router": "^4.1.1"
},
"jest": {
"preset": "jest-preset-preact",
Expand Down
15 changes: 15 additions & 0 deletions frontend/preact.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const crypto = require("crypto");

/**
* md4 algorithm is not available anymore in NodeJS 17+ (because of lib SSL 3).
* In that case, silently replace md4 by md5 algorithm.
*/
try {
crypto.createHash('md4');
} catch (e) {
console.warn('Crypto "md4" is not supported anymore by this Node version');
const origCreateHash = crypto.createHash;
crypto.createHash = (alg, opts) => {
return origCreateHash(alg === 'md4' ? 'md5' : alg, opts);
};
}

0 comments on commit 4b34895

Please sign in to comment.