Skip to content

Commit c388eae

Browse files
committed
chore: Drop Uuid Dependency from Example App
Signed-off-by: Progyan Bhattacharya <bprogyan@gmail.com>
1 parent 05d5e33 commit c388eae

File tree

4 files changed

+11
-42
lines changed

4 files changed

+11
-42
lines changed

examples/collaborative-editors/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@
1414
"@otjs/firebase-ace": "workspace:*",
1515
"@otjs/firebase-monaco": "workspace:*",
1616
"firebase": "11.2.0",
17-
"monaco-editor": "0.52.2",
18-
"uuid": "11.0.5"
17+
"monaco-editor": "0.52.2"
1918
},
2019
"devDependencies": {
2120
"@types/ace": "0.0.52",
22-
"@types/uuid": "10.0.0",
2321
"css-loader": "7.1.2",
2422
"monaco-editor-webpack-plugin": "7.1.0",
2523
"source-map-loader": "5.0.0",

examples/collaborative-editors/src/firebase-ace.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
push,
3131
ref,
3232
} from "firebase/database";
33-
import { v4 as uuid } from "uuid";
3433
import { IFireAceEditor } from "@otjs/firebase-ace";
3534

3635
/**
@@ -41,11 +40,6 @@ declare global {
4140
aceEditor?: AceAjax.Editor;
4241
fireAce?: IFireAceEditor;
4342
}
44-
interface NodeModule {
45-
hot?: {
46-
accept(path: string, callback: Function): void;
47-
};
48-
}
4943
}
5044

5145
/**
@@ -63,7 +57,7 @@ const randInt = (limit: number = 1) => (Math.random() * limit) | 0;
6357
const userColor = `rgb(${randInt(255)}, ${randInt(255)}, ${randInt(255)})`;
6458

6559
/** User Id */
66-
const userId = uuid();
60+
const userId = crypto.randomUUID();
6761

6862
/** User Name */
6963
const userName = `Anonymous ${randInt(100)}`;

examples/collaborative-editors/src/firebase-monaco.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
ref,
3232
} from "firebase/database";
3333
import * as monaco from "monaco-editor";
34-
import { v4 as uuid } from "uuid";
3534
import { IFireMonacoEditor } from "@otjs/firebase-monaco";
3635

3736
/**
@@ -42,11 +41,6 @@ declare global {
4241
monacoEditor?: monaco.editor.IStandaloneCodeEditor;
4342
fireMonaco?: IFireMonacoEditor;
4443
}
45-
interface NodeModule {
46-
hot?: {
47-
accept(path: string, callback: Function): void;
48-
};
49-
}
5044
}
5145

5246
/**
@@ -64,7 +58,7 @@ const randInt = (limit: number = 1) => (Math.random() * limit) | 0;
6458
const userColor = `rgb(${randInt(255)}, ${randInt(255)}, ${randInt(255)})`;
6559

6660
/** User Id */
67-
const userId = uuid();
61+
const userId = crypto.randomUUID();
6862

6963
/** User Name */
7064
const userName = `Anonymous ${randInt(100)}`;

pnpm-lock.yaml

Lines changed: 8 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)