Skip to content

Commit 29061a5

Browse files
committed
fix: address PR review comments
- Remove leading blank line in YjsThreadStore.ts (nperez0111) - Restore crypto.randomUUID spy in afterAll in test (coderabbitai) - Move @blocknote/core out of devDeps in code-block (already peerDep) - Move @shikijs/types to optionalDependencies in code-block (nperez0111) - Move yjs back to dependencies in server-util (public API types)
1 parent 628d5e2 commit 29061a5

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

packages/code-block/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@
5454
"@shikijs/langs-precompiled": "^4",
5555
"@shikijs/themes": "^4"
5656
},
57+
"optionalDependencies": {
58+
"@shikijs/types": "^4"
59+
},
5760
"devDependencies": {
58-
"@blocknote/core": "0.51.3",
59-
"@shikijs/types": "^4",
6061
"eslint": "^8.57.1",
6162
"rollup-plugin-webpack-stats": "^0.2.6",
6263
"typescript": "^5.9.3",

packages/core/src/comments/threadstore/yjs/YjsThreadStore.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
import { beforeEach, describe, expect, it, vi } from "vitest";
1+
import { afterAll, beforeEach, describe, expect, it, vi } from "vitest";
22
import * as Y from "yjs";
33
import { CommentBody } from "../../types.js";
44
import { DefaultThreadStoreAuth } from "../DefaultThreadStoreAuth.js";
55
import { YjsThreadStore } from "./YjsThreadStore.js";
66

77
// Mock crypto.randomUUID to generate sequential IDs
88
let mockUuidCounter = 0;
9-
const originalRandomUUID = crypto.randomUUID.bind(crypto);
10-
vi.spyOn(crypto, "randomUUID").mockImplementation(
11-
() => `mocked-uuid-${++mockUuidCounter}` as ReturnType<typeof originalRandomUUID>,
9+
const randomUUIDSpy = vi.spyOn(crypto, "randomUUID").mockImplementation(
10+
() => `mocked-uuid-${++mockUuidCounter}` as `${string}-${string}-${string}-${string}-${string}`,
1211
);
1312

13+
afterAll(() => {
14+
randomUUIDSpy.mockRestore();
15+
});
16+
1417
describe("YjsThreadStore", () => {
1518
let store: YjsThreadStore;
1619
let doc: Y.Doc;

packages/core/src/comments/threadstore/yjs/YjsThreadStore.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as Y from "yjs";
32
import { CommentBody, CommentData, ThreadData } from "../../types.js";
43
import { ThreadStoreAuth } from "../ThreadStoreAuth.js";

packages/server-util/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
"@blocknote/core": "0.51.3",
6060
"@blocknote/react": "0.51.3",
6161
"@tiptap/pm": "^3.13.0",
62-
"jsdom": "^25.0.1"
62+
"jsdom": "^25.0.1",
63+
"yjs": "^13.6.27"
6364
},
6465
"devDependencies": {
6566
"@types/jsdom": "^21.1.7",
6667
"y-prosemirror": "^1.3.7",
6768
"y-protocols": "^1.0.6",
68-
"yjs": "^13.6.27",
6969
"@types/react": "^19.2.3",
7070
"@types/react-dom": "^19.2.3",
7171
"eslint": "^8.57.1",

0 commit comments

Comments
 (0)