Skip to content
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: move clsx dependency to caret/semver range #316

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

philwolstenholme
Copy link
Contributor

@philwolstenholme philwolstenholme commented Nov 12, 2024

Description

Fixes #317

I noticed when doing some bundle size analysis of my project that npm wasn't deduping my dependency of clsx and CVA's dependency of clsx.

Was the dependency meant to be hardcoded to 2.1.0? This PR changes it to ^2.1.0 so that npm is free to deduplicate the dependency and share the same (major) version of clsx across my project code and CVA.

Additional context

This saves users having to do something like this in their package.json to override the duplicated dependency:

{
  "overrides": {
    "class-variance-authority": {
      "clsx": "^2.0.0"
    }
  }
}

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Copy link

vercel bot commented Nov 12, 2024

@philwolstenholme is attempting to deploy a commit to the Joe Bell OSS Team on Vercel.

A member of the Team first needs to authorize it.

@joe-bell
Copy link
Owner

Cheers Phil! I think that's a great shout

Please could you do the same for packages/cva too?

@philwolstenholme
Copy link
Contributor Author

Cheers Phil! I think that's a great shout

Please could you do the same for packages/cva too?

Done!

@philwolstenholme
Copy link
Contributor Author

Oops sorry, I didn't spot the pnpm-lock.yaml file in the root, I only checked for lock files in each of the packages. What's the easiest way to update that pnpm-lock.yaml file?

@joe-bell
Copy link
Owner

@philwolstenholme just run pnpm i in the root!

Copy link

vercel bot commented Nov 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Nov 25, 2024 3:12pm
docs-beta ✅ Ready (Inspect) Visit Preview Nov 25, 2024 3:12pm

@philwolstenholme
Copy link
Contributor Author

@joe-bell the lock file should be updated now!

Copy link
Owner

@joe-bell joe-bell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legend, thanks again @philwolstenholme

@joe-bell joe-bell merged commit 985dba9 into joe-bell:main Nov 25, 2024
11 checks passed
@joe-bell
Copy link
Owner

Shipped to 0.7.1 and 1.0.0-beta.2. Thanks again!

@johannpinson
Copy link

Awesome, thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(deps): clsx unexpected version
3 participants