-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(nuxt-module): add critical packages to module's dependencies #531
Conversation
@sadeghbarati Didn't realize it until I made the PR sorry for that😅 I modified it to include only the changes for this PR |
@MuhammadM1998, another point regarding the |
Oh you're right will push changes later today |
@sadeghbarati Refactored the CLI to check if |
Let's wait for Zernonia's opinion cause he is the author of this module 💯 |
Thanks for the PR @MuhammadM1998 .. One question tho, if user decide to use other version of Radix Vue, how can they install a different version of it? |
@zernonia Thanks! Users can use overrides to use a different version. "dependencies": {
"shadcn-nuxt": "^3.0.0", // Has radix-vue v1.7.3 as a dependency
},
"overrides": {
"radix-vue": "^2.0.0", // This version is what will be installed
} |
@MuhammadM1998 Let's remove Most of the users are unaware of overrides module features in packageManagers |
Also, let's consider checking this Nuxt PR too: nuxt/nuxt#27155 If it gets merged we don't need |
Normally a user won't need to use overrides. A case where a user would need that is that shadcn-nuxt bumped radix-vue to 1.7.8 for example and it caused problems for the user so then he'd use overrides to install radix-vue 1.7.7. That's a slim chance as you see. I'm okay with removing it from dependencies (maybe move it to peerDeps?) but imo its better this way. I'll wait for you decision. Feel free to push changes too! |
-- It's an `embla-carousel-vue` dependency anyways
@MuhammadM1998 Let's merge it for now for further PRs 🙏 |
Resolves #529
This adds the following packages as
dependencies
so that the user don't need to install them.This means a cleaner package.json, I've updated the playground accordingly
Note that
clsx
is already a dependency inclass-variance-authority
and we're using the same major versionv2
so it can also be safely removedTested locally in the playground & a separate project and it works as expected. run
pnpm why radix-vue
and you'll see a similar dependency tree