-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
under PNPM, "npx update-browserslist-db@latest" & "pnpm up caniuse-lite" updates other dependencies #28
Comments
Suggestion : adding a manual update tutorial alternative for people who experience this non wanted side effects |
It should not change versions. It should just call Seems like it is a bug with project structure. Can you investigate it and send PR? |
I am 99.9% certain I saw this in the console during the update : "pnpm u" So it called pnpm u, and that did the rest There is probably a call to pnpm u somewhere |
It is only a single file it is easy to check what does it call. Here is a pnpm update step https://github.com/browserslist/update-db/blob/main/index.js#L287 |
Ohh OK, looks like it's a known issue with PNPM: pnpm/pnpm#5118 My CRA project doesn't have a direct dependency on This might need a disclaimer! Workaround: add |
This dependency is almost certainly a transitive dep in the workflow I just ran and got this message about updating. In nearly all cases printing this is going to be messaging to the wrong people, please consider removing this warning. I will go try and dig around to remove this package from my dependency tree (since I am not sure why it is even in there) if possible, but figured I would drop a message here that printing this message is bad practice even if the |
@wesleytodd do you use Babel or Autoprefixer in your app? Browserslist prints this dependency only if somebody call
How do you suggest to force people updating the browser data instead? Without updating the browser data, all Browserslist config or just default target browsers for Autoprefixer/Babel will contain many outdated versions. It will affect the performance for the whole Web since it will be full of unnecessary polyfills. For instance, in parallel issue people are complaining that their tool use very old Firefox ESR version. And it is result that they don’t see this warning (they use old tool before we introduced the warning). Also, could you please be more cooperative in open source and don’t come with negative (“you are all wrong”) mood. The current Browserslist and warning design is the result that I need to support a tool with 50M weekly downloads. And we have many trade-offs. I am always welcome for suggestions, but if a person tries to help and understand all use cases (feel free to ask me, I will explain). |
Yep
I know nothing about what your package does and so probably cannot say what is the best way. That said, printing on the console is highly disruptive for many reasons. In this case it was printed in some output which was being piped to another command in a cli which expected some particular output. But there are good reasons for libraries not to print to even if it makes sense in the originally designed or intended use case. The main thing is that I don't directly use the package, and when I talked with my colleague they said they ignore it because it is in all sorts of build output for them. So likely it is not even doing what you hope anyway, which was why I commented here in the first place.
Sorry if I came across that way. I did not mean to say you are all wrong, but writing to the output of the program in a package like this is not a good practice. I totally understand the need to do things to support large ecosystems (I maintain some large ones, I promise I really do understand), but imagine if a bunch of packages started doing what this one is doing? It would be a mess. I really do mean this feedback in the most positive and helpful ways. Again, sorry if my wording came across strong, I did not intend that but was simply trying to give feedback on this approach. |
Why they don’t just fix the problem by calling this command from warning?
What is the tool you export data from?
We are doing for 2 reasons:
|
I will unfollow here. Sorry for the disruption. |
In a Turborepo :
I got the notification when I ran pnpm run dev --filter ProjectName
Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme
I ran
But it:
At the end, I had a broken project
The behavior of "update-browserslist-db@latest" should be strictly limited to its purpuse : updating caniuse-lite/Browserslist and nothing else
Note : I had the notification because I had
autoprefixer : 10.4.14
In pnpm lock :
After manual update to 10.4.16 in package.json I had :
The text was updated successfully, but these errors were encountered: