Skip to content

Commit

Permalink
ci(deps): dedupe yarn.lock, add check for dupes (#11637)
Browse files Browse the repository at this point in the history
  • Loading branch information
agilgur5 authored Aug 28, 2023
1 parent 8e26eb4 commit 74551e3
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 633 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ jobs:
- run: yarn --cwd ui build
- run: yarn --cwd ui test
- run: yarn --cwd ui lint
- run: yarn --cwd ui deduplicate
- run: git diff --exit-code
# check to see if it'll start (but not if it'll render)
- run: yarn --cwd ui start &
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ ui/dist/app/index.html: $(shell find ui/src -type f && find ui -maxdepth 1 -type
$(GOPATH)/bin/staticfiles:
# update this in Nix when updating it here
ifneq ($(USE_NIX), true)
go install bou.ke/staticfiles@dd04075
go install bou.ke/staticfiles@dd04075
endif

ifeq ($(STATIC_FILES),true)
Expand Down Expand Up @@ -456,6 +456,8 @@ lint: server/static/files.go $(GOPATH)/bin/golangci-lint
$(GOPATH)/bin/golangci-lint run --fix --verbose
# Lint the UI
if [ -e ui/node_modules ]; then yarn --cwd ui lint ; fi
# Deduplicate Node modules
if [ -e ui/node_modules ]; then yarn --cwd ui deduplicate ; fi

# for local we have a faster target that prints to stdout, does not use json, and can cache because it has no coverage
.PHONY: test
Expand Down Expand Up @@ -698,7 +700,7 @@ docs-linkcheck: /usr/local/bin/markdown-link-check
/usr/local/bin/markdownlint:
# update this in Nix when upgrading it here
ifneq ($(USE_NIX), true)
npm i -g markdownlint-cli@0.33.0
npm i -g markdownlint-cli@0.33.0
endif


Expand Down
8 changes: 5 additions & 3 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build": "rm -Rf dist && NODE_OPTIONS='--openssl-legacy-provider' NODE_ENV=production webpack --mode production --config ./src/app/webpack.config.js",
"start": "NODE_OPTIONS='--no-experimental-fetch --openssl-legacy-provider' webpack-dev-server --config ./src/app/webpack.config.js",
"lint": "tslint --fix -p ./src/app",
"test": "jest"
"test": "jest",
"deduplicate": "yarn-deduplicate -s fewer yarn.lock"
},
"engines": {
"node": ">=20"
Expand Down Expand Up @@ -73,7 +74,7 @@
"source-map-loader": "^1.1.3",
"style-loader": "^1.3.0",
"ts-jest": "^26.4.4",
"ts-loader": "^7.0.4",
"ts-loader": "^8.4.0",
"ts-node": "^9.1.1",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
Expand All @@ -82,7 +83,8 @@
"typescript": "^4.6.4",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.0"
"webpack-dev-server": "^4.15.0",
"yarn-deduplicate": "^6.0.2"
},
"resolutions": {
"semver": "^7.5.2"
Expand Down
Loading

0 comments on commit 74551e3

Please sign in to comment.