-
Notifications
You must be signed in to change notification settings - Fork 920
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
add Prettify type helper locally #541
Conversation
Yeah, we really need to tackle this issue, where that deps local version != deployed version. #444 is a solution, but I'm not 100% sold on it. I'll comment soon. The other option is locking the version in Also for this PR: Shouldn't we just update viem (so it saves in the .lock file executed locally). It'll still fail for SE-2 forks/clones, but it'll be fixed on fresh installs. Thanks! |
Answering myself here, since I didn't read this:
Make sense! Merging this! but will still love to hear your thoughts here: #541 (comment) |
Doing some very basic research, I don't see any big drawbacks of removing "^" so I am completely up for it 🙌 but would love to know other thoughts if there are any big drawbacks that I might have missed also cc @damianmarti @sverps maybe too |
The main difference I see is that our dependencies (for example "our-dep": "1.0.0") have their package.json with their dependencies inside it (for ex "child-dep": "^2.0.0"), and that child deps will be different without package.lock. It's a small chance that one child dep will break our dep, but we have hundreds of child deps and because of that chances of breaking again someday are not too small. regarding this pr fix, we should avoid importing like that, because this type is not even exported from viem |
I always prefer to have a fixed version of everything, I really don't like ^ too much because sometimes there are some breaking changes between minor versions (if the .lock is used, this is not an issue because the version is fixed there). So, I don't see any issue with having a version fixed at the package.json (this library or whatever), and being explicit when we want to update it to another fixed version. You guys are great! You are on all the little details! :-) |
Thanks @technophile-04 @rin-st @damianmarti for your view on this <3 I'll move the discussion to the pnpm PR, since If we go with fixed versions, we could rethink pnpm. I'll prepare my allegations soon haha |
Description
It seems that NextJs deployments fails since in latest version
viem
(1.12.x) they have movedPrettify
type from "viem/dist/types/types/utils" => "viem/types/utils"Now due to #419, our version viem exports from "dist" but when we upload to vercel it uses new viem where the location from which it is exported is changed
Reported BuidlGuidl/PWA-base#1 (comment) & #444 (comment)
As mentioned by Rinat #444 (comment) adding
Prettify
locally works and also it makes sense to localize this "helper type" since it is famous and we also shouldn't rely on Viem to export this for us because they might move to another place in future/change name/remove without mentioning it since its not their main api