Skip to content

Commit d14c948

Browse files
committed
chore: use internal consola to log
1 parent e75d3e1 commit d14c948

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/nuxt/src/module.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineNuxtModule, addComponent, addImports } from '@nuxt/kit';
1+
import { defineNuxtModule, addComponent, addImports, logger } from '@nuxt/kit';
22
import type { NuxtModule } from '@nuxt/schema';
33
import { isPackageExists } from 'local-pkg';
44

@@ -66,20 +66,21 @@ export default defineNuxtModule<VeeValidateModuleOptions>({
6666

6767
function checkForZod(options: VeeValidateModuleOptions) {
6868
if (isPackageExists('zod') && !isPackageExists('@vee-validate/zod')) {
69-
console.log(
69+
logger.warn(
7070
'You seem to be using zod, but you have not installed @vee-validate/zod. Please install it to use zod with vee-validate.'
7171
);
7272
return true;
7373
}
7474

7575
if (isPackageExists('@vee-validate/zod') && !isPackageExists('zod')) {
76-
console.log(
76+
logger.warn(
7777
'You seem to be using @vee-validate/zod, but you have not installed zod. Please install it to use zod with vee-validate.'
7878
);
7979
return true;
8080
}
8181

8282
if (isPackageExists('@vee-validate/zod') && isPackageExists('zod')) {
83+
logger.info('Using zod with vee-validate');
8384
if (options.autoImports) {
8485
addImports({
8586
name: 'toTypedSchema',
@@ -96,20 +97,21 @@ function checkForZod(options: VeeValidateModuleOptions) {
9697

9798
function checkForYup(options: VeeValidateModuleOptions) {
9899
if (isPackageExists('yup') && !isPackageExists('@vee-validate/yup')) {
99-
console.log(
100+
logger.warn(
100101
'You seem to be using yup, but you have not installed @vee-validate/yup. Please install it to use yup with vee-validate.'
101102
);
102103
return true;
103104
}
104105

105106
if (isPackageExists('@vee-validate/yup') && !isPackageExists('yup')) {
106-
console.log(
107+
logger.warn(
107108
'You seem to be using @vee-validate/yup, but you have not installed yup. Please install it to use yup with vee-validate.'
108109
);
109110
return true;
110111
}
111112

112113
if (isPackageExists('@vee-validate/yup') && isPackageExists('yup')) {
114+
logger.info('Using yup with vee-validate');
113115
if (options.autoImports) {
114116
addImports({
115117
name: 'toTypedSchema',

0 commit comments

Comments
 (0)