diff --git a/package.json b/package.json index 4d59d068d..d6e3e205d 100644 --- a/package.json +++ b/package.json @@ -43,48 +43,47 @@ "url": "https://github.com/Tencent/tmagic-editor.git" }, "devDependencies": { - "@commitlint/cli": "^18.2.0", - "@commitlint/config-conventional": "^18.1.0", - "@rollup/plugin-alias": "^5.1.0", - "@types/node": "^18.19.0", - "@typescript-eslint/eslint-plugin": "^5.57.1", - "@typescript-eslint/parser": "^5.57.1", - "@vitejs/plugin-vue": "^5.1.3", - "@vitest/coverage-v8": "^2.0.5", - "c8": "^7.11.3", - "commitizen": "^4.3.0", + "@commitlint/cli": "^18.6.1", + "@commitlint/config-conventional": "^18.6.3", + "@rollup/plugin-alias": "^5.1.1", + "@types/node": "^18.19.61", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "@vitejs/plugin-vue": "^5.1.4", + "@vitest/coverage-v8": "^2.1.4", + "c8": "^7.14.0", + "commitizen": "^4.3.1", "conventional-changelog-cli": "^4.1.0", "cosmiconfig": "^8.3.6", "cz-conventional-changelog": "^3.3.0", - "element-plus": "^2.8.0", - "enquirer": "^2.3.6", - "eslint": "^8.38.0", - "eslint-config-tencent": "^1.0.4", - "eslint-plugin-import": "^2.27.5", + "element-plus": "^2.8.6", + "enquirer": "^2.4.1", + "eslint": "^8.57.1", + "eslint-config-tencent": "^1.1.1", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-vue": "^9.10.0", - "execa": "^4.0.2", - "highlight.js": "^11.7.0", - "husky": "^7.0.0", + "eslint-plugin-vue": "^9.30.0", + "execa": "^4.1.0", + "husky": "^7.0.4", "jsdom": "^19.0.0", - "lint-staged": "^11.0.1", - "minimist": "^1.2.6", - "picocolors": "^1.0.0", - "prettier": "^2.8.7", - "recast": "^0.20.4", + "lint-staged": "^11.2.6", + "minimist": "^1.2.8", + "picocolors": "^1.1.1", + "prettier": "^2.8.8", + "recast": "^0.20.5", "rimraf": "^3.0.2", - "rollup": "^4.17.2", + "rollup": "^4.24.3", "rollup-plugin-dts": "^6.1.1", - "semver": "^7.3.7", - "serialize-javascript": "^6.0.0", + "semver": "^7.6.3", + "serialize-javascript": "^6.0.2", "shx": "^0.3.4", - "typescript": "^5.5.4", - "vite": "^5.4.3", - "vitepress": "^1.3.4", - "vitest": "^2.0.5", - "vue": "^3.5.0", - "vue-tsc": "^2.1.6" + "typescript": "^5.6.3", + "vite": "^5.4.10", + "vitepress": "^1.4.2", + "vitest": "^2.1.4", + "vue": "^3.5.12", + "vue-tsc": "^2.1.8" }, "config": { "commitizen": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 0f72a2001..cab99e5d7 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -21,21 +21,22 @@ "node": ">=18" }, "repository": { + "directory": "packages/cli", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, "dependencies": { "cac": "^6.7.14", "chokidar": "^3.6.0", - "esbuild": "^0.21.1", + "esbuild": "^0.21.5", "fs-extra": "^11.2.0", - "picocolors": "^1.0.0", - "recast": "^0.23.6", - "tslib": "^2.6.2" + "picocolors": "^1.1.1", + "recast": "^0.23.9", + "tslib": "^2.8.0" }, "devDependencies": { "@types/fs-extra": "^11.0.4", - "@types/node": "^18.19.0" + "@types/node": "^18.19.61" }, "peerDependencies": { "typescript": "*" diff --git a/packages/cli/src/utils/prepareEntryFile.ts b/packages/cli/src/utils/prepareEntryFile.ts index 75d4187d4..32ebbe1a2 100644 --- a/packages/cli/src/utils/prepareEntryFile.ts +++ b/packages/cli/src/utils/prepareEntryFile.ts @@ -95,5 +95,5 @@ export const makeCamelCase = function (name: string): string { if (typeof name !== 'string') { return ''; } - return name.replace(/-(\w)/g, ($0, $1) => $1.toUpperCase()); + return name.replace(/-(\w)/g, (_$0, $1) => $1.toUpperCase()); }; diff --git a/packages/cli/tsconfig.build.json b/packages/cli/tsconfig.build.json index acf72a683..abcf57dd2 100644 --- a/packages/cli/tsconfig.build.json +++ b/packages/cli/tsconfig.build.json @@ -1,6 +1,8 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "moduleResolution": "Node", "module": "CommonJS", "rootDir": "./src", "outDir": "./lib", diff --git a/packages/core/package.json b/packages/core/package.json index 9e9fcca46..5672de9a4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -31,6 +31,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/core", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -50,7 +51,7 @@ "@types/lodash-es": "^4.17.4", "@types/node": "^18.19.0", "rimraf": "^3.0.2", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "typescript": "*" diff --git a/packages/core/src/EventHelper.ts b/packages/core/src/EventHelper.ts index 366c4e395..5ab43c7d6 100644 --- a/packages/core/src/EventHelper.ts +++ b/packages/core/src/EventHelper.ts @@ -102,7 +102,7 @@ export default class EventHelper extends EventEmitter { node.eventKeys.set(eventNameKey, eventName); } - const eventHandler = (fromCpt: TMagicNode, ...args: any[]) => { + const eventHandler = (_fromCpt: TMagicNode, ...args: any[]) => { this.eventHandler(index, node, args); }; diff --git a/packages/data-source/package.json b/packages/data-source/package.json index 7695f59f6..5fe2372e0 100644 --- a/packages/data-source/package.json +++ b/packages/data-source/package.json @@ -26,6 +26,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/data-source", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -51,6 +52,6 @@ "@types/lodash-es": "^4.17.4", "@types/node": "^18.19.0", "tsc-alias": "^1.8.5", - "vite": "^5.4.3" + "vite": "^5.4.10" } } diff --git a/packages/dep/package.json b/packages/dep/package.json index 406d4c0a5..fa16163df 100644 --- a/packages/dep/package.json +++ b/packages/dep/package.json @@ -26,13 +26,14 @@ "node": ">=18" }, "repository": { + "directory": "packages/dep", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, "devDependencies": { "@types/node": "^18.19.0", "rimraf": "^3.0.2", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "@tmagic/schema": "workspace:*", diff --git a/packages/dep/src/utils.ts b/packages/dep/src/utils.ts index fcb49cf3d..bca6e3323 100644 --- a/packages/dep/src/utils.ts +++ b/packages/dep/src/utils.ts @@ -24,7 +24,7 @@ export const createCodeBlockTarget = (id: Id, codeBlock: CodeBlockContent, initi id, initialDeps, name: codeBlock.name, - isTarget: (key: string | number, value: any) => { + isTarget: (_key: string | number, value: any) => { if (id === value) { return true; } @@ -264,7 +264,7 @@ export const createDataSourceMethodTarget = (ds: Pick { + isTarget: (_key: string | number, value: any) => { // 使用data-source-method-select 可以配置出来 if (!Array.isArray(value) || !ds) { return false; diff --git a/packages/design/package.json b/packages/design/package.json index 9d7094f96..ca017bb55 100644 --- a/packages/design/package.json +++ b/packages/design/package.json @@ -30,6 +30,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/design", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -41,18 +42,17 @@ "typescript" ], "dependencies": { - "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7" + "@popperjs/core": "^2.11.8" }, "devDependencies": { "@types/node": "^18.19.0", "@vitejs/plugin-vue": "^5.1.3", - "@vue/compiler-sfc": "^3.5.0", - "@vue/test-utils": "^2.4.6", + "@vue/compiler-sfc": "^3.5.12", "rimraf": "^3.0.2", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { - "vue": "^3.5.0", + "vue": ">=3.5.0", "typescript": "*" }, "peerDependenciesMeta": { diff --git a/packages/design/src/index.ts b/packages/design/src/index.ts index 1976034ab..55ffbc8c4 100644 --- a/packages/design/src/index.ts +++ b/packages/design/src/index.ts @@ -69,7 +69,7 @@ export const tMagicMessage = { info: (msg: string) => { console.info(msg); }, - closeAll: (msg: string) => {}, + closeAll: (_msg: string) => {}, } as unknown as TMagicMessage; export const tMagicMessageBox = { diff --git a/packages/editor/package.json b/packages/editor/package.json index 25e06290e..68981b6b6 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -35,6 +35,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/editor", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -72,19 +73,19 @@ "@types/serialize-javascript": "^5.0.1", "@types/sortablejs": "^1.15.8", "@vitejs/plugin-vue": "^5.1.3", - "@vue/compiler-sfc": "^3.5.0", + "@vue/compiler-sfc": "^3.5.12", "@vue/test-utils": "^2.4.6", "rimraf": "^3.0.2", "sass": "^1.78.0", "tsc-alias": "^1.8.5", "type-fest": "^4.10.3", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "@tmagic/core": "workspace:*", "monaco-editor": "^0.48.0", "typescript": "*", - "vue": "^3.5.0" + "vue": ">=3.5.0" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/editor/src/services/editor.ts b/packages/editor/src/services/editor.ts index 8bae6eb23..95fb742e5 100644 --- a/packages/editor/src/services/editor.ts +++ b/packages/editor/src/services/editor.ts @@ -839,7 +839,7 @@ class Editor extends BaseService { const layout = await this.getLayout(target); - const newConfig = mergeWith(cloneDeep(node), config, (objValue, srcValue) => { + const newConfig = mergeWith(cloneDeep(node), config, (_objValue, srcValue) => { if (Array.isArray(srcValue)) { return srcValue; } diff --git a/packages/editor/src/utils/data-source/index.ts b/packages/editor/src/utils/data-source/index.ts index 46f820985..9059ad3bc 100644 --- a/packages/editor/src/utils/data-source/index.ts +++ b/packages/editor/src/utils/data-source/index.ts @@ -58,7 +58,7 @@ const fillConfig = (config: FormConfig): FormConfig => [ }, { title: '请求参数裁剪', - display: (formState: FormState, { model }: any) => model.type === 'http', + display: (_formState: FormState, { model }: any) => model.type === 'http', items: [ { name: 'beforeRequest', @@ -70,7 +70,7 @@ const fillConfig = (config: FormConfig): FormConfig => [ }, { title: '响应数据裁剪', - display: (formState: FormState, { model }: any) => model.type === 'http', + display: (_formState: FormState, { model }: any) => model.type === 'http', items: [ { name: 'afterResponse', diff --git a/packages/editor/src/utils/props.ts b/packages/editor/src/utils/props.ts index 95f140bfb..e61deae2a 100644 --- a/packages/editor/src/utils/props.ts +++ b/packages/editor/src/utils/props.ts @@ -81,7 +81,7 @@ export const styleTabConfig: TabPaneConfig = { fieldConfig: { type: 'text', }, - disabled: (vm: FormState, { model }: any) => + disabled: (_vm: FormState, { model }: any) => model.position === 'fixed' && model._magic_position === 'fixedBottom', }, { @@ -103,7 +103,7 @@ export const styleTabConfig: TabPaneConfig = { fieldConfig: { type: 'text', }, - disabled: (vm: FormState, { model }: any) => + disabled: (_vm: FormState, { model }: any) => model.position === 'fixed' && model._magic_position === 'fixedTop', }, ], @@ -356,7 +356,7 @@ export const advancedTabConfig: TabPaneConfig = { export const displayTabConfig: TabPaneConfig = { title: '显示条件', - display: (vm: FormState, { model }: any) => model.type !== 'page', + display: (_vm: FormState, { model }: any) => model.type !== 'page', items: [ { type: 'display-conds', diff --git a/packages/element-plus-adapter/package.json b/packages/element-plus-adapter/package.json index 42dbdcfe8..9334c0514 100644 --- a/packages/element-plus-adapter/package.json +++ b/packages/element-plus-adapter/package.json @@ -26,6 +26,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/element-plus-adapter", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -39,7 +40,7 @@ "devDependencies": { "@types/node": "^18.19.0", "rimraf": "^3.0.2", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "@tmagic/design": "workspace:*", diff --git a/packages/form/package.json b/packages/form/package.json index c43e15ba9..1fea87c3d 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -35,6 +35,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/form", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -49,16 +50,16 @@ "@types/node": "^18.19.0", "@types/sortablejs": "^1.15.8", "@vitejs/plugin-vue": "^5.1.3", - "@vue/compiler-sfc": "^3.5.0", + "@vue/compiler-sfc": "^3.5.12", "@vue/test-utils": "^2.4.6", "rimraf": "^3.0.2", "sass": "^1.78.0", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "@tmagic/design": "workspace:*", "@tmagic/utils": "workspace:*", - "vue": "^3.5.0", + "vue": ">=3.5.0", "typescript": "*" }, "peerDependenciesMeta": { diff --git a/packages/form/src/index.ts b/packages/form/src/index.ts index b61d2fc5c..e4a708c9d 100644 --- a/packages/form/src/index.ts +++ b/packages/form/src/index.ts @@ -98,8 +98,8 @@ export interface FormInstallOptions { const defaultInstallOpt: FormInstallOptions = {}; export default { - install(app: App, opt?: FormInstallOptions) { - const option = Object.assign(defaultInstallOpt, opt || {}); + install(app: App, opt: FormInstallOptions = {}) { + const option = Object.assign(defaultInstallOpt, opt); // eslint-disable-next-line no-param-reassign app.config.globalProperties.$MAGIC_FORM = option; diff --git a/packages/schema/package.json b/packages/schema/package.json index b0f48f5a4..5e0986082 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -26,13 +26,14 @@ }, "license": "Apache-2.0", "repository": { + "directory": "packages/schema", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, "devDependencies": { "@types/node": "^18.19.0", "rimraf": "^3.0.2", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "typescript": "*" diff --git a/packages/stage/package.json b/packages/stage/package.json index 380b4af73..a918c43d2 100644 --- a/packages/stage/package.json +++ b/packages/stage/package.json @@ -26,6 +26,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/stage", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -44,7 +45,7 @@ "@types/node": "^18.19.0", "rimraf": "^3.0.2", "sass": "^1.78.0", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "@tmagic/core": "workspace:*", diff --git a/packages/stage/src/DragResizeHelper.ts b/packages/stage/src/DragResizeHelper.ts index 3913f7ccc..20dacc42b 100644 --- a/packages/stage/src/DragResizeHelper.ts +++ b/packages/stage/src/DragResizeHelper.ts @@ -402,18 +402,4 @@ export default class DragResizeHelper { return ghostEl; } - - private setGhostElChildrenId(el: Element): void { - for (const child of Array.from(el.children)) { - const el = child as HTMLElement; - const id = getIdFromEl()(el); - if (id) { - setIdToEl()(el, `${GHOST_EL_ID_PREFIX}${id}`); - } - - if (child.children.length) { - this.setGhostElChildrenId(child); - } - } - } } diff --git a/packages/table/package.json b/packages/table/package.json index 1f83b43c3..ad0341e77 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -34,6 +34,7 @@ "node": ">=18" }, "repository": { + "directory": "packages/table", "type": "git", "url": "https://github.com/Tencent/tmagic-editor.git" }, @@ -44,16 +45,15 @@ "@types/lodash-es": "^4.17.4", "@types/node": "^18.19.0", "@vitejs/plugin-vue": "^5.1.3", - "@vue/compiler-sfc": "^3.5.0", - "@vue/test-utils": "^2.4.6", + "@vue/compiler-sfc": "^3.5.12", "rimraf": "^3.0.2", "sass": "^1.78.0", - "vite": "^5.4.3" + "vite": "^5.4.10" }, "peerDependencies": { "@tmagic/design": "workspace:*", "@tmagic/form": "workspace:*", - "vue": "^3.5.0", + "vue": ">=3.5.0", "typescript": "*" }, "peerDependenciesMeta": { diff --git a/packages/table/src/ExpandColumn.vue b/packages/table/src/ExpandColumn.vue index 2fd39037e..2361dfc2a 100644 --- a/packages/table/src/ExpandColumn.vue +++ b/packages/table/src/ExpandColumn.vue @@ -1,4 +1,5 @@