Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/fix: namor upgrade v3 #1085

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 ##
Expand All @@ -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 ##
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/utils/cluster.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Loading