From 88539f03e8c68379aa04ffcf4adfe0c94d093d85 Mon Sep 17 00:00:00 2001 From: yousefed Date: Thu, 30 Mar 2023 13:54:10 +0200 Subject: [PATCH 1/4] use lodash default import --- packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts b/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts index c5f1748..fbeadfe 100644 --- a/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts +++ b/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts @@ -1,4 +1,4 @@ -import * as _ from "lodash"; +import _ from "lodash"; import { MatrixClient } from "matrix-js-sdk"; import { event, lifecycle } from "vscode-lib"; import * as Y from "yjs"; From b36a3e366f0bdbc0de2a235694e52c95e7457490 Mon Sep 17 00:00:00 2001 From: yousefed Date: Thu, 30 Mar 2023 13:54:39 +0200 Subject: [PATCH 2/4] v0.2.1-alpha.0 --- examples/rich-text-tiptap/package.json | 4 ++-- examples/todo-simple-react-vite/package.json | 16 ++++++++-------- examples/todo-simple-react/package.json | 4 ++-- lerna.json | 2 +- package-lock.json | 20 ++++++++++---------- packages/matrix-crdt/package.json | 2 +- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/rich-text-tiptap/package.json b/examples/rich-text-tiptap/package.json index b2a45c6..9a801a9 100644 --- a/examples/rich-text-tiptap/package.json +++ b/examples/rich-text-tiptap/package.json @@ -1,6 +1,6 @@ { "name": "richtext", - "version": "0.2.0", + "version": "0.2.1-alpha.0", "private": true, "dependencies": { "@primer/css": "^19.1.1", @@ -18,7 +18,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/examples/todo-simple-react-vite/package.json b/examples/todo-simple-react-vite/package.json index 26f1e3f..45909c9 100644 --- a/examples/todo-simple-react-vite/package.json +++ b/examples/todo-simple-react-vite/package.json @@ -1,7 +1,7 @@ { "name": "todo-vite", "private": true, - "version": "0.0.0", + "version": "0.2.1-alpha.0", "type": "module", "scripts": { "dev": "vite", @@ -17,23 +17,23 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "events": "3.3.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "styled-components": "^5.3.3", "typescript": "^4.4.4", "url": "^0.11.0", "y-protocols": "^1.0.5", - "yjs": "^13.5.16", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "events": "3.3.0" + "yjs": "^13.5.16" }, "devDependencies": { "@types/react": "^18.0.24", "@types/react-dom": "^18.0.8", "@vitejs/plugin-react": "^2.2.0", + "rollup-plugin-polyfill-node": "^0.10.2", "typescript": "^4.6.4", - "vite": "^3.2.3", - "rollup-plugin-polyfill-node": "^0.10.2" + "vite": "^3.2.3" } } diff --git a/examples/todo-simple-react/package.json b/examples/todo-simple-react/package.json index 5146cf6..c665033 100644 --- a/examples/todo-simple-react/package.json +++ b/examples/todo-simple-react/package.json @@ -1,6 +1,6 @@ { "name": "todo", - "version": "0.2.0", + "version": "0.2.1-alpha.0", "private": true, "dependencies": { "@primer/react": "34.1.0", @@ -11,7 +11,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/lerna.json b/lerna.json index 1cb5e97..0b1646f 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useNx": false, "useWorkspaces": true, - "version": "0.2.0" + "version": "0.2.1-alpha.0" } diff --git a/package-lock.json b/package-lock.json index 5d1f2b0..05d1ad8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ }, "examples/rich-text-tiptap": { "name": "richtext", - "version": "0.2.0", + "version": "0.2.1-alpha.0", "dependencies": { "@primer/css": "^19.1.1", "@primer/react": "34.1.0", @@ -36,7 +36,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -65,7 +65,7 @@ }, "examples/todo-simple-react": { "name": "todo", - "version": "0.2.0", + "version": "0.2.1-alpha.0", "dependencies": { "@primer/react": "34.1.0", "@syncedstore/core": "^0.3.5", @@ -75,7 +75,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -99,7 +99,7 @@ }, "examples/todo-simple-react-vite": { "name": "todo-vite", - "version": "0.0.0", + "version": "0.2.1-alpha.0", "dependencies": { "@primer/react": "34.1.0", "@syncedstore/core": "^0.3.5", @@ -110,7 +110,7 @@ "babel-loader": "8.1.0", "eslint": "^7.11.0", "events": "3.3.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -28623,7 +28623,7 @@ } }, "packages/matrix-crdt": { - "version": "0.2.0", + "version": "0.2.1-alpha.0", "license": "MPL-2.0", "dependencies": { "another-json": "^0.2.0", @@ -47700,7 +47700,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -49147,7 +49147,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -49179,7 +49179,7 @@ "babel-loader": "8.1.0", "eslint": "^7.11.0", "events": "3.3.0", - "matrix-crdt": "^0.2.0", + "matrix-crdt": "^0.2.1-alpha.0", "matrix-js-sdk": "^19.4.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/packages/matrix-crdt/package.json b/packages/matrix-crdt/package.json index 77892f6..9d4c693 100644 --- a/packages/matrix-crdt/package.json +++ b/packages/matrix-crdt/package.json @@ -6,7 +6,7 @@ "name": "Yousef El-Dardiry" }, "type": "module", - "version": "0.2.0", + "version": "0.2.1-alpha.0", "private": false, "license": "MPL-2.0", "dependencies": { From 5f5f6d4a4abdd807945e6e9f6199d5a0059523b2 Mon Sep 17 00:00:00 2001 From: yousefed Date: Thu, 30 Mar 2023 14:39:35 +0200 Subject: [PATCH 3/4] only import throttle --- packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts b/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts index fbeadfe..24fef3f 100644 --- a/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts +++ b/packages/matrix-crdt/src/writer/ThrottledMatrixWriter.ts @@ -1,4 +1,4 @@ -import _ from "lodash"; +import throttle from "lodash/throttle"; import { MatrixClient } from "matrix-js-sdk"; import { event, lifecycle } from "vscode-lib"; import * as Y from "yjs"; @@ -37,8 +37,8 @@ export class ThrottledMatrixWriter extends lifecycle.Disposable { private readonly onSentAllEvents: event.Event = this._onSentAllEvents.event; - private readonly throttledFlushUpdatesToMatrix: _.DebouncedFunc< - () => Promise + private readonly throttledFlushUpdatesToMatrix: ReturnType< + typeof throttle<() => Promise> >; private readonly opts: typeof DEFAULT_OPTIONS; @@ -50,7 +50,7 @@ export class ThrottledMatrixWriter extends lifecycle.Disposable { ) { super(); this.opts = { ...DEFAULT_OPTIONS, ...opts }; - this.throttledFlushUpdatesToMatrix = _.throttle( + this.throttledFlushUpdatesToMatrix = throttle( this.flushUpdatesToMatrix, this.canWrite ? this.opts.flushInterval From 1a63c4d5350858cc7f7d47073bc9563429d6b3ad Mon Sep 17 00:00:00 2001 From: yousefed Date: Thu, 30 Mar 2023 14:39:57 +0200 Subject: [PATCH 4/4] v0.2.1-alpha.1 --- examples/rich-text-tiptap/package.json | 4 ++-- examples/todo-simple-react-vite/package.json | 4 ++-- examples/todo-simple-react/package.json | 4 ++-- lerna.json | 2 +- package-lock.json | 20 ++++++++++---------- packages/matrix-crdt/package.json | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/rich-text-tiptap/package.json b/examples/rich-text-tiptap/package.json index 9a801a9..b3fd54b 100644 --- a/examples/rich-text-tiptap/package.json +++ b/examples/rich-text-tiptap/package.json @@ -1,6 +1,6 @@ { "name": "richtext", - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "private": true, "dependencies": { "@primer/css": "^19.1.1", @@ -18,7 +18,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/examples/todo-simple-react-vite/package.json b/examples/todo-simple-react-vite/package.json index 45909c9..02360a6 100644 --- a/examples/todo-simple-react-vite/package.json +++ b/examples/todo-simple-react-vite/package.json @@ -1,7 +1,7 @@ { "name": "todo-vite", "private": true, - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "type": "module", "scripts": { "dev": "vite", @@ -18,7 +18,7 @@ "babel-loader": "8.1.0", "eslint": "^7.11.0", "events": "3.3.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/todo-simple-react/package.json b/examples/todo-simple-react/package.json index c665033..dd51829 100644 --- a/examples/todo-simple-react/package.json +++ b/examples/todo-simple-react/package.json @@ -1,6 +1,6 @@ { "name": "todo", - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "private": true, "dependencies": { "@primer/react": "34.1.0", @@ -11,7 +11,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/lerna.json b/lerna.json index 0b1646f..7ea8e01 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useNx": false, "useWorkspaces": true, - "version": "0.2.1-alpha.0" + "version": "0.2.1-alpha.1" } diff --git a/package-lock.json b/package-lock.json index 05d1ad8..31d9b46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ }, "examples/rich-text-tiptap": { "name": "richtext", - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "dependencies": { "@primer/css": "^19.1.1", "@primer/react": "34.1.0", @@ -36,7 +36,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -65,7 +65,7 @@ }, "examples/todo-simple-react": { "name": "todo", - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "dependencies": { "@primer/react": "34.1.0", "@syncedstore/core": "^0.3.5", @@ -75,7 +75,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -99,7 +99,7 @@ }, "examples/todo-simple-react-vite": { "name": "todo-vite", - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "dependencies": { "@primer/react": "34.1.0", "@syncedstore/core": "^0.3.5", @@ -110,7 +110,7 @@ "babel-loader": "8.1.0", "eslint": "^7.11.0", "events": "3.3.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -28623,7 +28623,7 @@ } }, "packages/matrix-crdt": { - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "license": "MPL-2.0", "dependencies": { "another-json": "^0.2.0", @@ -47700,7 +47700,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -49147,7 +49147,7 @@ "@types/react-dom": "^17.0.10", "babel-loader": "8.1.0", "eslint": "^7.11.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -49179,7 +49179,7 @@ "babel-loader": "8.1.0", "eslint": "^7.11.0", "events": "3.3.0", - "matrix-crdt": "^0.2.1-alpha.0", + "matrix-crdt": "^0.2.1-alpha.1", "matrix-js-sdk": "^19.4.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/packages/matrix-crdt/package.json b/packages/matrix-crdt/package.json index 9d4c693..506cbb3 100644 --- a/packages/matrix-crdt/package.json +++ b/packages/matrix-crdt/package.json @@ -6,7 +6,7 @@ "name": "Yousef El-Dardiry" }, "type": "module", - "version": "0.2.1-alpha.0", + "version": "0.2.1-alpha.1", "private": false, "license": "MPL-2.0", "dependencies": {