-
Notifications
You must be signed in to change notification settings - Fork 227
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
inline isArray #238
inline isArray #238
Conversation
Inlining is a perfectly acceptable solution and entails negligible maintenance cost. |
I dig the spirit but it's copying the package verbatim 🤒 |
from my understanding the main issue is not the size but the extra downloads, we talked at the wg meeting of doing some similar things for some of our other deps like process-nextick-args and buffer-shims |
The issue wasn't removing a dependency for the sake of it being another dependency. It was that the ecosystem is at a place where shims for |
I don't think we're against removing it per-say just that it would be a major version bump to remove it completely and it wouldn't make sense to be one on its own, at the same time others have expressed issues with there being too many dependencies making npm installs take a lot of time and the 3 line isArray module seemed like low hanging fruit |
It wouldn't have to be on its own. It could have waited for whenever the major bump came is all.
I can see the pressure from that side, though with yarn install times are much better 😀 |
This change violates Licensing issues aside, #234 really seems like a much better solution in general (even if it can only happen at the next major version bump). |
yeah I should probably pull in a copy of the isarray license unless @juliangruber chimes in that simply referencing the license instead of including it (but including the copyright notice) is fine |
Isn't this what |
Yes, I think we can use |
yeah we could do that for isArray, process-nextick-args,buffer-shims,core-util-is, and util-deprecate. inherits and string_decoder are depended upon by other things so it's highly likely they would be able to take advantage of deduping. That doesn't actually address @jdalton's main point which was that we don't actually need Array.isArray and we should remove it in the next major version which I think is pretty sensible. |
@calvinmetcalf I absolutely agree that we should drop support for older versions of Node & Browsers whenever we bump the major. |
OT: How does the license even make sense here? I mean... it's nice that someone put it into a convenient npm package and I realize that npm packages require license but licensing |
I'm with @kangax here. I feel like it's rather different than the scenario you've mentioned, @jdalton. All the package is is a single line function. It's the same function I've written many times in the past, but I would never consider it owned by somebody else purely because somebody else has written the same thing and just so happened to have slapped an MIT license to it. |
I don't think licensing applies to labor work but instead to an intellectual property, which this isn't. No offense to @juliangruber, who I'm sure put in the work, but it's simply wrong to attach an MIT license (that carries restrictions) to a one-line pattern that was discovered way back and has been used extensively ever since. Both Mark Miller and I wrote about it as far back as in 2009 (without claiming any kind of copyright; it's just a language that we all use and learn/discover/share!) — http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ |
As others have mentioned they can leverage bundle deps and drop in major version bump so folks don't have to bikeshed whether it's OK to steal someone else's work. Geez y'all. It's all good 😎 |
This is not a matter of interpretation or judging whether you think the licensing seems fit for the amount of code. This library is licensed as MIT and thus needs to have the license attached, wherever it's used. You're free not to use it, to hate it, rewrite it, whatever. But that's how it is. I'm for using bundled dependencies too for that matter, if this really is a problem that needs to be solved. I would also gladly accept 1 Mio USD to lift the licensing restrictions attached to said piece of software. Up to you! EDIT: Also keep in mind that a one line module always is more than one line of code. It's documentation, tests, and history in the repo. ..Summoning @sindresorhus :) |
hey @juliangruber thanks for publishing isArray as a module, I think we're going to go with the bundledDependencies option, |
This piqued my interest. IANAL, but surely copyright can't apply for something this small, right? So I did some research, and found there's a Creativity Requirement to US Copyright. It's apparently not very strict, but the uslegal.com explanation does include the following:
IANAL, but I'm willing to wager @juliangruber's 1 Mio USD that is-array's copyright wouldn't hold in court. |
https://www.softwarefreedom.org/resources/2007/originality-requirements.html
|
@allenwb I think that strengthens my argument. This is the portion that I'd focus on:
I'd also mention that the opening line may be misleading.
It may be the case that, the court hasn't needed to rule on many pieces of code which are as small as is-array. |
While the license may make sense for the package itself, which prescribes a bit of effort, thinking that you are entitled to attribution for the code itself -- a one liner you certainly didn't "invent" -- is a waste of everyone's time, to put mildly. |
hey guys these are some great discussions that should probably be had over on the isArray repo, so I created an issue there (juliangruber/isarray#14) and am going to lock this one |
alternative to #234 if we don't want to deal with potential breaking changes