3 ms·
I've been burned twice in the last month from patch upgrades to packages. (And yes, I do lock my dependencies.) The first time was upgrading pstree.remy from 1
by paulddraper 8y ago
I've been burned twice in the last month from patch upgrades to packages. (And yes, I do lock my dependencies.)
The first time was upgrading pstree.remy from 1.1.0 to 1.1.2 to remove the malicious flatmap-stream. Totally incompatible upgrade. Nodemon would just crash, every single time.
The second was in an infrequent general update including a an upgrade of url-polyfill from 1.0.13 to 1.0.14. It changed new URL('https://example.com' https://example.com').host from 'example.com' to incorrect 'example.com:443'. This was used by angular-jwt for whitelisting URLs to send auth creds to, and wound up breaking access for all polyfilled browsers (i.e. just IE) in environments that used the HTTPS's default port (i.e. just production).
Somehow the npm ecosystem has (1) the package manager that most slavishly adheres to semver, while (2) having the community that least closely follows it.
- Klathmon 8y agoOne cool thing that yarn provides (npm might as well, but I'm not sure) is the ability to replace a transitive package with a specific version against what it wants, or even replace it with your own. I'm on mobile but I believe the term for it is "resolutions" and you put it in your package.json I've used it before to replace deep dependencies with vulnerabilities and bugs with fixed versions or in one case my own implementation.
- paulddraper 8y agoYep, and I've done that. Once you encounter and identify a specific problem, it's a nice tool to have.
- dylan-m 8y agoThis is, alas, a result of a community that consists of hundreds of disconnected individuals who are each isolated working on their own little modules and don't need to talk to each other outside of NPM's interface. I doubt this would be such a problem if NPM encouraged larger libraries, or at least distributions of libraries that are managed by teams larger than 1. Distributions would be a convenient patch which also feeds into our love for reinventing the wheel: an NPM package that depends on a bunch of other NPM packages, does a major update every six months, and provides a single (manually aggregated) changelog via a mailing list. Heck, you could probably monetize it with the changelog.
- paulddraper 8y agoI'm not sure why people have chosen such small modules. Maybe ease of publishing means you can maintain 15 Node packages easier that 15 Maven artifacts.