From 16bfbf5aee4429589b8c37ebcf8c3f8155fbbfed Mon Sep 17 00:00:00 2001 From: yousefed Date: Tue, 17 Oct 2023 21:06:02 +0200 Subject: [PATCH 1/2] upgrade hocuspocus --- package-lock.json | 287 ++++++++++++++++++------------ packages/editor/package.json | 4 +- packages/server/package.json | 8 +- packages/shared-test/package.json | 2 +- 4 files changed, 177 insertions(+), 124 deletions(-) diff --git a/package-lock.json b/package-lock.json index f3a9359d7..2006c65b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3439,93 +3439,6 @@ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.1.tgz", "integrity": "sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw==" }, - "node_modules/@hocuspocus/common": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@hocuspocus/common/-/common-2.4.0.tgz", - "integrity": "sha512-+hI7f/LaeIM0FE+iANVLfqDneXjhD2AXmIj6WBzpUFO+IGLjrk8F46eQAsmv9l9Ts347G6CbhTMhLFJdEkGcww==", - "dependencies": { - "lib0": "^0.2.47" - } - }, - "node_modules/@hocuspocus/extension-database": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@hocuspocus/extension-database/-/extension-database-2.4.0.tgz", - "integrity": "sha512-7xx551LbhZUR1BYnit+tceQWhtW9l+/jvYracyaYfWc6R8PD2IRHkkJ0ADQnl+4lEIUi6geWO0Ec8O/0yDHKuA==", - "dependencies": { - "@hocuspocus/server": "^2.4.0" - }, - "peerDependencies": { - "yjs": "^13.6.4" - } - }, - "node_modules/@hocuspocus/extension-logger": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@hocuspocus/extension-logger/-/extension-logger-2.4.0.tgz", - "integrity": "sha512-i6bpHLFJE4oxJ+yW/oIMjiRY2J7/2crWErQNEoAgmog9hJrTAmBtsjCgtH9auVBE0Vh4NJyFyUvD9KPOwK3BEQ==", - "dependencies": { - "@hocuspocus/server": "^2.4.0" - } - }, - "node_modules/@hocuspocus/provider": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@hocuspocus/provider/-/provider-2.4.0.tgz", - "integrity": "sha512-cEbL94LTd8nTRMSZu/oX4zK3owEwyjQ1n6SgthzfkTqa0XCELCTTyDoCYeialTzJiCfAaJk1Lb2oqnQT73AhGQ==", - "dependencies": { - "@hocuspocus/common": "^2.4.0", - "@lifeomic/attempt": "^3.0.2", - "lib0": "^0.2.47", - "ws": "^7.5.9" - }, - "peerDependencies": { - "y-protocols": "^1.0.5", - "yjs": "^13.6.4" - } - }, - "node_modules/@hocuspocus/server": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@hocuspocus/server/-/server-2.4.0.tgz", - "integrity": "sha512-aKBTRh4HnHu1/uzPjGacDRsKtmL7M3m7XlDD/KkY1oY/u3b06eH8yqKD5h1jTy8XP55z0M/YeYcwSX2hfP9wRQ==", - "dependencies": { - "@hocuspocus/common": "^2.4.0", - "async-lock": "^1.3.1", - "kleur": "^4.1.4", - "lib0": "^0.2.47", - "uuid": "^9.0.0", - "ws": "^8.5.0" - }, - "peerDependencies": { - "y-protocols": "^1.0.5", - "yjs": "^13.6.4" - } - }, - "node_modules/@hocuspocus/server/node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@hocuspocus/server/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -15411,26 +15324,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xml-name-validator": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", @@ -15640,7 +15533,7 @@ "@atlaskit/tree": "^8.8.5", "@blocknote/core": "^0.9.3", "@emotion/react": "^11.4.0", - "@hocuspocus/provider": "^2.4.0", + "@hocuspocus/provider": "^2.7.0", "@supabase/auth-ui-react": "^0.4.5", "@supabase/auth-ui-shared": "^0.1.7", "@supabase/supabase-js": "^2.26.0", @@ -15966,6 +15859,29 @@ "yjs": "^13.6.1" } }, + "packages/editor/node_modules/@hocuspocus/common": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/common/-/common-2.7.0.tgz", + "integrity": "sha512-rJmn6uC7JYuq9eLVxb0fKusab2WBUkNyxrJjj9RXOsmcoe2iveVv3semIMAaBXXToSMCBoGjT52qDl1ll21WDQ==", + "dependencies": { + "lib0": "^0.2.47" + } + }, + "packages/editor/node_modules/@hocuspocus/provider": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/provider/-/provider-2.7.0.tgz", + "integrity": "sha512-e7kIWgWCkbEijjFBLUdi524BrJ4xlo6m6ozv/0R1KeIyRrBxxbjRmV5FX4xWJlTGkSVcCO9F+VOUYNJ8K7/z+w==", + "dependencies": { + "@hocuspocus/common": "^2.7.0", + "@lifeomic/attempt": "^3.0.2", + "lib0": "^0.2.47", + "ws": "^8.14.2" + }, + "peerDependencies": { + "y-protocols": "^1.0.5", + "yjs": "^13.6.4" + } + }, "packages/editor/node_modules/@supabase/auth-ui-react": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/@supabase/auth-ui-react/-/auth-ui-react-0.4.5.tgz", @@ -16029,6 +15945,26 @@ "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" } }, + "packages/editor/node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "packages/engine": { "name": "@typecell-org/engine", "version": "0.0.3", @@ -16465,9 +16401,9 @@ "name": "@typecell-org/server", "version": "0.0.3", "dependencies": { - "@hocuspocus/extension-database": "^2.4.0", - "@hocuspocus/extension-logger": "^2.4.0", - "@hocuspocus/server": "^2.4.0", + "@hocuspocus/extension-database": "^2.7.0", + "@hocuspocus/extension-logger": "^2.7.0", + "@hocuspocus/server": "^2.7.0", "@supabase/supabase-js": "^2.12.1", "@typecell-org/shared": "^0.0.3", "@typecell-org/shared-test": "^0.0.3", @@ -16476,7 +16412,7 @@ "vscode-lib": "^0.1.2" }, "devDependencies": { - "@hocuspocus/provider": "^2.4.0", + "@hocuspocus/provider": "^2.7.0", "@playwright/test": "^1.33.0", "@vitest/coverage-v8": "^0.33.0", "jsdom": "^22.1.0", @@ -16489,6 +16425,66 @@ "yjs": "^13.6.4" } }, + "packages/server/node_modules/@hocuspocus/common": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/common/-/common-2.7.0.tgz", + "integrity": "sha512-rJmn6uC7JYuq9eLVxb0fKusab2WBUkNyxrJjj9RXOsmcoe2iveVv3semIMAaBXXToSMCBoGjT52qDl1ll21WDQ==", + "dependencies": { + "lib0": "^0.2.47" + } + }, + "packages/server/node_modules/@hocuspocus/extension-database": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/extension-database/-/extension-database-2.7.0.tgz", + "integrity": "sha512-83r15MdR95qjG9gNM5x/UhZYZBQSzewRDVwbYgiE/2mHsn/RWJDvjiNeZNqv1+KmE9gTRZEz47rfD+y5b45sTQ==", + "dependencies": { + "@hocuspocus/server": "^2.7.0" + }, + "peerDependencies": { + "yjs": "^13.6.4" + } + }, + "packages/server/node_modules/@hocuspocus/extension-logger": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/extension-logger/-/extension-logger-2.7.0.tgz", + "integrity": "sha512-vO3W5RRx1shaNiR1l1L+Bn7Hn73FWoyPayrtZAfaDsxa4rjt2fNI7ZE/Gg9rTrq92gTKoEGDXQk1g65nB+2fLg==", + "dependencies": { + "@hocuspocus/server": "^2.7.0" + } + }, + "packages/server/node_modules/@hocuspocus/provider": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/provider/-/provider-2.7.0.tgz", + "integrity": "sha512-e7kIWgWCkbEijjFBLUdi524BrJ4xlo6m6ozv/0R1KeIyRrBxxbjRmV5FX4xWJlTGkSVcCO9F+VOUYNJ8K7/z+w==", + "dev": true, + "dependencies": { + "@hocuspocus/common": "^2.7.0", + "@lifeomic/attempt": "^3.0.2", + "lib0": "^0.2.47", + "ws": "^8.14.2" + }, + "peerDependencies": { + "y-protocols": "^1.0.5", + "yjs": "^13.6.4" + } + }, + "packages/server/node_modules/@hocuspocus/server": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/server/-/server-2.7.0.tgz", + "integrity": "sha512-wt9y8PsHQznNg843Ih6R7GLB2pwBz0uRJ83QHCR+1VKFH+kpxjZMpS/zmcPWCiXcyA+MSpybhUYhUF+MweTsVQ==", + "dependencies": { + "@hocuspocus/common": "^2.7.0", + "async-lock": "^1.3.1", + "kleur": "^4.1.4", + "lib0": "^0.2.47", + "uuid": "^9.0.0", + "ws": "^8.5.0" + }, + "peerDependencies": { + "y-protocols": "^1.0.5", + "yjs": "^13.6.4" + } + }, "packages/server/node_modules/node-fetch": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", @@ -16525,11 +16521,22 @@ "npm": ">=8" } }, + "packages/server/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "packages/server/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "engines": { "node": ">=10.0.0" }, @@ -16567,7 +16574,7 @@ "name": "@typecell-org/shared-test", "version": "0.0.3", "devDependencies": { - "@hocuspocus/provider": "^2.4.0", + "@hocuspocus/provider": "^2.7.0", "@supabase/supabase-js": "^2.12.1", "@typecell-org/shared": "*", "@typecell-org/util": "*", @@ -16575,6 +16582,52 @@ "yjs": "^13.6.4" } }, + "packages/shared-test/node_modules/@hocuspocus/common": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/common/-/common-2.7.0.tgz", + "integrity": "sha512-rJmn6uC7JYuq9eLVxb0fKusab2WBUkNyxrJjj9RXOsmcoe2iveVv3semIMAaBXXToSMCBoGjT52qDl1ll21WDQ==", + "dev": true, + "dependencies": { + "lib0": "^0.2.47" + } + }, + "packages/shared-test/node_modules/@hocuspocus/provider": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@hocuspocus/provider/-/provider-2.7.0.tgz", + "integrity": "sha512-e7kIWgWCkbEijjFBLUdi524BrJ4xlo6m6ozv/0R1KeIyRrBxxbjRmV5FX4xWJlTGkSVcCO9F+VOUYNJ8K7/z+w==", + "dev": true, + "dependencies": { + "@hocuspocus/common": "^2.7.0", + "@lifeomic/attempt": "^3.0.2", + "lib0": "^0.2.47", + "ws": "^8.14.2" + }, + "peerDependencies": { + "y-protocols": "^1.0.5", + "yjs": "^13.6.4" + } + }, + "packages/shared-test/node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "packages/util": { "name": "@typecell-org/util", "version": "0.0.3", diff --git a/packages/editor/package.json b/packages/editor/package.json index 37d2b2c1f..5256a1775 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "react-confetti-explosion": "^2.1.2", - "@hocuspocus/provider": "^2.4.0", + "@hocuspocus/provider": "^2.7.0", "@atlaskit/atlassian-navigation": "^2.6.13", "@atlaskit/avatar": "^21.3.7", "@atlaskit/breadcrumbs": "^11.10.5", @@ -78,7 +78,7 @@ "lint": "eslint src", "test-watch": "vitest watch", "unittest:vitest": "vitest run", - "unittest:playwright": "playwright-test '**/*.browsertest.ts' --runner mocha", + "unittest:playwright": "playwright-test '**/*Syncer.browsertest.ts' -d --runner mocha", "test": "npm run unittest:vitest && npm run unittest:playwright", "vite:dev": "vite", "vite:build": "vite build --mode=$MODE", diff --git a/packages/server/package.json b/packages/server/package.json index e103e667f..36fd92384 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -6,15 +6,15 @@ "@typecell-org/shared": "^0.0.3", "@typecell-org/shared-test": "^0.0.3", "@typecell-org/util": "^0.0.3", - "@hocuspocus/extension-database": "^2.4.0", - "@hocuspocus/extension-logger": "^2.4.0", - "@hocuspocus/server": "^2.4.0", + "@hocuspocus/extension-database": "^2.7.0", + "@hocuspocus/extension-logger": "^2.7.0", + "@hocuspocus/server": "^2.7.0", "@supabase/supabase-js": "^2.12.1", "vscode-lib": "^0.1.2", "dotenv": "^16.3.1" }, "devDependencies": { - "@hocuspocus/provider": "^2.4.0", + "@hocuspocus/provider": "^2.7.0", "@playwright/test": "^1.33.0", "@vitest/coverage-v8": "^0.33.0", "jsdom": "^22.1.0", diff --git a/packages/shared-test/package.json b/packages/shared-test/package.json index e9470b4f9..a25379f47 100644 --- a/packages/shared-test/package.json +++ b/packages/shared-test/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": {}, "devDependencies": { - "@hocuspocus/provider": "^2.4.0", + "@hocuspocus/provider": "^2.7.0", "@typecell-org/shared": "*", "@typecell-org/util": "*", "typescript": "5.0.4", From 0c07a16d4f8a3d2525f6a578a028442ccd63be26 Mon Sep 17 00:00:00 2001 From: yousefed Date: Tue, 17 Oct 2023 21:06:33 +0200 Subject: [PATCH 2/2] revert script --- packages/editor/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/package.json b/packages/editor/package.json index 5256a1775..cbdeaaa86 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -78,7 +78,7 @@ "lint": "eslint src", "test-watch": "vitest watch", "unittest:vitest": "vitest run", - "unittest:playwright": "playwright-test '**/*Syncer.browsertest.ts' -d --runner mocha", + "unittest:playwright": "playwright-test '**/*.browsertest.ts' --runner mocha", "test": "npm run unittest:vitest && npm run unittest:playwright", "vite:dev": "vite", "vite:build": "vite build --mode=$MODE",