From 2a7ab4e916444a68c7cc05af4fa57ddd59994393 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Tue, 9 Dec 2025 16:20:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(vue-runtime-help):=20=E5=8E=BB=E6=8E=89vue?= =?UTF-8?q?2=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/react-runtime-help/package.json | 6 +++--- runtime/vue-runtime-help/package.json | 15 ++++----------- runtime/vue-runtime-help/src/hooks/use-app.ts | 2 +- .../src/hooks/use-component-status.ts | 2 +- .../vue-runtime-help/src/hooks/use-component.ts | 2 +- runtime/vue-runtime-help/src/hooks/use-dsl.ts | 2 +- .../vue-runtime-help/src/hooks/use-editor-dsl.ts | 2 +- runtime/vue-runtime-help/src/index.ts | 2 +- .../vue-runtime-help/tests/use-component.test.ts | 4 ++-- 9 files changed, 15 insertions(+), 22 deletions(-) diff --git a/runtime/react-runtime-help/package.json b/runtime/react-runtime-help/package.json index ca609070..45a678a9 100644 --- a/runtime/react-runtime-help/package.json +++ b/runtime/react-runtime-help/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.1", + "version": "0.2.2", "name": "@tmagic/react-runtime-help", "type": "module", "sideEffects": false, @@ -31,8 +31,8 @@ }, "peerDependencies": { "lodash-es": "^4.17.21", - "@tmagic/core": ">=1.6.0-beta.0", - "@tmagic/stage": ">=1.6.0-beta.0", + "@tmagic/core": ">=1.7.0", + "@tmagic/stage": ">=1.7.0", "react": ">=18.3.1", "typescript": "catalog:" }, diff --git a/runtime/vue-runtime-help/package.json b/runtime/vue-runtime-help/package.json index cf8de317..d4de22c0 100644 --- a/runtime/vue-runtime-help/package.json +++ b/runtime/vue-runtime-help/package.json @@ -1,5 +1,5 @@ { - "version": "1.2.3", + "version": "2.0.0", "name": "@tmagic/vue-runtime-help", "type": "module", "sideEffects": false, @@ -26,20 +26,13 @@ "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, - "dependencies": { - "vue-demi": "^0.14.10" - }, "peerDependencies": { - "@tmagic/core": ">=1.6.0-beta.0", - "@tmagic/stage": ">=1.6.0-beta.0", - "@vue/composition-api": ">=1.7.2", + "@tmagic/core": ">=1.7.0", + "@tmagic/stage": ">=1.7.0", "typescript": "catalog:", - "vue": ">=2.6.0 || >=3.5.0" + "vue": ">=3.5.0" }, "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - }, "@tmagic/core": { "optional": true }, diff --git a/runtime/vue-runtime-help/src/hooks/use-app.ts b/runtime/vue-runtime-help/src/hooks/use-app.ts index 95229d3b..fa984e57 100644 --- a/runtime/vue-runtime-help/src/hooks/use-app.ts +++ b/runtime/vue-runtime-help/src/hooks/use-app.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { inject, onBeforeUnmount, onMounted } from 'vue-demi'; +import { inject, onBeforeUnmount, onMounted } from 'vue'; import type TMagicApp from '@tmagic/core'; import type { Id, MNodeInstance, Node as TMagicNode } from '@tmagic/core'; diff --git a/runtime/vue-runtime-help/src/hooks/use-component-status.ts b/runtime/vue-runtime-help/src/hooks/use-component-status.ts index cf90caf5..5bd1cf5c 100644 --- a/runtime/vue-runtime-help/src/hooks/use-component-status.ts +++ b/runtime/vue-runtime-help/src/hooks/use-component-status.ts @@ -1,4 +1,4 @@ -import { computed, inject, onScopeDispose, ref, shallowReactive, watchEffect } from 'vue-demi'; +import { computed, inject, onScopeDispose, ref, shallowReactive, watchEffect } from 'vue'; import type TMagicCore from '@tmagic/core'; import { type MComponent, type StyleSchema, toLine } from '@tmagic/core'; diff --git a/runtime/vue-runtime-help/src/hooks/use-component.ts b/runtime/vue-runtime-help/src/hooks/use-component.ts index 9e10da8c..9ab8fe5a 100644 --- a/runtime/vue-runtime-help/src/hooks/use-component.ts +++ b/runtime/vue-runtime-help/src/hooks/use-component.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -import { ConcreteComponent, inject } from 'vue-demi'; +import { ConcreteComponent, inject } from 'vue'; import type TMagicApp from '@tmagic/core'; import { toLine } from '@tmagic/core'; diff --git a/runtime/vue-runtime-help/src/hooks/use-dsl.ts b/runtime/vue-runtime-help/src/hooks/use-dsl.ts index 75b3f86a..95c42e4b 100644 --- a/runtime/vue-runtime-help/src/hooks/use-dsl.ts +++ b/runtime/vue-runtime-help/src/hooks/use-dsl.ts @@ -1,4 +1,4 @@ -import { inject, nextTick, onBeforeUnmount, reactive, ref } from 'vue-demi'; +import { inject, nextTick, onBeforeUnmount, reactive, ref } from 'vue'; import type TMagicApp from '@tmagic/core'; import type { ChangeEvent, Id, MNode } from '@tmagic/core'; diff --git a/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts b/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts index 459680a3..0d1ca6f2 100644 --- a/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts +++ b/runtime/vue-runtime-help/src/hooks/use-editor-dsl.ts @@ -1,4 +1,4 @@ -import { computed, inject, nextTick, reactive, ref, watch } from 'vue-demi'; +import { computed, inject, nextTick, reactive, ref, watch } from 'vue'; import type TMagicApp from '@tmagic/core'; import type { Id, MApp, MNode } from '@tmagic/core'; diff --git a/runtime/vue-runtime-help/src/index.ts b/runtime/vue-runtime-help/src/index.ts index 573a412d..212db553 100644 --- a/runtime/vue-runtime-help/src/index.ts +++ b/runtime/vue-runtime-help/src/index.ts @@ -1,4 +1,4 @@ -import { h } from 'vue-demi'; +import { h } from 'vue'; import type { Id, MComponent, StyleSchema } from '@tmagic/core'; diff --git a/runtime/vue-runtime-help/tests/use-component.test.ts b/runtime/vue-runtime-help/tests/use-component.test.ts index b505b7bf..7934e92a 100644 --- a/runtime/vue-runtime-help/tests/use-component.test.ts +++ b/runtime/vue-runtime-help/tests/use-component.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from 'vitest'; -import { defineComponent, isVue3, provide } from 'vue-demi'; +import { defineComponent, provide } from 'vue'; import { mount } from '@vue/test-utils'; import Core from '@tmagic/core'; @@ -34,7 +34,7 @@ describe('useComponent', () => { }); // node_modules中的vue版本不是3.0.0,所以跳过 - test.runIf(isVue3).skip('auto inject and empty para', () => { + test('auto inject and empty para', () => { const child = defineComponent({ setup() { const component = useComponent();