Hacker News new | ask | show | jobs
by avodonosov 989 days ago
Some people share this view.

http://avodonosov.blogspot.com/2014/08/semantic-versioning-i...

https://github.com/semver/semver/issues/771

2 comments

Well they're wrong and so is their language of choice. Any language that pollutes the global namespace when you import a lib did it wrong. For all of JS's faults, they nearly got this one right.

Also, even in JS this is still a problem when you really do want all packages to share the same version of the lib, regardless if you're able to import multiple. Sometimes you just don't want multiple instances.

Npm and yarn offer a solution for that too, by forcing a certain version resolution but that then you're on your own if it isn't compatible.

I would contend that this is an issue with namespace collision / poor namespace management than it is an issue with semver.

For example when I have a REST API endpoint I always prefix it with /<module>/<major-version>/ - would never expect to host both old and new versions on the same base URL