From 37091ac4b8cdb4e52233bf893b47b7c21a15cc2c Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 13 Jun 2023 15:34:48 +0800 Subject: [PATCH] build: test --- .github/workflows/nodejs.yml | 1 + package.json | 3 ++- src/types/components.d.ts | 8 -------- .../related/task-timeline/components/Timeline.vue | 4 ---- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 9c731c21..3003504b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -49,6 +49,7 @@ jobs: npm ci npm run lint npm run build --if-present + npm run check-components-types npm run test:unit env: CI: true diff --git a/package.json b/package.json index 35fcf0fc..4769fe5c 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:lint-staged": "lint-staged", - "prepare": "husky install" + "prepare": "husky install", + "check-components-types": "if (! git diff --cached --quiet -- ./src/types/*); then echo 'Running `npm run build` to match new components types...' >&2; fi" }, "dependencies": { "axios": "^0.24.0", diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 05ec63bd..89de7ae4 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -18,14 +18,6 @@ declare module '@vue/runtime-core' { ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] - ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] - ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] - ElOption: typeof import('element-plus/es')['ElOption'] - ElPagination: typeof import('element-plus/es')['ElPagination'] - ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] - ElPopover: typeof import('element-plus/es')['ElPopover'] - ElProgress: typeof import('element-plus/es')['ElProgress'] - ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] diff --git a/src/views/dashboard/related/task-timeline/components/Timeline.vue b/src/views/dashboard/related/task-timeline/components/Timeline.vue index 208586fa..7ccf984f 100644 --- a/src/views/dashboard/related/task-timeline/components/Timeline.vue +++ b/src/views/dashboard/related/task-timeline/components/Timeline.vue @@ -128,10 +128,6 @@ limitations under the License. --> }); } - function getURI(uri: { uriRegex: string; uriPath: string }) { - return uri && uri.uriRegex && uri.uriPath ? `(${uri.uriRegex || ""} | ${uri.uriPath || ""})` : ""; - } - function resize() { const observer = new ResizeObserver((entries) => { const entry = entries[0];