From e3ec22a6040f36176a0a80a6e4b49b0256ec5bce Mon Sep 17 00:00:00 2001 From: Manfred Touron <94029+moul@users.noreply.github.com> Date: Sat, 23 Jul 2022 07:43:47 +0000 Subject: [PATCH] chore: start updating npm deps Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com> --- .dockerignore | 3 +++ Dockerfile | 7 ++++--- web/package.json | 15 +++++++-------- web/tools/nodeVersionCheck.js | 10 ---------- 4 files changed, 14 insertions(+), 21 deletions(-) delete mode 100755 web/tools/nodeVersionCheck.js diff --git a/.dockerignore b/.dockerignore index 520e072a..476eb23f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,6 @@ Dockerfile dist/ vendor/ +web/node_modules/ +tool/lint/node_modules/ +.dockerignore diff --git a/Dockerfile b/Dockerfile index bef5c78d..29bd2cdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ ARG VERSION # web build -FROM node:10 as web-build +FROM node:14-alpine as web-build +RUN npm i -g npm@8 WORKDIR /app COPY ./web/package*.json ./web/yarn.* ./ RUN npm install @@ -14,7 +15,7 @@ RUN npm run build # go build -FROM golang:1.16.5-alpine as go-build +FROM golang:1.18-alpine as go-build RUN apk add --update --no-cache git gcc musl-dev make RUN GO111MODULE=off go get github.com/gobuffalo/packr/v2/packr2 WORKDIR /go/src/moul.io/depviz @@ -30,7 +31,7 @@ RUN make install # minimalist runtime -FROM alpine:3.13.5 +FROM alpine:3.16 LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.name="depviz" \ org.label-schema.description="" \ diff --git a/web/package.json b/web/package.json index 376eb4ab..bb81cef9 100755 --- a/web/package.json +++ b/web/package.json @@ -7,7 +7,6 @@ "npm": ">=3" }, "scripts": { - "preinstall": "node tools/nodeVersionCheck.js", "start-message": "babel-node tools/startMessage.js", "prestart": "npm run start-message", "start": "npm run open:src", @@ -31,7 +30,7 @@ "@hot-loader/react-dom": "16.13.0", "bitmap2vector": "0.0.4", "blob-to-buffer": "1.2.8", - "core-js": "3.6.5", + "core-js": "3.23.5", "cytoscape": "3.14.2", "cytoscape-cola": "2.3.1", "cytoscape-elk": "valohai/cytoscape.js-elk#modern", @@ -76,15 +75,15 @@ "dotenv-webpack": "1.7.0", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.2", - "eslint": "7.0.0", - "eslint-config-airbnb": "18.1.0", + "eslint": "8.2.0", + "eslint-config-airbnb": "19.0.4", "eslint-config-prettier": "6.11.0", - "eslint-plugin-import": "2.20.2", - "eslint-plugin-jsx-a11y": "6.2.3", + "eslint-plugin-import": "2.26.0", + "eslint-plugin-jsx-a11y": "6.5.1", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "4.2.1", - "eslint-plugin-react": "7.19.0", - "eslint-plugin-react-hooks": "4.1.2", + "eslint-plugin-react": "7.28.0", + "eslint-plugin-react-hooks": "4.6.0", "eslint-watch": "7.0.0", "file-loader": "6.0.0", "history": "5.0.0", diff --git a/web/tools/nodeVersionCheck.js b/web/tools/nodeVersionCheck.js deleted file mode 100755 index de6534e3..00000000 --- a/web/tools/nodeVersionCheck.js +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable */ -var exec = require('child_process').exec; - -exec('node -v', function (err, stdout) { - if (err) throw err; - - if (parseFloat(stdout.slice(1)) < 8) { - throw new Error('Depviz requires node 8.0 or greater.'); - } -});