-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Question about dependencies #2993
Comments
This PR might shine some light on the decision to use strict dependencies: #2929
|
@connor-baer interesting, thanks. But the Greenkeeper strategy doesn't seem to be working. Next.js is still fixed (via styled-jsx) to a two-month old version of Stylis, which has had ten patches sense then. |
@callumlocke Flat out, this is mostly my fault, I need to keep up with outdated packages 😄, creating a PR now! Fyi greenkeeper was disabled cause of issues with NPM as far as I've heard from Leo :) |
Is strict version really necessary? It bloating dependencies so much. I think tilde ~ is best option, because tilde allows only different patch level and could help to remove not necessary different dependencies of exact versions. |
I did some research. There is diff: As you can see many dependencies use never patch version, what is great because it can be critical fix or something like that. EDIT: Test is only with NextJS dependencies, it not cover production app where difference will be probably disadvantage to strict version. |
@timneutkens thanks for upgrading the dependencies. But won't this just keep happening? No one has answered my question: Why doesn't Zeit simply follow the Node.js convention of defaulting to |
Another thing the pinned dependencies does is make it more difficult for Yarn or npm to dedupe dependencies, which makes for larger node_modules directories and larger bundles in some cases. |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
(I searched for duplicates, apologies if this has been discussed before.)
The package.json files in Next.js and styled-jsx omit the conventional
^
on dependency versions.Why is this? I'm guessing it's intentional, as it seems to be this way on multiple Zeit projects, and you obviously know what you're doing.
Why it causes a problem for me: I'm making a Next.js website. I found a bug coming from Stylis the other night, and it got fixed by @thysultan quickly. But then I had to wait for styled-jsx to be republished, which happened the next day. And Next.js is still not republished (at time of writing), so I'm still blocked until that happens.
If it's a defence against regressions in dependencies, FWIW, it seems like opting out of automatic patches does more harm than good. I know patch releases can sometimes introduce regressions, but they fix bugs more often. The approach would make sense to me if you had an automated nightly test-and-republish system to ensure you pick up patches quickly, but this doesn't seem to be in place – for example, until a few hours ago, styled-jsx was fixed to a two-month-old Stylis version (3.2.8), from July 24. Stylis has released 10 patches over that time, and none of them made it into styled-jsx until 5 hours ago. (And they're still not in Next.js.) On balance, wouldn't it make more sense to use
^
?The text was updated successfully, but these errors were encountered: