Skip to content

Commit e1e0d95

Browse files
authored
Merge pull request #117 from reearth/deps/update-dependencies-security-fixes
chore: Deps/update dependencies security fixes
2 parents 7a469f7 + 968aeda commit e1e0d95

67 files changed

Lines changed: 4054 additions & 2545 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ rules:
1818
order: asc
1919
caseInsensitive: true
2020
"@typescript-eslint/no-explicit-any":
21-
- warn
21+
- off

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
name: Lint and Test
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
13+
- uses: actions/checkout@v6
14+
- uses: actions/setup-node@v6
1515
with:
1616
node-version: lts/*
1717
- name: Get yarn cache directory path
1818
id: yarn-cache-dir-path
1919
run: echo "path=$(yarn cache dir)" >> $GITHUB_OUTPUT
20-
- uses: actions/cache@v3
20+
- uses: actions/cache@v5
2121
with:
2222
path: ${{ steps.yarn-cache-dir-path.outputs.path }}
2323
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

.github/workflows/npm_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ jobs:
2121
release:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2525
with:
2626
token: ${{ secrets.PAT }}
27-
- uses: actions/setup-node@v3
27+
- uses: actions/setup-node@v6
2828
with:
2929
node-version: lts/*
3030
- name: Get yarn cache directory path
3131
id: yarn-cache-dir-path
3232
run: echo "path=$(yarn cache dir)" >> $GITHUB_OUTPUT
33-
- uses: actions/cache@v3
33+
- uses: actions/cache@v5
3434
with:
3535
path: ${{ steps.yarn-cache-dir-path.outputs.path }}
3636
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ lerna-debug.log*
1010
node_modules
1111
dist
1212
dist-ssr
13+
storybook-static
1314
*.local
1415

1516
# Editor directories and files

.storybook/main.ts

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,62 @@
11
import type { StorybookConfig } from "@storybook/react-vite";
2+
import type { InlineConfig } from "vite";
23

34
const config: StorybookConfig = {
45
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
6+
57
addons: [
68
"@storybook/addon-onboarding",
79
"@storybook/addon-links",
8-
"@storybook/addon-essentials",
910
"@chromatic-com/storybook",
10-
"@storybook/addon-interactions",
11+
"@storybook/addon-docs"
1112
],
13+
1214
framework: {
1315
name: "@storybook/react-vite",
1416
options: {
1517
},
1618
},
17-
docs: {
18-
autodocs: "tag",
19+
20+
async viteFinal(config: InlineConfig) {
21+
// Dynamically import cesium plugin
22+
const { default: cesium } = await import("vite-plugin-cesium");
23+
const { readFileSync } = await import("fs");
24+
const { resolve } = await import("path");
25+
const { fileURLToPath } = await import("url");
26+
27+
const __dirname = fileURLToPath(new URL(".", import.meta.url));
28+
const cesiumPackageJson = JSON.parse(
29+
readFileSync(resolve(__dirname, "..", "node_modules", "cesium", "package.json"), "utf-8"),
30+
);
31+
32+
return {
33+
...config,
34+
plugins: [
35+
...(config.plugins || []),
36+
cesium({ cesiumBaseUrl: `cesium-${cesiumPackageJson.version}/` }),
37+
],
38+
resolve: {
39+
...config.resolve,
40+
alias: {
41+
...config.resolve?.alias,
42+
// Alias nosleep.js to its dist file which has proper exports
43+
'nosleep.js': resolve(__dirname, '..', 'node_modules', 'nosleep.js', 'dist', 'NoSleep.js'),
44+
},
45+
},
46+
optimizeDeps: {
47+
...config.optimizeDeps,
48+
// Exclude Cesium from optimization due to worker files
49+
exclude: [
50+
...(config.optimizeDeps?.exclude || []),
51+
'cesium',
52+
],
53+
// Keep resium included
54+
include: [
55+
...(config.optimizeDeps?.include || []),
56+
'resium',
57+
],
58+
},
59+
};
1960
},
2061
};
2162
export default config;

example/components/ui/button.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ const buttonVariants = cva(
3232
);
3333

3434
export interface ButtonProps
35-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
36-
VariantProps<typeof buttonVariants> {
35+
extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
3736
asChild?: boolean;
3837
}
3938

package.json

Lines changed: 69 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -33,103 +33,100 @@
3333
"react-dom": "^19.0.0"
3434
},
3535
"dependencies": {
36-
"@radix-ui/react-checkbox": "1.3.3",
37-
"@radix-ui/react-dialog": "1.1.15",
38-
"@radix-ui/react-icons": "1.3.2",
39-
"@radix-ui/react-select": "2.2.6",
40-
"@radix-ui/react-separator": "1.1.8",
41-
"@radix-ui/react-slider": "1.3.6",
42-
"@radix-ui/react-slot": "1.2.4",
43-
"@radix-ui/react-switch": "1.2.6",
44-
"@radix-ui/react-toggle": "1.1.10",
36+
"@radix-ui/react-checkbox": "^1.3.3",
37+
"@radix-ui/react-dialog": "^1.1.15",
38+
"@radix-ui/react-icons": "^1.3.2",
39+
"@radix-ui/react-select": "^2.2.6",
40+
"@radix-ui/react-separator": "^1.1.8",
41+
"@radix-ui/react-slider": "^1.3.6",
42+
"@radix-ui/react-slot": "^1.2.4",
43+
"@radix-ui/react-switch": "^1.2.6",
44+
"@radix-ui/react-toggle": "^1.1.10",
4545
"@reearth/cesium-mvt-imagery-provider": "1.6.1",
4646
"@reearth/spatial-id-sdk": "0.0.0",
4747
"@rot1024/use-transition": "1.0.0",
4848
"@seznam/compose-react-refs": "1.0.6",
49-
"@turf/invariant": "6.5.0",
50-
"@turf/turf": "6.5.0",
51-
"@types/proj4": "2.5.6",
49+
"@turf/invariant": "^7.3.3",
50+
"@turf/turf": "^7.3.3",
5251
"@ungap/event-target": "0.2.4",
5352
"@xstate/react": "3.2.1",
5453
"cesium-dnd": "1.1.0",
55-
"csv-parse": "5.5.2",
56-
"d3": "7.9.0",
57-
"fast-xml-parser": "4.3.2",
58-
"framer-motion": "11.0.27",
54+
"csv-parse": "^6.1.0",
55+
"d3": "^7.9.0",
56+
"fast-xml-parser": "^5.3.3",
57+
"framer-motion": "^12.29.2",
5958
"geojson": "0.5.0",
6059
"jotai": "1.12.1",
61-
"js-md5": "0.7.3",
62-
"jsep": "1.4.0",
63-
"jsonpath-plus": "10.3.0",
64-
"jszip": "3.10.1",
65-
"lodash-es": "4.17.21",
66-
"lru-cache": "8.0.4",
67-
"pbf": "3.2.1",
68-
"proj4": "2.20.2",
60+
"js-md5": "^0.8.3",
61+
"jsep": "^1.4.0",
62+
"jsonpath-plus": "^10.3.0",
63+
"jszip": "^3.10.1",
64+
"lodash-es": "^4.17.23",
65+
"lru-cache": "^11.2.5",
66+
"pbf": "^4.0.1",
67+
"proj4": "^2.20.2",
6968
"protomaps": "1.23.1",
7069
"react-dnd": "16.0.1",
7170
"react-dnd-html5-backend": "16.0.1",
72-
"react-error-boundary": "4.0.11",
71+
"react-error-boundary": "^6.1.0",
7372
"react-nl2br": "1.0.4",
74-
"react-use": "17.6.0",
75-
"resium": "1.18.4",
73+
"react-use": "^17.6.0",
74+
"resium": "^1.19.3",
7675
"suspend-react": "0.1.3",
77-
"tailwind-merge": "2.5.2",
78-
"tailwindcss": "3.4.10",
79-
"tailwindcss-animate": "1.0.7",
76+
"tailwind-merge": "^2.5.5",
77+
"tailwindcss": "^3.4.17",
78+
"tailwindcss-animate": "^1.0.7",
8079
"tiny-invariant": "1.3.3",
8180
"use-callback-ref": "1.3.3",
8281
"use-custom-compare": "1.5.0",
83-
"uuid": "9.0.1",
82+
"uuid": "^13.0.0",
8483
"xstate": "4.38.2"
8584
},
8685
"devDependencies": {
87-
"@apollo/client": "3.8.1",
88-
"@chromatic-com/storybook": "^1.3.3",
89-
"@emotion/jest": "11.11.0",
90-
"@storybook/addon-essentials": "8.4.7",
91-
"@storybook/addon-interactions": "8.4.7",
92-
"@storybook/addon-links": "8.4.7",
93-
"@storybook/addon-onboarding": "8.4.7",
94-
"@storybook/blocks": "8.4.7",
95-
"@storybook/react": "8.4.7",
96-
"@storybook/react-vite": "8.4.7",
97-
"@storybook/test": "8.4.7",
98-
"@testing-library/jest-dom": "6.1.4",
99-
"@testing-library/react": "14.0.0",
100-
"@types/d3": "7.4.3",
101-
"@types/geojson": "7946.0.16",
102-
"@types/js-md5": "0.8.0",
103-
"@types/lodash-es": "4.17.12",
104-
"@types/node": "20.17.15",
105-
"@types/pbf": "3.0.5",
106-
"@types/react": "19.0.0",
107-
"@types/react-dom": "19.0.0",
108-
"@types/scheduler": "0.23.0",
109-
"@types/uuid": "9.0.8",
110-
"@vitejs/plugin-react": "4.2.1",
86+
"@apollo/client": "^4.1.2",
87+
"@chromatic-com/storybook": "^5.0.0",
88+
"@emotion/jest": "^11.14.2",
89+
"@storybook/addon-docs": "^10.2.3",
90+
"@storybook/addon-links": "^10.2.3",
91+
"@storybook/addon-onboarding": "^10.2.3",
92+
"@storybook/react": "^10.2.3",
93+
"@storybook/react-vite": "^10.2.3",
94+
"@testing-library/dom": "^10.4.1",
95+
"@testing-library/jest-dom": "^6.9.1",
96+
"@testing-library/react": "^16.3.2",
97+
"@types/d3": "^7.4.3",
98+
"@types/geojson": "^7946.0.16",
99+
"@types/js-md5": "^0.8.0",
100+
"@types/lodash-es": "^4.17.12",
101+
"@types/node": "^25.0.10",
102+
"@types/pbf": "^3.0.5",
103+
"@types/react": "^19.2.10",
104+
"@types/react-dom": "^19.2.3",
105+
"@types/scheduler": "^0.26.0",
106+
"@vitejs/plugin-react": "^5.1.2",
111107
"@xstate/cli": "0.5.17",
112-
"autoprefixer": "10.4.22",
113-
"cesium": "1.118.0",
114-
"class-variance-authority": "0.7.1",
115-
"clsx": "2.1.1",
108+
"autoprefixer": "^10.4.23",
109+
"cesium": "^1.137.0",
110+
"class-variance-authority": "^0.7.1",
111+
"clsx": "^2.1.1",
116112
"eslint": "8.57.0",
117113
"eslint-config-reearth": "0.3.0",
118-
"eslint-plugin-storybook": "0.8.0",
119-
"jsdom": "22.1.0",
120-
"postcss": "8.5.6",
121-
"prettier": "3.1.0",
122-
"react": "19.0.1",
123-
"react-dom": "19.0.1",
124-
"storybook": "8.4.7",
125-
"typescript": "5.2.2",
126-
"vite": "5.0.8",
114+
"eslint-plugin-storybook": "^10.2.3",
115+
"jsdom": "^27.4.0",
116+
"postcss": "^8.5.6",
117+
"prettier": "^3.8.1",
118+
"react": "^19.2.4",
119+
"react-dom": "^19.2.4",
120+
"storybook": "^10.2.3",
121+
"type-fest": "^5.4.2",
122+
"typescript": "^5.9.3",
123+
"vite": "^7.3.1",
127124
"vite-plugin-cesium": "1.2.23",
128-
"vite-plugin-dts": "3.8.1",
125+
"vite-plugin-dts": "^4.5.4",
129126
"vite-plugin-svgr": "4.5.0",
130-
"vite-tsconfig-paths": "^4.3.2",
131-
"vitest": "1.0.4",
132-
"web-streams-polyfill": "3.2.1"
127+
"vite-tsconfig-paths": "^6.0.5",
128+
"vitest": "^4.0.18",
129+
"web-streams-polyfill": "^4.2.0"
133130
},
134131
"resolutions": {
135132
"jackspeak": "3.1.2"

src/Map/Sketch/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { v4 as uuidv4 } from "uuid";
1616
import { InterpreterFrom, StateFrom } from "xstate";
1717

1818
import { ControlPointMouseEventHandler } from "../../engines/Cesium/Sketch";
19+
import { InteractionModeType } from "../../shared/interactionMode";
1920
import { useWindowEvent } from "../../utils/use-window-event";
20-
import { InteractionModeType } from "../../Visualizer/interactionMode";
2121
import { Feature, EngineRef, LayersRef, SketchRef } from "../types";
2222
import { useGet } from "../utils";
2323

src/Map/Sketch/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { ForwardRefRenderFunction, RefObject, forwardRef } from "react";
44

55
import { ComputedLayer, SelectedFeatureInfo } from "../../mantle";
6-
import { InteractionModeType } from "../../Visualizer/interactionMode";
6+
import { InteractionModeType } from "../../shared/interactionMode";
77
import { EngineRef, Feature, LayerSelectionReason, LayersRef, SketchRef } from "../types";
88

99
import useHooks from "./hooks";

src/Map/SpatialId/hooks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
} from "react";
1111
import { v4 as uuid } from "uuid";
1212

13+
import { InteractionModeType } from "../../shared/interactionMode";
1314
import { useWindowEvent } from "../../utils/use-window-event";
14-
import { InteractionModeType } from "../../Visualizer";
1515
import { GeoidRef } from "../Geoid/types";
1616
import { EngineRef, MouseEventProps } from "../types";
1717

@@ -128,7 +128,7 @@ export default ({
128128
overrideInteractionMode?.(
129129
interactionModeRef.current === "spatialId"
130130
? "default"
131-
: interactionModeRef.current ?? "default",
131+
: (interactionModeRef.current ?? "default"),
132132
);
133133
engineRef.current?.setCursor("default");
134134
engineRef.current?.requestRender();
@@ -197,15 +197,15 @@ export default ({
197197
setBaseCoordinateGeoid([
198198
props.lng,
199199
props.lat,
200-
(terrainEnabled ? props.height ?? 0 : 0) - appliedGeoidHeight,
200+
(terrainEnabled ? (props.height ?? 0) : 0) - appliedGeoidHeight,
201201
]);
202202

203203
setBasePosition(engineRef.current?.toXYZ(props.lng, props.lat, props.height ?? 0) ?? null);
204204

205205
const initialSpaceSelectorSpace = createSpatialIdSpace(
206206
props.lng,
207207
props.lat,
208-
(terrainEnabled ? props.height ?? 0 : 0) - appliedGeoidHeight,
208+
(terrainEnabled ? (props.height ?? 0) : 0) - appliedGeoidHeight,
209209
pickOptions.zoom,
210210
appliedCenterGeoidHeight,
211211
);

0 commit comments

Comments
 (0)