From 3c8a23b0258513e42c9ee9906619c6bc0f3f4db1 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Wed, 8 May 2024 11:46:44 +0200 Subject: [PATCH] upgrade typescript and fix destroy of old timeout --- package-lock.json | 10 +++++----- package.json | 2 +- src/plugins/sync-plugin.js | 5 ----- tsconfig.json | 4 ++-- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 480ed4b..5c6440f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "prosemirror-view": "^1.26.2", "rollup": "^2.59.0", "standard": "^17.0.0", - "typescript": "^4.8.4", + "typescript": "^5.4.5", "y-protocols": "^1.0.5", "y-webrtc": "^10.2.0", "yjs": "^13.5.38" @@ -5487,16 +5487,16 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/unbox-primitive": { diff --git a/package.json b/package.json index 44be8f1..d73bb18 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "prosemirror-view": "^1.26.2", "rollup": "^2.59.0", "standard": "^17.0.0", - "typescript": "^4.8.4", + "typescript": "^5.4.5", "y-protocols": "^1.0.5", "y-webrtc": "^10.2.0", "yjs": "^13.5.38" diff --git a/src/plugins/sync-plugin.js b/src/plugins/sync-plugin.js index fba04e5..709c47d 100644 --- a/src/plugins/sync-plugin.js +++ b/src/plugins/sync-plugin.js @@ -89,7 +89,6 @@ export const ySyncPlugin = (yXmlFragment, { permanentUserData = null, onFirstRender = () => {} } = {}) => { - let rerenderTimeout let initialContentChanged = false const plugin = new Plugin({ props: { @@ -173,9 +172,6 @@ export const ySyncPlugin = (yXmlFragment, { }, view: (view) => { const binding = new ProsemirrorBinding(yXmlFragment, view) - if (rerenderTimeout != null) { - rerenderTimeout.destroy() - } binding._forceRerender() onFirstRender() return { @@ -217,7 +213,6 @@ export const ySyncPlugin = (yXmlFragment, { } }, destroy: () => { - rerenderTimeout.destroy() binding.destroy() } } diff --git a/tsconfig.json b/tsconfig.json index 0abb7a5..f4a1680 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -62,6 +62,6 @@ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, - "include": ["./src/**/*"], - "exclude": ["../lib0/**/*", "node_modules/**/*", "dist", "dist/**/*.js"] + "include": ["src"], + "exclude": ["node_modules", "dist"] }