From 21eed268d70d59d36d1d2b8741a22271e40e28d1 Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Tue, 28 Nov 2023 10:19:50 +0100 Subject: [PATCH 1/4] fix namor deprecation saltLength -> salt --- ui/src/utils/cluster.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/utils/cluster.utils.ts b/ui/src/utils/cluster.utils.ts index 863efb1ec..a7b826c98 100644 --- a/ui/src/utils/cluster.utils.ts +++ b/ui/src/utils/cluster.utils.ts @@ -14,7 +14,7 @@ export function generateClusterName(username = ''): string { const datePart = today.toISOString().slice(5, 10); // finally, get a random 3-part string of real words - const randomPart = namor.generate({ words: 3, saltLength: 0 }); + const randomPart = namor.generate({ words: 3, salt: 0 }); // prepare to combine, but filter any empty part (only one that should ever be empty is user string) const nameArray = [userPart, datePart, randomPart].filter(Boolean); From 70a380fdd41d2fef947b988da60427f16e711ebf Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Tue, 28 Nov 2023 13:16:33 +0100 Subject: [PATCH 2/4] casual node 18 upgrade --- image/Dockerfile | 2 +- ui/Makefile | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/image/Dockerfile b/image/Dockerfile index e79db7f6b..bfcc8d652 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN make server cli -FROM node:16.20.2 as ui-builder +FROM node:18 as ui-builder COPY ui ui diff --git a/ui/Makefile b/ui/Makefile index e785ee854..2d030401f 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -7,7 +7,7 @@ all: deps lint-check test build .PHONY: deps deps: package.json - yarn install --frozen-lockfile + NODE_OPTIONS=--openssl-legacy-provider yarn install --frozen-lockfile SOURCES := $(shell ls *.json) tailwind.config.js yarn.lock SOURCES += $(shell find public) @@ -20,7 +20,7 @@ SOURCES += $(shell find src -name '*.css' -print) .PHONY: build build: deps $(SOURCES) @echo "+ $@" - yarn build + NODE_OPTIONS=--openssl-legacy-provider yarn build # checks that files respect linting / formatting rules (primary used in CI) .PHONY: lint-check @@ -32,7 +32,7 @@ lint-check: deps $(SOURCES) .PHONY: test test: deps $(SOURCES) @echo "+ $@" - yarn test --watchAll=false + NODE_OPTIONS=--openssl-legacy-provider yarn test --watchAll=false ################# ## Development ## @@ -42,26 +42,26 @@ test: deps $(SOURCES) .PHONY: start start-dev-server: deps @echo "+ $@" - yarn start + NODE_OPTIONS=--openssl-legacy-provider yarn start # generates sources (e.g. API client). Right now it does depend on some resources generated by the # root Makefile (e.g. Swagger definitions) .PHONY: gen-src gen-src: @echo "+ $@" - yarn gen:src + NODE_OPTIONS=--openssl-legacy-provider yarn gen:src # attempts to lint / format files where it's possible to do automatically (it'll change the files) .PHONY: lint lint: deps $(SOURCES) @echo "+ $@" - yarn lint + NODE_OPTIONS=--openssl-legacy-provider yarn lint # runs unit tests in an interactive watch mode .PHONY: test-watch test-watch: deps $(SOURCES) @echo "+ $@" - yarn test + NODE_OPTIONS=--openssl-legacy-provider yarn test ########## ## Misc ## From 28700cfc3f03025778c5200b3d6ca5ed3b2774bd Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Mon, 4 Dec 2023 11:40:20 +0100 Subject: [PATCH 3/4] upgrade namor to 3.0.1 (the broken version) --- ui/package.json | 2 +- ui/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/package.json b/ui/package.json index cd2939d6f..bae8ad36b 100644 --- a/ui/package.json +++ b/ui/package.json @@ -30,7 +30,7 @@ "history": "^5.0.1", "lodash": "^4.17.21", "moment": "^2.29.4", - "namor": "^2.0.3", + "namor": "^3.0.1", "prop-types": "^15.8.1", "react": "^17.0.1", "react-dom": "^17.0.1", diff --git a/ui/yarn.lock b/ui/yarn.lock index bf9f318dc..f3874c75e 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -8659,10 +8659,10 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" -namor@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/namor/-/namor-2.0.3.tgz#a42c5e76f6170f9e2fc4ddfc6d403a881f59350d" - integrity sha512-BDDfplXUwxcEK1QAwL0k82VyqYyAa3xdQv24ijfLc+5Zqdm3IyfAIBTCRWhKPbbLncmdvG/vCr9JhrVH9FGpNQ== +namor@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/namor/-/namor-3.0.1.tgz#1e9338587bc395a2f83937bebb5a7c069abe1a92" + integrity sha512-DuXHrPcpgSe9p/P7xS+8JdcHNasd6/eyOYa6oKSLK/Lx0tqrdzUIcWhF2HgtoFvZmoSILjzMJeWBo3Lt7T8F8A== dependencies: crypto-extra "1.0.1" From 680bdfbd77d8b33ab4366610a0c961b8fe2c5bff Mon Sep 17 00:00:00 2001 From: Tom Martensen Date: Mon, 4 Dec 2023 11:41:26 +0100 Subject: [PATCH 4/4] . --- image/Dockerfile | 2 +- ui/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/image/Dockerfile b/image/Dockerfile index bfcc8d652..70e9869ee 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN make server cli -FROM node:18 as ui-builder +FROM node:18.12.0 as ui-builder COPY ui ui diff --git a/ui/Makefile b/ui/Makefile index 2d030401f..d97e52e05 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -26,7 +26,7 @@ build: deps $(SOURCES) .PHONY: lint-check lint-check: deps $(SOURCES) @echo "+ $@" - yarn lint-check + NODE_OPTIONS=--openssl-legacy-provider yarn lint-check # runs unit tests in a non-interactive mode (w/o watching) .PHONY: test