Skip to content

Commit 716eb66

Browse files
authored
chore(web): upgrade dependencies [security] (#98)
1 parent db14b90 commit 716eb66

31 files changed

Lines changed: 29050 additions & 23364 deletions

File tree

.github/workflows/build_web.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ jobs:
3434
with:
3535
node-version: lts/*
3636
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
37+
- name: Enable Corepack
38+
run: corepack enable
3739
- name: Get yarn cache directory path
3840
id: yarn-cache-dir-path
39-
run: echo "::set-output name=dir::$(yarn cache dir)"
41+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
4042
- uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
4143
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
4244
with:
@@ -45,7 +47,7 @@ jobs:
4547
restore-keys: |
4648
${{ runner.os }}-yarn-
4749
- name: Install
48-
run: yarn install
50+
run: yarn install --immutable
4951
- name: Build
5052
run: yarn build
5153
- name: Pack

.github/workflows/ci_web.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ jobs:
1313
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
1414
with:
1515
node-version: lts/*
16+
- name: Enable Corepack
17+
run: corepack enable
1618
- name: Get yarn cache directory path
1719
id: yarn-cache-dir-path
18-
run: echo "::set-output name=dir::$(yarn cache dir)"
20+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
1921
- uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
2022
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2123
with:
@@ -24,7 +26,7 @@ jobs:
2426
restore-keys: |
2527
${{ runner.os }}-yarn-
2628
- name: Install
27-
run: yarn install
29+
run: yarn install --immutable
2830
- name: type
2931
run: yarn run type
3032
- name: eslint

.github/workflows/e2e.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ jobs:
1717
with:
1818
node-version: lts/*
1919
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
20+
- name: Enable Corepack
21+
run: corepack enable
2022
- name: Get yarn cache directory path
2123
id: yarn-cache-dir-path
22-
run: echo "::set-output name=dir::$(yarn cache dir)"
24+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
2325
- uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
2426
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
2527
with:
@@ -28,7 +30,7 @@ jobs:
2830
restore-keys: |
2931
${{ runner.os }}-yarn-
3032
- name: install
31-
run: yarn install
33+
run: yarn install --immutable
3234
- name: install playwright dependencies
3335
run: yarn run playwright install
3436
- name: E2E test

web/.yarn/install-state.gz

2.81 MB
Binary file not shown.

web/.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

web/bin/scan-yarn-lock.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env sh
2+
set -eu
3+
4+
# Find nearest ancestor yarn.lock
5+
find_up() {
6+
name="$1"; d="$PWD"
7+
while [ "$d" != "/" ]; do
8+
[ -f "$d/$name" ] && { printf '%s/%s\n' "$d" "$name"; return 0; }
9+
d=$(dirname "$d")
10+
done
11+
return 1
12+
}
13+
14+
LOCKFILE="${1:-$(find_up yarn.lock || true)}"
15+
[ -n "${LOCKFILE:-}" ] && [ -f "$LOCKFILE" ] || { echo "❌ yarn.lock not found"; exit 3; }
16+
17+
echo "Scanning: $LOCKFILE"
18+
19+
FOUND=0
20+
21+
# Read banned list WITHOUT using a pipe (avoids subshell)
22+
while IFS=' ' read -r name ver; do
23+
[ -z "${name:-}" ] && continue
24+
pat="resolution: \"${name}@npm:${ver}\""
25+
if grep -qF "$pat" "$LOCKFILE"; then
26+
FOUND=$((FOUND+1))
27+
# show where it matched for debugging
28+
grep -nF "$pat" "$LOCKFILE"
29+
fi
30+
done <<'EOF'
31+
ansi-styles 6.2.2
32+
debug 4.4.2
33+
chalk 5.6.1
34+
supports-color 10.2.1
35+
strip-ansi 7.1.1
36+
ansi-regex 6.2.1
37+
wrap-ansi 9.0.1
38+
color-convert 3.1.1
39+
color-name 2.0.1
40+
is-arrayish 0.3.3
41+
slice-ansi 7.1.1
42+
color 5.0.1
43+
color-string 2.1.1
44+
simple-swizzle 0.2.3
45+
supports-hyperlinks 4.1.1
46+
has-ansi 6.0.1
47+
chalk-template 1.1.1
48+
backslash 0.2.1
49+
EOF
50+
51+
if [ "$FOUND" -gt 0 ]; then
52+
echo "❌ Detected $FOUND banned resolution(s) in $LOCKFILE"
53+
exit 1
54+
else
55+
echo "✅ No banned resolutions found in $LOCKFILE"
56+
fi

web/package.json

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
"license": "Apache-2.0",
77
"type": "module",
88
"private": true,
9+
"resolutions": {
10+
"@apollo/client": "3.8.1",
11+
"@zip.js/zip.js": "2.7.48",
12+
"@cesium/engine": "9.0.0"
13+
},
914
"scripts": {
1015
"start": "yarn && vite",
1116
"test": "vitest",
@@ -25,7 +30,8 @@
2530
"gql:beta": "graphql-codegen",
2631
"gql:classic": "graphql-codegen -c codegen-classic.ts",
2732
"i18n": "i18next",
28-
"gen:doc:plugin": "ts-node -O '{\"module\":\"CommonJS\"}' ./bin/pluginDoc"
33+
"gen:doc:plugin": "ts-node -O '{\"module\":\"CommonJS\"}' ./bin/pluginDoc",
34+
"scan:lock": "sh ./bin/scan-yarn-lock.sh"
2935
},
3036
"engines": {
3137
"node": ">=20.11.0"
@@ -63,16 +69,16 @@
6369
"@types/js-md5": "0.7.1",
6470
"@types/lodash-es": "4.17.10",
6571
"@types/mapbox__vector-tile": "1.3.3",
66-
"@types/node": "20.8.10",
67-
"@types/react": "18.2.6",
68-
"@types/react-dom": "18.2.4",
72+
"@types/node": "22.13.14",
73+
"@types/react": "18.3.12",
74+
"@types/react-dom": "18.3.3",
6975
"@types/react-ga": "2.3.0",
7076
"@types/react-leaflet": "2.8.2",
7177
"@types/styled-components": "5.1.29",
7278
"@types/tinycolor2": "1.4.5",
7379
"@types/uuid": "9.0.6",
74-
"@vitejs/plugin-react-swc": "3.5.0",
75-
"@vitest/coverage-v8": "0.34.6",
80+
"@vitejs/plugin-react-swc": "3.7.1",
81+
"@vitest/coverage-v8": "1.6.1",
7682
"@welldone-software/why-did-you-render": "7.0.1",
7783
"del-cli": "5.1.0",
7884
"dotenv": "16.3.1",
@@ -81,31 +87,32 @@
8187
"eslint-plugin-playwright": "0.12.0",
8288
"eslint-plugin-storybook": "0.6.15",
8389
"husky": "8.0.3",
84-
"i18next-parser": "8.9.0",
90+
"i18next-parser": "9.3.0",
8591
"jsdom": "22.1.0",
8692
"lint-staged": "13.2.2",
8793
"npm-run-all": "4.1.5",
8894
"prettier": "2.8.8",
8995
"read-env": "2.0.0",
90-
"rollup": "4.2.0",
91-
"rollup-plugin-visualizer": "5.9.2",
96+
"rollup": "4.22.4",
97+
"rollup-plugin-visualizer": "6.0.3",
9298
"storybook": "7.5.2",
9399
"ts-node": "10.9.1",
94100
"type-fest": "4.6.0",
95101
"typescript": "5.0.4",
96102
"typescript-styled-plugin": "0.18.3",
97-
"vite": "5.0.8",
98-
"vite-plugin-cesium": "1.2.22",
99-
"vite-plugin-svgr": "4.2.0",
100-
"vite-tsconfig-paths": "4.2.1",
101-
"vitest": "1.0.4",
103+
"vite": "5.4.20",
104+
"vite-plugin-cesium": "1.2.23",
105+
"vite-plugin-svgr": "4.5.0",
106+
"vite-tsconfig-paths": "5.1.4",
107+
"vitest": "1.6.1",
102108
"web-streams-polyfill": "3.2.1"
103109
},
104110
"dependencies": {
105111
"@apollo/client": "3.8.1",
106112
"@auth0/auth0-react": "2.2.2",
107113
"@aws-amplify/ui-react": "5.3.1",
108114
"@carbon/colors": "11.20.1",
115+
"@cesium/engine": "9.0.0",
109116
"@emotion/react": "11.11.1",
110117
"@emotion/styled": "11.11.0",
111118
"@floating-ui/react": "0.24.7",
@@ -114,22 +121,20 @@
114121
"@monaco-editor/react": "4.6.0",
115122
"@popperjs/core": "2.11.8",
116123
"@reearth/cesium-mvt-imagery-provider": "1.5.4",
117-
"js-yaml": "4.1.0",
118124
"@reearth/core": "0.0.4",
119125
"@rot1024/use-transition": "1.0.0",
120-
"@sentry/browser": "7.77.0",
126+
"@sentry/browser": "7.119.1",
121127
"@seznam/compose-react-refs": "1.0.6",
122128
"@turf/turf": "6.5.0",
123129
"@types/d3": "7.4.3",
124130
"@types/escape-string-regexp": "2.0.1",
125-
"@types/proj4": "^2.5.5",
126131
"@ungap/event-target": "0.2.4",
127132
"@xstate/react": "3.2.1",
128133
"apollo-link-sentry": "3.2.3",
129134
"apollo-upload-client": "17.0.0",
130135
"array-move": "4.0.0",
131136
"aws-amplify": "5.3.11",
132-
"axios": "1.6.0",
137+
"axios": "1.12.0",
133138
"cesium": "1.116.0",
134139
"cesium-dnd": "1.1.0",
135140
"cesium-mvt-imagery-provider": "1.4.0",
@@ -146,14 +151,15 @@
146151
"framer-motion": "10.18.0",
147152
"github-markdown-css": "5.4.0",
148153
"graphiql": "2.4.4",
149-
"graphql": "16.6.0",
154+
"graphql": "16.8.1",
150155
"i18next": "22.4.15",
151156
"i18next-browser-languagedetector": "7.0.1",
152157
"jotai": "1.12.1",
153158
"js-file-download": "0.4.12",
154159
"js-md5": "0.7.3",
160+
"js-yaml": "4.1.0",
155161
"jsep": "1.3.8",
156-
"jsonpath-plus": "7.2.0",
162+
"jsonpath-plus": "10.3.0",
157163
"jszip": "3.10.1",
158164
"leaflet": "1.9.4",
159165
"lexical": "0.12.2",
@@ -164,18 +170,18 @@
164170
"moment-timezone": "0.5.43",
165171
"parse-domain": "7.0.1",
166172
"proj4": "2.11.0",
167-
"protomaps": "^1.23.1",
173+
"protomaps": "1.23.1",
168174
"quickjs-emscripten": "0.23.0",
169175
"quickjs-emscripten-sync": "1.5.2",
170176
"rc-slider": "9.7.5",
171-
"react": "18.2.0",
177+
"react": "18.3.1",
172178
"react-accessible-accordion": "5.0.0",
173179
"react-align": "2.2.2",
174180
"react-beautiful-dnd": "13.1.1",
175181
"react-colorful": "5.6.1",
176182
"react-dnd": "16.0.1",
177183
"react-dnd-html5-backend": "16.0.1",
178-
"react-dom": "18.2.0",
184+
"react-dom": "18.3.1",
179185
"react-dropzone": "14.2.3",
180186
"react-error-boundary": "4.0.11",
181187
"react-ga": "3.3.1",
@@ -193,13 +199,14 @@
193199
"react18-json-view": "0.2.7",
194200
"remark-gfm": "3.0.1",
195201
"resium": "1.17.3",
196-
"suspend-react": "^0.1.3",
202+
"suspend-react": "0.1.3",
197203
"tinycolor2": "1.6.0",
198204
"ts-easing": "0.2.0",
199205
"use-callback-ref": "1.3.0",
200206
"use-custom-compare": "1.4.0",
201207
"use-file-input": "1.0.0",
202208
"uuid": "9.0.1",
203209
"xstate": "4.38.2"
204-
}
210+
},
211+
"packageManager": "yarn@4.10.2"
205212
}

web/src/beta/components/Accordion/index.test.tsx

Lines changed: 0 additions & 42 deletions
This file was deleted.

web/src/beta/components/TabButton/index.test.tsx

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)