Skip to content

Commit c087bba

Browse files
committed
fix(deps): pin nanoid and switch from uuid everywhere
1 parent 1d393c7 commit c087bba

File tree

3 files changed

+104
-203
lines changed

3 files changed

+104
-203
lines changed

components/uploads/Dropzone.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { DropzoneOptions, FileRejection } from "react-dropzone";
44
import { useDropzone } from "react-dropzone";
55

66
import { Divider, styled } from "@mui/material";
7-
import { v4 as uuidv4 } from "uuid";
7+
import { nanoid } from "nanoid";
88

99
import { useFileExtensions } from "../../hooks/useFileExtensions";
1010
import { useMimeTypeLookup } from "../../hooks/useMimeTypeLookup";
@@ -42,15 +42,15 @@ export const Dropzone: FC<DropzoneProps> = ({
4242
mimeType: getMimeFromFileName(file.name, mimeLookup),
4343
errors: [],
4444
// Give files UUIDs to keep track
45-
id: uuidv4(),
45+
id: nanoid(),
4646
progress: 0,
4747
taskId: null,
4848
done: false,
4949
}));
5050
const mappedRejected = rejectedFiles.map((rejection) => ({
5151
...rejection,
5252
mimeType: getMimeFromFileName(rejection.file.name, mimeLookup),
53-
id: uuidv4(),
53+
id: nanoid(),
5454
progress: 0,
5555
taskId: null,
5656
done: false,

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"@types/react": "18.0.28",
6666
"@types/react-plotly.js": "2.6.0",
6767
"@types/react-virtualized": "9.21.21",
68-
"@types/uuid": "9.0.0",
6968
"axios": "1.3.3",
7069
"dayjs": "1.11.7",
7170
"filesize": "10.0.6",
@@ -81,7 +80,7 @@
8180
"ketcher-standalone": "2.7.2",
8281
"lodash-es": "4.17.21",
8382
"material-ui-popup-state": "4.1.0",
84-
"nanoid": "^4.0.1",
83+
"nanoid": "4.0.1",
8584
"next": "13.2.4",
8685
"next-http-proxy-middleware": "1.2.5",
8786
"nextjs-routes": "1.0.8",
@@ -99,7 +98,6 @@
9998
"tsafe": "1.4.3",
10099
"typescript": "4.9.5",
101100
"use-immer": "0.7.0",
102-
"uuid": "9.0.0",
103101
"yup": "0.32.11"
104102
},
105103
"devDependencies": {

0 commit comments

Comments
 (0)