pak
proposal-Array.prototype.includes
pak | proposal-Array.prototype.includes | |
---|---|---|
2 | 4 | |
0 | 141 | |
- | - | |
10.0 | 0.0 | |
almost 9 years ago | over 7 years ago | |
Ruby | HTML | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pak
-
Pragmatic Versioning – An Alternative to Semver
From your issue link:
> Then commons-logging changes its API incompatibly and is released as commons-logging 2.0.1. Authentication adopts commons-logging 2.0.1 while other libraries still depend on 1.1.1
> Now my-application is broken, because the dependency tree includes two versions of commons-logging which share packages, class / functions names, and thus can not be loaded simultaneously.
I absolutely don't see how this is a problem with semver, it is not the responsibility of semver to tell a language how packages should be isolated and loaded. That is a problem of a) the language and b) dependency resolution in the package manager.
> SemVer is a product of Ruby community.
Bundler, by design, does not allow the above, instead having a flat, consistent vision of dependencies.
NPM though, allows that, allowing nested dependencies, by virtue of the ES6 module system importing to a variable in a lexical scope. Go also allows that, by virtue of its imports being scoped to a package (or file, I can't recall).
Ruby can do that kind of isolation too. In fact, I've done it: https://github.com/lloeki/pak
Unless packages leak to globals each version is oblivious to the one next to it. Unless package dependents communicate with one another using objects from the packages they can happily live in their own world. Now if they do, then it's like hitting a HTTP /api/v1 with an HTTP /api/v2 client and somehow wishing things will work. Either the package (which should not leak globals / disallow cross-version communication) or the language (which should not allow leaking globals / detect incompatible communication).
None of this is the responsibility of semver.
-
Rails is not written in Ruby
(the link jumps to some random place for me)
Well, you always could, it was just a bit more involved:
https://github.com/lloeki/pak
proposal-Array.prototype.includes
-
Who did ever see before?
Proposal commit where they changed it from contains to includes for arrays in case anyone is curious: https://github.com/tc39/proposal-Array.prototype.includes/commit/4b6b9534582cb7991daea3980c26a34af0e76c6c
-
Rails is not written in Ruby
JavaScript supports monkey patching by modifying prototype objects too. But it is considered to be bad practice because it modify the behavior globally, and some method name conflict may cause trouble. An example is Array.prototype.contains couldn't be added because it will break another library, so it is renamed to Array.prototype.includes. (Source: https://github.com/tc39/proposal-Array.prototype.includes)
- Mengenal Lebih Jauh Tentang EcmaScript , TC39 , dan EcmaScript Proposal 🚀
-
Hands up if you consider webpack as a horror sometimes
If extending global objects like that wasn't allowed then it wouldn't be a problem - that's the horrific part in my opinion. They even had to rename a new array method as it would've broken a popular library at the time.