-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Make swr zero dependency #1024
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
Make swr zero dependency #1024
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 6d34fe5:
|
This does more harm than good. Because swr is a library, and not a built distribution (like a CLI), literally all this does is make the end-users' applications larger because any other deps that relied on Dequal itself has no dependencies & has been extremely stable, so you had no motivation to do this. This was done purely as a "dependency free" marketing tactic which is total bullshit & breeds distrust in library authors, like myself, who actually make dependency-free packages. |
While this stands, as per MIT licensing, you have to include my license within your |
@lukeed My apologies to the inappropriate way of using I'm super appreciated all the work you've done and the awesome libraries you built, feel sorry to bring such sore feeling to you because of my bad description which is definitely not anyone's purpose to harm origin author. I'll file another PR to include the license of |
The PR title is "Make swr zero dependency" – I'm not sure how I've been misled here.
Thank you for agreeing to update the LICENSE – I'll wait for that PR – but the rest of my points still stand: inlining
Thank you for appreciating my work, but this does not align with those words. At best, this is hiding your appreciation. And this is Vercel shipping my code as their own, which it is not: https://www.diffchecker.com/UbAYQ6Ht |
First of all, thank you for your great work on the
I have to clarify that this is incorrect, we are not marketing SWR as "dependency free" anywhere. The intention behind this change was to make the overall package install size smaller, as we're only using a small part of lib ( That said, it's still possible to cause a larger app size if there're other dependencies using |
Agree to revert it back according the smallest effort. Haven't found a good way to balance vendoring it and reducing node module size at the same time |
You'd be saving 1 Skypack network request, at most. And even under this scenario, you'd be missing out on
Yes, that is an obvious course-correction. In general, you shouldn't be keen on copy-pasting library code into other libraries.
Your package size does not / did not change. You just skipped the link.
It doesn't matter if you were only using Finally, by inlining the dependency, you take on the risk/maintenance burden directly. I see you immediately ran into this (https://github.com/vercel/swr/pull/1027/files#diff-a1726aa39bf868ad52381ffb12c3fe184f0fd0eb6e8181563fe3a7cba3d38602R18) despite the fact that you only had 18 sLOC of source to copy-paste. Ethics aside, this should have been reason enough – and enough of a red-flag to yourselves – that inlining is not a great approach. Edit: Removed inaccurate & unfair assumption about an unrelated project. |
This change was reverted (#1085) and a new stable release ( |
Thank you |
make swr core dependent less and light weight. the deep equal won't change much, now make as a vendor of swr lib.