feat: update to Node.js 18

This commit is contained in:
Dragory 2023-04-29 20:43:35 +03:00
parent fefa5649b7
commit 658300fcac
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
7 changed files with 13 additions and 63 deletions

2
.nvmrc
View file

@ -1 +1 @@
16 18

View file

@ -36,7 +36,6 @@
"moment-timezone": "^0.5.21", "moment-timezone": "^0.5.21",
"multer": "^1.4.3", "multer": "^1.4.3",
"mysql": "^2.16.0", "mysql": "^2.16.0",
"node-fetch": "^2.6.7",
"parse-color": "^1.0.0", "parse-color": "^1.0.0",
"passport": "^0.4.0", "passport": "^0.4.0",
"passport-custom": "^1.0.5", "passport-custom": "^1.0.5",
@ -68,8 +67,7 @@
"@types/lodash.at": "^4.6.3", "@types/lodash.at": "^4.6.3",
"@types/moment-timezone": "^0.5.6", "@types/moment-timezone": "^0.5.6",
"@types/multer": "^1.4.7", "@types/multer": "^1.4.7",
"@types/node": "^14.0.14", "@types/node": "^18.16.3",
"@types/node-fetch": "^2.5.12",
"@types/passport": "^1.0.0", "@types/passport": "^1.0.0",
"@types/passport-oauth2": "^1.4.8", "@types/passport-oauth2": "^1.4.8",
"@types/passport-strategy": "^0.2.35", "@types/passport-strategy": "^0.2.35",
@ -807,19 +805,9 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "14.18.42", "version": "18.16.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.42.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
"integrity": "sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg==" "integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
},
"node_modules/@types/node-fetch": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
"integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dev": true,
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
}
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
"version": "2.4.1", "version": "2.4.1",
@ -4228,20 +4216,6 @@
"node": "*" "node": "*"
} }
}, },
"node_modules/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dev": true,
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": { "node_modules/forwarded": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@ -11638,19 +11612,9 @@
} }
}, },
"@types/node": { "@types/node": {
"version": "14.18.42", "version": "18.16.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.42.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.3.tgz",
"integrity": "sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg==" "integrity": "sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q=="
},
"@types/node-fetch": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
"integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dev": true,
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
}
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
"version": "2.4.1", "version": "2.4.1",
@ -14482,17 +14446,6 @@
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw=="
}, },
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dev": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"forwarded": { "forwarded": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",

View file

@ -55,7 +55,6 @@
"moment-timezone": "^0.5.21", "moment-timezone": "^0.5.21",
"multer": "^1.4.3", "multer": "^1.4.3",
"mysql": "^2.16.0", "mysql": "^2.16.0",
"node-fetch": "^2.6.7",
"parse-color": "^1.0.0", "parse-color": "^1.0.0",
"passport": "^0.4.0", "passport": "^0.4.0",
"passport-custom": "^1.0.5", "passport-custom": "^1.0.5",
@ -87,8 +86,7 @@
"@types/lodash.at": "^4.6.3", "@types/lodash.at": "^4.6.3",
"@types/moment-timezone": "^0.5.6", "@types/moment-timezone": "^0.5.6",
"@types/multer": "^1.4.7", "@types/multer": "^1.4.7",
"@types/node": "^14.0.14", "@types/node": "^18.16.3",
"@types/node-fetch": "^2.5.12",
"@types/passport": "^1.0.0", "@types/passport": "^1.0.0",
"@types/passport-oauth2": "^1.4.8", "@types/passport-oauth2": "^1.4.8",
"@types/passport-strategy": "^0.2.35", "@types/passport-strategy": "^0.2.35",

View file

@ -1,6 +1,5 @@
import crypto from "crypto"; import crypto from "crypto";
import moment from "moment-timezone"; import moment from "moment-timezone";
import fetch, { Headers } from "node-fetch";
import { getRepository, Repository } from "typeorm"; import { getRepository, Repository } from "typeorm";
import { env } from "../env"; import { env } from "../env";
import { DAYS, DBDateFormat, HOURS, MINUTES } from "../utils"; import { DAYS, DBDateFormat, HOURS, MINUTES } from "../utils";

View file

@ -291,7 +291,7 @@ connect().then(async () => {
return Array.from(plugins.keys()).filter((pluginName) => { return Array.from(plugins.keys()).filter((pluginName) => {
if (basePluginNames.includes(pluginName)) return true; if (basePluginNames.includes(pluginName)) return true;
return configuredPlugins[pluginName] && configuredPlugins[pluginName].enabled !== false; return configuredPlugins[pluginName] && (configuredPlugins[pluginName] as any).enabled !== false;
}); });
}, },

View file

@ -20,8 +20,8 @@ RUN echo "ubuntu:${DOCKER_DEV_SSH_PASSWORD}" | chpasswd
RUN mkdir -p /home/ubuntu/zeppelin /home/ubuntu/.vscode-remote /home/ubuntu/.vscode-server /home/ubuntu/.cache/JetBrains RUN mkdir -p /home/ubuntu/zeppelin /home/ubuntu/.vscode-remote /home/ubuntu/.vscode-server /home/ubuntu/.cache/JetBrains
RUN chown -R ubuntu /home/ubuntu RUN chown -R ubuntu /home/ubuntu
# Install Node.js 16 and packages needed to build native packages # Install Node.js 18 and packages needed to build native packages
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs gcc g++ make python3 RUN apt-get install -y nodejs gcc g++ make python3
CMD /usr/sbin/sshd -D -e CMD /usr/sbin/sshd -D -e

View file

@ -1,4 +1,4 @@
FROM node:16.16 FROM node:18
ARG DOCKER_USER_UID ARG DOCKER_USER_UID
ARG DOCKER_USER_GID ARG DOCKER_USER_GID