Fix nanoid warning by replacing it with own function

Closes #1160
This commit is contained in:
Kalle 2022-11-23 21:15:42 +02:00
parent 14df9359ac
commit 6061c9672a
4 changed files with 3 additions and 21 deletions

View File

@ -23,9 +23,9 @@ import {
} from "~/utils/urls";
import { Button } from "./Button";
import { Image } from "./Image";
import { nanoid } from "nanoid";
import randomInt from "just-random-integer";
import type { LanguageCode } from "~/modules/i18n";
import { semiRandomId } from "~/utils/strings";
export default function Planner() {
const { t } = useTranslation(["common", "weapons"]);
@ -81,7 +81,7 @@ export default function Planner() {
});
app.createShapes({
id: nanoid(),
id: semiRandomId(),
type: TDShapeType.Image,
assetId: src,
size,

17
package-lock.json generated
View File

@ -28,7 +28,6 @@
"just-random-integer": "^4.1.1",
"just-shuffle": "^4.1.1",
"markdown-to-jsx": "^7.1.7",
"nanoid": "^4.0.0",
"node-cron": "3.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@ -11810,17 +11809,6 @@
"react-dom": "*"
}
},
"node_modules/nanoid": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
"integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==",
"bin": {
"nanoid": "bin/nanoid.js"
},
"engines": {
"node": "^14 || ^16 || >=18"
}
},
"node_modules/nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@ -25322,11 +25310,6 @@
"stylis": "^4.0.6"
}
},
"nanoid": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.0.tgz",
"integrity": "sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg=="
},
"nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",

View File

@ -53,7 +53,6 @@
"just-random-integer": "^4.1.1",
"just-shuffle": "^4.1.1",
"markdown-to-jsx": "^7.1.7",
"nanoid": "^4.0.0",
"node-cron": "3.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View File

@ -3,7 +3,7 @@
"exclude": ["discord-bot/*"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2019"],
"module": "commonjs",
"module": "ES2020",
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",