diff --git a/image/Dockerfile b/image/Dockerfile index e79db7f6b..70e9869ee 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.12.0 as ui-builder COPY ui ui diff --git a/ui/Makefile b/ui/Makefile index e785ee854..d97e52e05 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,19 +20,19 @@ 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 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 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 ## 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/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); 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"