jaredhanson / electrolyte

Elegant dependency injection for Node.js.
MIT License
564 stars 59 forks source link

Failure to uphold semver expectations #57

Closed JDvorak closed 7 years ago

JDvorak commented 7 years ago

https://github.com/jaredhanson/electrolyte/blob/548b5ea846ee4ef2406163fde57a3c46d2a776e4/lib/container.js#L132

Container#create() returns promises in 0.4.0 (a "minor" update), therefore it breaks all codebases relying on the 0.3.0 interface.

jaredhanson commented 7 years ago

From http://semver.org/

Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

There's no failure here.

JDvorak commented 7 years ago

My mistake!

JDvorak commented 7 years ago

Tho' for the record, I think the major number zero special exception is a design error. I stand by my mental error of assuming greater universality of the semver system.

The problem with the exception of 0.x.x is that it blocks the information provided by the version number. And, this exception stands for purposes which are dubious. As many of us who used node 0.10 for years know, a zero doesn't stop anything from being popular and widely relied upon. While it is good to have a signal of a promise of stability from provider to consumer, overloading the first digit with this is not a great move as it destroys information concerning backwards compatibility.

Yeah, this probably belongs somewhere else, but... i'm embarrassed by my issue and will defend my engineerly credentials.