TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Micropackages and Open Source Trust Scaling

291 pointsby s4chinabout 9 years ago

28 comments

ergothusabout 9 years ago
I think this is a serious set of reasonable thoughts about the incident, and don&#x27;t want to demean the article.<p>That said, I wish more people would talk both sides. Yes, every dependency has a cost. BUT the alternatives aren&#x27;t cost free either. For all the ranting against micropackages, I&#x27;m not seeing a good pro&#x2F;con discussion.<p>I think there are several lessons to be learned here (nixing &quot;unpublish&quot; is a good one, and I&#x27;ve not been impressed with the reaction from npm there) the most important of which is probably that we should change our build process: Dev should be pulling in updates freely to maintain the easy apply-fixes-often environment that has clearly been popular, then those should be pinned when they go past dev (to ensure later stages are consistent) and we should have some means of locally saving the dependencies to reduce our build-time dependency on package repos.<p>Sadly, though, I&#x27;ve not seen a lot of discussion on a reasonable way to apply those lessons. I&#x27;ve seen a lot of smugness (&quot;Any engineer that accepts random dependencies should be fired on the spot&quot;, to paraphrase an HN comment), a lot of mocker (&quot;haha, look at how terrible JS is!&quot;), and a lot of rants against npm as a private entity that can clearly make mistakes, but not much in the way of constructive reflection.<p>Clearly JS and NPM have done a lot RIGHT, judging by success and programmer satisfaction. How do we keep that right and fix the wrong?
评论 #11355568 未加载
评论 #11354984 未加载
评论 #11354455 未加载
评论 #11354749 未加载
评论 #11354583 未加载
评论 #11355076 未加载
scrollawayabout 9 years ago
&gt; <i>Sentry depends on it 20 times. 14 times it&#x27;s a pin for 0.0.1, once it&#x27;s a pin for ^1.0.0 and 5 times for ~1.0.0.</i><p>This is what I was mentioning in the other thread (and being called a troll for... sigh). I appreciate the idealism of &quot;if we have micromodules, we don&#x27;t have to reimplement common helper functions, which scales to <i>thousands</i> of bytes saved!&quot;. But in practice, there&#x27;s craptons of duplicate dependencies with different versions. Which negatively scales to hundreds of kilobytes wasted. In code, in downloads, in install time, in developer time (because devs install things too. A lot more than end users in fact...), etc.<p>One of the many problems which means what&#x27;s on paper doesn&#x27;t at all correspond to what we actually get.
评论 #11353546 未加载
评论 #11353522 未加载
评论 #11354954 未加载
评论 #11354576 未加载
l1ambdaabout 9 years ago
The problem with standard libraries is they are a standard library. A place where good code goes to die. Standard libraries also mean you can&#x27;t use the particular version of the module you need; now you are pinned to the version of the standard library comes with the version of the language you are running on. The workaround there is to fork out the standard library code into...a module. Now, a lot of these modules are designed for old JS runtimes like old versions of IE, so you wouldn&#x27;t have a standard library anyway.<p>There&#x27;s plenty of good libraries like lodash and math.js that are pretty much the next best thing to a standard library.<p>If your dependency tree sucks, that&#x27;s a personal problem. It&#x27;s not npm, JavaScript or node&#x27;s fault. That&#x27;s like blaming git because you pushed some crappy code.<p>The problem was fixed 10 minutes later anyway. This whole discussion surrounding this is a combination of knee-jerk reaction, &quot;waah&quot;, and realization of &quot;Oh shit, depending on external code means <i>we are dependent on external code!</i>&quot;<p>If you want to code without dependencies, go write JavaEE. Everything is included, you don&#x27;t need any third party dependencies, and you can use cutting-edge tech like JSP, app servers and JavaServer faces.
评论 #11354393 未加载
评论 #11353933 未加载
评论 #11353999 未加载
评论 #11353925 未加载
评论 #11354286 未加载
pjc50about 9 years ago
Since at least the 70s people have been trying to &quot;componentise&quot; software in the same way that electronics is componentised: rather than assembling something out of a pile of transistors, build <i>integrated circuits</i> instead. The intent is to reduce cost, complexity and risk.<p>This has never yet quite worked out in software. Object-orientation was part of the resulting research effort, as are UNIX pipelines, COM components, microkernels and microservices. When it goes wrong you get &quot;DLL Hell&quot; or the &quot;FactoryFactoryFactory&quot; pattern.<p>It looks like the javascript world has forgotten about integration and instead decided to do the equivalent of assembling everything out of discrete transistors every time. The assembly process is automated, so it appears costless - until something goes wrong.<p>But really this is the fault of the closed source browser manufacturers, who prefer to attempt lockin over and over again through incompatible features rather than converge on common improvements.
评论 #11353948 未加载
评论 #11355247 未加载
评论 #11357277 未加载
tlrobinsonabout 9 years ago
&gt; My opinion query quickly went from “Oh that&#x27;s funny” to “This concerns me”.<p>This was my response as well:<p>&gt; The combination of a micro-library culture, “semver” auto-updates, and a mutable package manager repository is pretty terrifying.<p><a href="https:&#x2F;&#x2F;mobile.twitter.com&#x2F;tlrobinson&#x2F;status&#x2F;712442098381754370" rel="nofollow">https:&#x2F;&#x2F;mobile.twitter.com&#x2F;tlrobinson&#x2F;status&#x2F;712442098381754...</a><p>Either of the second two properties are dangerous on their own, but culture of micro-libraries compounds the problem.
coenhydeabout 9 years ago
Everyone is blowing the &quot;micropackages are the problem&quot; completely out of proportion. The real problem with the left-pad fiasco is that someone was able to revoke a package other people depended on. Packages should be immutable.
评论 #11358048 未加载
grandalfabout 9 years ago
To quote an old adage, package size doesn&#x27;t matter.<p>The actual issue has to do with trusting a package of any size over time. This is true regardless of whether the package implements 1 line of code or 1000.<p>The trustworthiness of a package is a function of several factors. Code that is not actively maintained can often become less trustworthy over time.<p>What we need is one or more 3rd party trust metrics, and our bundling&#x2F;packaging utilities should allow us to use that third party data to determine what is right for our build.<p>Maybe some of us want strong crypto, maybe others of us want adherance to semver, maybe others want to upgrade only after a new version has had 10K downloads, maybe others only want to use packages with a composite &quot;score&quot; over 80.<p>On the continuum of code quality from late night hack to NASA, we all must draw a line in the sand that is right for a particular project. One size does not fit all.<p>It&#x27;s a big mistake (as well as a profound example of bad reasoning) to blame micropackages. The size of the package has nothing to do with it. Any codebase with any number of dependencies faces some risk by trusting the maintainers or hosting of those dependencies to third parties, which is the problem we need to do a better job of solving.
评论 #11355117 未加载
askyourmotherabout 9 years ago
I heard one of js &quot;devs&quot; refer to npm as nano package management. It sounded more like abdication of duty as a developer to understand what you are adding as a dependency, why, and the long-term cost.<p>How many developers here would gladly add a rogue &quot;dependency&quot;, like a developer they had never spoken to before, into their project without some care? And yet the willingness to open the front and literal back doors of the project to so many dependencies, like low-quality functions-as-a-module is astounding.
seibeljabout 9 years ago
The large amount of python standard packages is clearly a benefit for Python. Node should start a vetting process to be included into a standard package system, and start moving in key libs, then host official doc.<p>I guarantee that the weaknesses of the NPM ecosystem are already known and exploited by bad actors. There are people who earn large 6 figure salaries &#x2F; consulting fees for finding and exploiting these issues. This is a wakeup call that we need to do something about it.
zannyabout 9 years ago
A lot of the value in these remarks is that they are coming from the author of Flask, the most popular micro<i>framework</i> for Python, which itself has a <i>massive</i> extension tree that also does suffer a lot of the same problems as NPM - trying to update or maintain a Flask project often involves navigating a tremendous amount of dependency hell on all kinds of modules, from flask-sqlalchemy to flask-wtforms to flask-bootstrap to flask-oauth.. etc. The worst part is tons of these modules and extensions are dead projects that code rot for years, but when you implement everything independently in its own git tree it gets many fewer eyes upon it, as Armin mentions in the OP regarding one liner Node packages.<p>But it does not spiral out of control nearly as bad as any attempt at frameworks on NPM, because unlike Node almost every Flask extension depends on three things - Flask, the external package the extension attaches to( ex: WTForms) and Python&#x27;s standard library.<p>A similar Node package would depend on possibly hundreds of tiny one liners to replace the absence of standard library.<p>Which gets to the heart of the problem, right? The reason I&#x27;ve never even considered Node is because Javascript is like PHP - a mutant language born of need rather than intent, that kind of just grew over time to fill use cases constrained by its unique position in the ecosystem rather than as what someone considered the &quot;best answer to the job&quot;. Python (3) is almost entirely anthesis to that. Writing Python is a joy because it is designed ground up to be a paradigm to solve problems, not a problem that breeds a paradigm.<p>There is no way for Node to fix this as long as it tries to be browser compatible. We will never see ECMAScript standards adopt an ISOC++ stance of maturing the language with a comprehensive standard library to meet the needs of the language in the day and age it is being used, because there are <i>very</i> disparate interests involved in Javascripts language design going forward. That is its blessing and curse - Javascript will never grow into a Java-scale monstrosity of standard library bloat because a tremendous number of people involved in Javascript also have to implement Javascript and thus don&#x27;t want a larger surface area of work to do. But it is important to remember that Javascript was never <i>meant</i> to be anything. It was made for dynamic HTML pages in Netscape. The fact that two decades later it is being shoehorned into web server dev and desktop applications <i>should</i> be scary.
mbrockabout 9 years ago
Maybe we could start to publish signed approvals of specific package hashes.<p>For example: &quot;I, mbrock, think that pad-left v1.0.3 with hash XYZ seems like an uncompromised release.&quot;<p>Then the tool that upgrades packages could warn when a release isn&#x27;t trusted by someone you trust (or transitively via some trust web scheme).<p>The approval system becomes like a &quot;release review&quot; process.
评论 #11355781 未加载
评论 #11353928 未加载
jonstokesabout 9 years ago
Help me understand why these micropackages exist in a world where tree shaking is a thing? Why is there no stdlib that rolls up all of the commonly used small dependencies? (I&#x27;m kind a n00b to JS so it&#x27;s a non-rhetorical question.)
评论 #11354165 未加载
评论 #11354175 未加载
raesene4about 9 years ago
Good article even though I don&#x27;t agree with all the conclusions.<p>I find a good way to think about things is that every single dependency you have adds another set of people you have to trust.<p>You&#x27;re trusting the competence of the developer (i.e. that the library has no security flaws), you&#x27;re trusting their intent (i.e. that they don&#x27;t deliberately put malicious code into the library) and you&#x27;re trusting their Operational Security practices (i.e. that their systems don&#x27;t get compromised, leading to loss of control of their libraries).<p>Now when you think about how little you know about most of the owners of libraries you use, you can see possibility for concern.<p>The bit I disagree with the article about is signing. I personally think that developer signing is a useful part of this as it takes the repository owner out of the trust picture (if done correctly). Without it you&#x27;re also trusting the three items above for the repository provider and it&#x27;s worth noting that a large software repo. is a very tempting target for quite a few well funded attackers.<p>Docker at least has provided some of the technical pieces to address this in their repositories with content trust...
drinchevabout 9 years ago
I think the problem is in npm and not in the micro-modules.<p>Writing isomorphic, cross-browser code in a language full of edge-cases, like JavaScript is hard.<p>Oneline function, but 20 lines of tests and another 20 test environments.<p>The solution should not come from people that write only front-end JS code. I&#x27;m waiting for a response by the libraries that were broken by left-pad.
dec0dedab0deabout 9 years ago
Maybe the solution for highlevel languages is to just routinely add useful helper functions, either in separate name spaces or directly to global with a naming convention to avoid conflicts. If thousands of people are doing the same thing it really doesn&#x27;t make any sense for them to all come up with their own version.
评论 #11353735 未加载
评论 #11353867 未加载
zalzalabout 9 years ago
There is a bigger debate on micropackages, for sure. But even in the sort term, breaking your build instantly every time third parties make changes is just madness. Reduce operational dependencies as well as library dependencies.<p>This is one approach we used to deal with this last year, for example, on build&#x2F;devops side: <a href="https:&#x2F;&#x2F;medium.com&#x2F;@ojoshe&#x2F;fast-reproducible-node-builds-c02bca056739#.it1j8qp2q" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@ojoshe&#x2F;fast-reproducible-node-builds-c02...</a>
EGregabout 9 years ago
Isn&#x27;t this similar to broken links on the web? You can either:<p>1) Bundle everything in your distribution. Not unreasonable, but would be nice to have a hybrid protocol that lets the publisher store a signed copy of all the dependencies but only send them on request (so less duplication is sent over the wire).<p>2) Have the same as 1 but in dedicated &quot;mirrors&quot; and persistent distributed storage a la freenet. Files are only deleted if there isn&#x27;t enough space on the network and they are the least-- recently-requested ones.
dougdonohoeabout 9 years ago
I asked about this last year:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9629091" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9629091</a>
jonduboisabout 9 years ago
Totally agree, I never understood this fetish developers have with small packages. It&#x27;s probably related to the &#x27;Unix philosophy&#x27; but it just doesn&#x27;t scale in a web context...<p>Personally, I much prefer a single nice, complete, well-polished module that works perfectly over lots of tiny modules which are awesome individually but which suck when used together.
debacleabout 9 years ago
This was well written. The balance between convenience and liability is something that takes time to digest.<p>I don&#x27;t really understand why there isn&#x27;t a stdlib of these &quot;micropackages&quot; that can be downloaded to save a lot of effort.
cdnsteveabout 9 years ago
Micro deps are the sign of something missing from the core language. We should be working to have that expanded and not have it shouldered to a package manager system and community to fill IMO.
nikolayabout 9 years ago
There&#x27;s where git-vendor [0] comes in place!<p>[0]: <a href="https:&#x2F;&#x2F;brettlangdon.github.io&#x2F;git-vendor&#x2F;" rel="nofollow">https:&#x2F;&#x2F;brettlangdon.github.io&#x2F;git-vendor&#x2F;</a>
homeroabout 9 years ago
Learn about clean room. If you saw the code. You&#x27;ll copy it subconsciously. If the license requires attribution and you don&#x27;t. You&#x27;re in trouble.
dc2about 9 years ago
&gt; <i>Multiplied with the total number of downloads last month the node community downloaded 140GB worth of isarray.</i><p>This is not true. NPM locally caches every module the first time it is downloaded.<p>Therefore with widely downloaded modules such as isarray, it is very likely it has already been downloaded on the local system and so is pulled from the cache.<p>The actual percentage of fresh downloads from NPM in a real-world deployment is overwhelmingly small.
评论 #11354939 未加载
评论 #11354275 未加载
dreamdu5tabout 9 years ago
Why is nobody talking about the real issue? That NPM unpublished someone&#x27;s module because a lawyer threatened them in an email.<p>People should be upset that NPM will just take your module away if they feel it&#x27;s appropriate. The whole reason left-pad was unpublished has been completely ignored.
orfabout 9 years ago
Holy crap, I had a look through <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;~sindresorhus" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;~sindresorhus</a><p>There are so many one line packages:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-finite&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-finite&#x2F;blob&#x2F;master&#x2F;index....</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-fn&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-fn&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-gif&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-gif&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-github-down&#x2F;blob&#x2F;master&#x2F;cli.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-github-down&#x2F;blob&#x2F;master&#x2F;c...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-ip&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-ip&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-npm&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-npm&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-obj&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-obj&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;imagemin&#x2F;advpng-bin&#x2F;blob&#x2F;master&#x2F;lib&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;imagemin&#x2F;advpng-bin&#x2F;blob&#x2F;master&#x2F;lib&#x2F;index...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;chalk&#x2F;ansi-regex&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;chalk&#x2F;ansi-regex&#x2F;blob&#x2F;master&#x2F;index.js</a> (my favourite)<p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;array-move&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;array-move&#x2F;blob&#x2F;master&#x2F;index...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;compare-urls&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;compare-urls&#x2F;blob&#x2F;master&#x2F;ind...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;debug-log&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;debug-log&#x2F;blob&#x2F;master&#x2F;index....</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;file-url&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;file-url&#x2F;blob&#x2F;master&#x2F;index.j...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;fix-path&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;fix-path&#x2F;blob&#x2F;master&#x2F;index.j...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;fn-args&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;fn-args&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;fn-name&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;fn-name&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;globals&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;globals&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;imul&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;imul&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-text-path&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-text-path&#x2F;blob&#x2F;master&#x2F;ind...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-up&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-up&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-travis&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-travis&#x2F;blob&#x2F;master&#x2F;index....</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-video&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-video&#x2F;blob&#x2F;master&#x2F;index.j...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-webp&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-webp&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-archive&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-archive&#x2F;blob&#x2F;master&#x2F;index...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-admin&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-admin&#x2F;blob&#x2F;master&#x2F;index.j...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-absolute-url&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-absolute-url&#x2F;blob&#x2F;master&#x2F;...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;ipify&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;ipify&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-url-superb&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-url-superb&#x2F;blob&#x2F;master&#x2F;in...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-tif&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;is-tif&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;datetime&#x2F;leap-year&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;datetime&#x2F;leap-year&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;lpad&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;lpad&#x2F;blob&#x2F;master&#x2F;index.js</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;md5-hex&#x2F;blob&#x2F;master&#x2F;index.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;md5-hex&#x2F;blob&#x2F;master&#x2F;index.js</a><p>And I ran out of willpower, at only L. Seems to me the complete lack of any decent standard library has caused this Cambrian explosion of packages, and the overhead is astounding. Sure it&#x27;s appealing to google &quot;nodejs validate ip&quot;, then run &quot;npm install is-ip&quot; and use it with &quot;require(&#x27;is-ip&#x27;)&quot;, but fuck me how wasteful do you want to be. My frontend ember app ends up installing over 500mb of dependencies (most of which is useless test files and other redundant fluff files). How has this happened?<p>What&#x27;s to stop one of those one line packages adding a malicious one liner that concatenates and uploads your super-secret private source code to somebodies server? You&#x27;re really trusting the complete integrity of your codebase because you depend on &quot;is-array&quot;, because you can&#x27;t be bothered to write &quot;x.toString() === &#x27;[object Array]&#x27;&quot;, and JS introspection (which seems so (ab)used) is so broken that this is needed? Woah.
评论 #11356316 未加载
emodendroketabout 9 years ago
It&#x27;s telling that only the immature JS ecosystem thinks this is a good idea.
mgrennanabout 9 years ago
If you don&#x27;t know history.....<p>40 years of computer experience as EE, coder, IT security, DBA tells me; when IT moved from a way to do work (science) to a thing of its own (marketing); this happened during Dot-Com bubble, time to market became the goal and security was tossed. You here this in mantras like:<p>Push NOW fix latter. Fail fast and often.<p>I say: Secure, Complete, Fast - Pick two.