Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 25a1e93a
authored
Jul 10, 2024
by
vince
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: optimize the dependency detection script prompt and fix the loop dependency problem
1 parent
a765d3bb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
56 additions
and
51 deletions
package.json
packages/@core/forward/helpers/package.json
packages/@core/locales/src/index.ts
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/Toast.vue
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/Toaster.vue
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/index.ts
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/toast.ts
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/use-toast.ts
packages/icons/build.config.ts
packages/icons/package.json
pnpm-lock.yaml
scripts/vsh/src/check-dep/index.ts
package.json
View file @
25a1e93
...
...
@@ -27,7 +27,7 @@
"build"
:
"cross-env NODE_OPTIONS=--max-old-space-size=8192 turbo build"
,
"build:docker"
:
"./build-local-docker-image.sh"
,
"changeset"
:
"pnpm exec changeset"
,
"check"
:
"pnpm run check:dep && pnpm run check:circular && pnpm run check:type && pnpm run check:spell"
,
"check"
:
"pnpm run check:dep && pnpm run check:circular && pnpm run check:type && pnpm run check:
c
spell"
,
"check:circular"
:
"vsh check-circular"
,
"check:dep"
:
"vsh check-dep"
,
"check:cspell"
:
"cspell lint
\"
**/*.ts
\"
\"
**/README.md
\"
\"
.changeset/*.md
\"
--no-progress"
,
...
...
packages/@core/forward/helpers/package.json
View file @
25a1e93
...
...
@@ -36,7 +36,6 @@
}
},
"dependencies"
:
{
"@vben-core/toolkit"
:
"workspace:*"
,
"@vben-core/typings"
:
"workspace:*"
,
"vue-router"
:
"^4.4.0"
}
...
...
packages/@core/locales/src/index.ts
View file @
25a1e93
...
...
@@ -36,6 +36,7 @@ async function setupI18n(app: App, options: LocaleSetupOptions = {}) {
}
export
{
$t
,
i18n
,
loadLocaleMessages
,
loadLocalesMap
,
setupI18n
};
export
type
{
CompileError
}
from
'@intlify/core-base'
;
export
{
useI18n
}
from
'vue-i18n'
;
export
type
{
Locale
}
from
'vue-i18n'
;
export
type
{
ImportLocaleFn
};
export
type
{
Locale
}
from
'vue-i18n'
;
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/Toast.vue
View file @
25a1e93
...
...
@@ -9,7 +9,7 @@ import {
useForwardPropsEmits
,
}
from
'radix-vue'
;
import
{
type
ToastProps
,
toastVariants
}
from
'.'
;
import
{
type
ToastProps
,
toastVariants
}
from
'.
/toast
'
;
const
props
=
defineProps
<
ToastProps
>
();
...
...
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/Toaster.vue
View file @
25a1e93
<
script
setup
lang=
"ts"
>
import
{
isVNode
}
from
'vue'
;
import
{
Toast
,
ToastClose
,
ToastDescription
,
ToastProvider
,
ToastTitle
,
ToastViewport
,
}
from
'.'
;
import
Toast
from
'./Toast.vue'
;
import
ToastClose
from
'./ToastClose.vue'
;
import
ToastDescription
from
'./ToastDescription.vue'
;
import
ToastProvider
from
'./ToastProvider.vue'
;
import
ToastTitle
from
'./ToastTitle.vue'
;
import
ToastViewport
from
'./ToastViewport.vue'
;
import
{
useToast
}
from
'./use-toast'
;
const
{
toasts
}
=
useToast
();
...
...
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/index.ts
View file @
25a1e93
import
type
{
ToastRootProps
}
from
'radix-vue'
;
import
type
{
HTMLAttributes
}
from
'vue'
;
import
{
type
VariantProps
,
cva
}
from
'class-variance-authority'
;
export
{
default
as
Toast
}
from
'./Toast.vue'
;
export
{
default
as
ToastAction
}
from
'./ToastAction.vue'
;
export
{
default
as
ToastClose
}
from
'./ToastClose.vue'
;
...
...
@@ -12,28 +6,6 @@ export { default as ToastProvider } from './ToastProvider.vue';
export
{
default
as
ToastTitle
}
from
'./ToastTitle.vue'
;
export
{
default
as
ToastViewport
}
from
'./ToastViewport.vue'
;
export
{
default
as
Toaster
}
from
'./Toaster.vue'
;
export
{
toast
,
useToast
}
from
'./use-
toast'
;
export
*
from
'./
toast'
;
export
const
toastVariants
=
cva
(
'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full'
,
{
defaultVariants
:
{
variant
:
'default'
,
},
variants
:
{
variant
:
{
default
:
'border bg-background border-border text-foreground'
,
destructive
:
'destructive group border-destructive bg-destructive text-destructive-foreground'
,
},
},
},
);
type
ToastVariants
=
VariantProps
<
typeof
toastVariants
>
;
export
interface
ToastProps
extends
ToastRootProps
{
class
?:
HTMLAttributes
[
'class'
];
onOpenChange
?:
((
value
:
boolean
)
=>
void
)
|
undefined
;
variant
?:
ToastVariants
[
'variant'
];
}
export
{
toast
,
useToast
}
from
'./use-toast'
;
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/toast.ts
0 → 100644
View file @
25a1e93
import
type
{
ToastRootProps
}
from
'radix-vue'
;
import
type
{
HTMLAttributes
}
from
'vue'
;
import
{
type
VariantProps
,
cva
}
from
'class-variance-authority'
;
export
const
toastVariants
=
cva
(
'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full'
,
{
defaultVariants
:
{
variant
:
'default'
,
},
variants
:
{
variant
:
{
default
:
'border bg-background border-border text-foreground'
,
destructive
:
'destructive group border-destructive bg-destructive text-destructive-foreground'
,
},
},
},
);
type
ToastVariants
=
VariantProps
<
typeof
toastVariants
>
;
export
interface
ToastProps
extends
ToastRootProps
{
class
?:
HTMLAttributes
[
'class'
];
onOpenChange
?:
((
value
:
boolean
)
=>
void
)
|
undefined
;
variant
?:
ToastVariants
[
'variant'
];
}
packages/@core/ui-kit/shadcn-ui/src/components/ui/toast/use-toast.ts
View file @
25a1e93
import
type
{
ToastProps
}
from
'.'
;
import
type
{
ToastProps
}
from
'.
/toast
'
;
import
{
computed
,
ref
}
from
'vue'
;
import
type
{
Component
,
VNode
}
from
'vue'
;
...
...
packages/icons/build.config.ts
View file @
25a1e93
...
...
@@ -4,4 +4,5 @@ export default defineBuildConfig({
clean
:
true
,
declaration
:
true
,
entries
:
[
'src/index'
],
externals
:
[
'vue'
],
});
packages/icons/package.json
View file @
25a1e93
...
...
@@ -35,7 +35,6 @@
}
},
"dependencies"
:
{
"@vben-core/iconify"
:
"workspace:*"
,
"vue"
:
"^3.4.31"
"@vben-core/iconify"
:
"workspace:*"
}
}
pnpm-lock.yaml
View file @
25a1e93
...
...
@@ -559,9 +559,6 @@ importers:
packages/@core/forward/helpers
:
dependencies
:
'
@vben-core/toolkit'
:
specifier
:
workspace:*
version
:
link:../../shared/toolkit
'
@vben-core/typings'
:
specifier
:
workspace:*
version
:
link:../../shared/typings
...
...
@@ -939,9 +936,6 @@ importers:
'
@vben-core/iconify'
:
specifier
:
workspace:*
version
:
link:../@core/shared/iconify
vue
:
specifier
:
^3.4.31
version
:
3.4.31(typescript@5.5.3)
packages/styles
:
dependencies
:
...
...
scripts/vsh/src/check-dep/index.ts
View file @
25a1e93
...
...
@@ -10,6 +10,7 @@ async function runDepcheck() {
packages
.
map
(
async
(
pkg
)
=>
{
if
(
[
'@vben/backend-mock'
,
'@vben/commitlint-config'
,
'@vben/eslint-config'
,
'@vben/lint-staged-config'
,
...
...
@@ -40,6 +41,17 @@ async function runDepcheck() {
ignorePatterns
:
[
'dist'
,
'node_modules'
,
'public'
],
});
// 删除file:前缀的依赖提示,该依赖是本地依赖
Reflect
.
deleteProperty
(
unused
.
missing
,
'file:'
);
Object
.
keys
(
unused
.
missing
).
forEach
((
key
)
=>
{
unused
.
missing
[
key
]
=
unused
.
missing
[
key
].
filter
(
(
item
:
string
)
=>
!
item
.
startsWith
(
'/'
),
);
if
(
unused
.
missing
[
key
].
length
===
0
)
{
Reflect
.
deleteProperty
(
unused
.
missing
,
key
);
}
});
if
(
Object
.
keys
(
unused
.
missing
).
length
===
0
&&
unused
.
dependencies
.
length
===
0
&&
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment