Skip to content

Commit ad6ae1d

Browse files
authored
Merge pull request #19 from vbenjs/feature/type-check-0705
fix: Typecheck and loop dependency problem repair
2 parents f163133 + 527023a commit ad6ae1d

File tree

21 files changed

+462
-750
lines changed

21 files changed

+462
-750
lines changed

.github/release-drafter.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,17 @@ categories:
1616
- "enhancement"
1717
- title: "🐞 Bug Fixes"
1818
labels:
19-
- "fix"
20-
- "bugfix"
2119
- "bug"
2220
- title: 📝 Documentation updates
2321
labels:
2422
- "documentation"
25-
- "docs"
2623
- title: 👻 Maintenance
2724
labels:
2825
- "chore"
2926
- "dependencies"
3027
collapse-after: 5
3128
- title: 🚦 Tests
3229
labels:
33-
- "test"
3430
- "tests"
3531
- title: "Breaking"
3632
label: "breaking"

.tazerc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"exclude": ["zx", "eslint"]
2+
"exclude": ["zx", "eslint", "eslint-plugin-unused-imports"]
33
}

internal/lint-configs/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"eslint-plugin-prettier": "^5.1.3",
4747
"eslint-plugin-regexp": "^2.6.0",
4848
"eslint-plugin-unicorn": "^54.0.0",
49-
"eslint-plugin-unused-imports": "^4.0.0",
49+
"eslint-plugin-unused-imports": "^3.2.0",
5050
"eslint-plugin-vitest": "^0.5.4",
5151
"eslint-plugin-vue": "^9.27.0",
5252
"globals": "^15.8.0",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "vben-admin",
3-
"version": "5.0.0-alpha.1",
2+
"name": "vben-admin-pro",
3+
"version": "5.0.0",
44
"private": true,
55
"keywords": [
66
"monorepo",

packages/@core/ui-kit/shadcn-ui/src/components/floating-button-group/floating-button-group.vue

Lines changed: 0 additions & 46 deletions
This file was deleted.

packages/@core/ui-kit/shadcn-ui/src/components/floating-button-group/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@core/ui-kit/shadcn-ui/src/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export * from './checkbox';
88
export * from './context-menu';
99
export * from './count-to-animator';
1010
export * from './dropdown-menu';
11-
export * from './floating-button-group';
1211
export * from './full-screen';
1312
export * from './hover-card';
1413
export * from './icon';

packages/@core/ui-kit/shadcn-ui/src/components/ui/select/SelectContent.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import {
1212
useForwardPropsEmits,
1313
} from 'radix-vue';
1414
15-
import { SelectScrollDownButton, SelectScrollUpButton } from '.';
15+
import SelectScrollDownButton from './SelectScrollDownButton.vue';
16+
import SelectScrollUpButton from './SelectScrollUpButton.vue';
1617
1718
defineOptions({
1819
inheritAttrs: false,

packages/business/access/src/generate-menu-and-routes/generate-routes-backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { mapTree } from '@vben-core/toolkit';
1515
async function generateRoutesByBackend(
1616
options: GeneratorMenuAndRoutesOptions,
1717
): Promise<RouteRecordRaw[]> {
18-
const { fetchMenuListAsync, layoutMap, pageMap } = options;
18+
const { fetchMenuListAsync, layoutMap = {}, pageMap = {} } = options;
1919

2020
try {
2121
const menuRoutes = await fetchMenuListAsync?.();

packages/business/layouts/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"@vben-core/stores": "workspace:*",
4747
"@vben-core/tabs-ui": "workspace:*",
4848
"@vben-core/toolkit": "workspace:*",
49-
"@vben/constants": "workspace:*",
5049
"@vben/locales": "workspace:*",
5150
"@vben/widgets": "workspace:*",
5251
"vue": "^3.4.31",

packages/business/layouts/src/basic/layout.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ function toggleSidebar() {
152152

153153
<template #floating-groups>
154154
<VbenBackTop />
155-
<!-- <VbenFloatingButtonGroup /> -->
156155
</template>
157156

158157
<!-- logo -->

packages/business/layouts/src/basic/tabbar/use-tabs.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { IContextMenuItem } from '@vben-core/tabs-ui';
22
import type { TabItem } from '@vben-core/typings';
33
import type {
44
RouteLocationNormalized,
5-
RouteRecordNormalized,
5+
RouteLocationNormalizedGeneric,
66
} from 'vue-router';
77

88
import { computed, ref, watch } from 'vue';
@@ -34,8 +34,7 @@ function useTabs() {
3434
});
3535

3636
const { locale } = useI18n();
37-
const currentTabs =
38-
ref<(RouteLocationNormalized | RouteRecordNormalized)[]>();
37+
const currentTabs = ref<RouteLocationNormalizedGeneric[]>();
3938
watch([() => tabsStore.getTabs, () => locale.value], ([tabs, _]) => {
4039
currentTabs.value = tabs.map((item) => wrapperTabLocale(item));
4140
});
@@ -60,9 +59,7 @@ function useTabs() {
6059
await tabsStore.closeTabByKey(key, router);
6160
};
6261

63-
function wrapperTabLocale(
64-
tab: RouteLocationNormalized | RouteRecordNormalized,
65-
) {
62+
function wrapperTabLocale(tab: RouteLocationNormalizedGeneric) {
6663
return {
6764
...tab,
6865
meta: {

packages/business/universal-ui/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
"dependencies": {
4343
"@vben-core/design": "workspace:*",
4444
"@vben-core/iconify": "workspace:*",
45-
"@vben-core/preferences": "workspace:*",
4645
"@vben-core/shadcn-ui": "workspace:*",
47-
"@vben/chart-ui": "workspace:*",
4846
"@vben/locales": "workspace:*",
4947
"@vben/types": "workspace:*",
5048
"@vueuse/integrations": "^10.11.0",

packages/business/universal-ui/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"extends": "@vben/tsconfig/web.json",
44
"compilerOptions": {
5-
"types": ["@vben/types/window"]
5+
"types": ["@vben/types/global"]
66
},
77
"include": ["src"],
88
"exclude": ["node_modules"]

packages/business/widgets/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@
4646
"@vben-core/preferences": "workspace:*",
4747
"@vben-core/shadcn-ui": "workspace:*",
4848
"@vben-core/toolkit": "workspace:*",
49-
"@vben/chart-ui": "workspace:*",
5049
"@vben/locales": "workspace:*",
5150
"@vueuse/core": "^10.11.0",
52-
"@vueuse/integrations": "^10.11.0",
53-
"qrcode": "^1.5.3",
5451
"vue": "^3.4.31",
5552
"vue-router": "^4.4.0"
5653
},

packages/business/widgets/src/preferences/blocks/layout/breadcrumb.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ const disableItem = computed(() => {
3737
<SwitchItem v-model="breadcrumbHideOnlyOne" :disabled="disableItem">
3838
{{ $t('preferences.breadcrumb.hide-only-one') }}
3939
</SwitchItem>
40-
<SwitchItem v-model="breadcrumbShowHome" :disabled="disableItem">
41-
{{ $t('preferences.breadcrumb.home') }}
42-
</SwitchItem>
4340
<SwitchItem v-model="breadcrumbShowIcon" :disabled="disableItem">
4441
{{ $t('preferences.breadcrumb.icon') }}
4542
</SwitchItem>
43+
<SwitchItem
44+
v-model="breadcrumbShowHome"
45+
:disabled="disableItem || !breadcrumbShowIcon"
46+
>
47+
{{ $t('preferences.breadcrumb.home') }}
48+
</SwitchItem>
4649
<ToggleItem
4750
v-model="breadcrumbStyleType"
4851
:disabled="disableItem"

packages/types/global.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,21 @@ import 'vue-router';
55
declare module 'vue-router' {
66
interface RouteMeta extends IRouteMeta {}
77
}
8+
9+
declare global {
10+
// interface Window {
11+
const __VBEN_ADMIN_METADATA__: {
12+
authorEmail: string;
13+
authorName: string;
14+
authorUrl: string;
15+
buildTime: string;
16+
dependencies: Record<string, string>;
17+
description: string;
18+
devDependencies: Record<string, string>;
19+
homepage: string;
20+
license: string;
21+
repositoryUrl: string;
22+
version: string;
23+
};
24+
// }
25+
}

packages/types/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
},
2929
"./global": {
3030
"types": "./global.d.ts"
31-
},
32-
"./window": {
33-
"types": "./window.d.ts"
3431
}
3532
},
3633
"publishConfig": {

packages/types/window.d.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)