{"id":42260,"date":"2024-02-27T14:36:01","date_gmt":"2024-02-27T19:36:01","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=42260"},"modified":"2024-02-28T09:55:42","modified_gmt":"2024-02-28T14:55:42","slug":"the-everything-npm-package","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/02\/27\/the-everything-npm-package\/","title":{"rendered":"The &ldquo;everything&rdquo; NPM Package"},"content":{"rendered":"<p><a href=\"https:\/\/socket.dev\/blog\/when-everything-becomes-too-much\">Feross Aboukhadijeh<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=38894445\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/socket.dev\/blog\/when-everything-becomes-too-much\"><p>Just when we thought we&rsquo;d seen it all, an npm user named PatrickJS, aka <a href=\"https:\/\/socket.dev\/npm\/user\/gdi2290\">gdi2290<\/a>, threw us a curveball. He (<a href=\"https:\/\/uncenter.dev\/posts\/npm-install-everything\/\">along with a group of contributors<\/a>) kicked off the year with a bang, launching a troll campaign that uploaded an npm package aptly named <a href=\"https:\/\/socket.dev\/npm\/package\/everything\"><code>everything<\/code><\/a>. This package, true to its name, depends on every other public npm package, creating millions of transitive dependencies.<\/p><p>[&#8230;]<\/p><p>The &ldquo;everything&rdquo; package, with its 5 sub-packages and thousands of dependencies, has essentially locked down the ability for authors to unpublish their packages. This situation is due to npm&rsquo;s policy shift following the infamous <a href=\"https:\/\/qz.com\/646467\/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code\">&ldquo;left-pad&rdquo; incident in 2016<\/a>, where a popular package <a href=\"https:\/\/socket.dev\/npm\/package\/left-pad\"><code>left-pad<\/code><\/a> was removed, grinding development to a halt across much of the developer world. In response, npm tightened its <a href=\"https:\/\/docs.npmjs.com\/policies\/unpublish\">rules around unpublishing<\/a>, specifically preventing the unpublishing of any package that is used by another package.<\/p><p>Ironically, this policy trapped PatrickJS in his own web. Upon realizing the impact of his prank, he attempted to remove the <code>everything<\/code> package but was unable to do so. He reached out to the npm support team for help, but the damage was done.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/03\/21\/npm-packages-sabotaged\/\">NPM Packages Sabotaged<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2018\/11\/27\/popular-npm-package-compromised\/\">Popular NPM Package Compromised<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2016\/03\/23\/how-one-developer-broke-node-babel-and-thousands-of-projects\/\">How One Developer Broke Node, Babel, and Thousands of Projects<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Feross Aboukhadijeh (Hacker News): Just when we thought we&rsquo;d seen it all, an npm user named PatrickJS, aka gdi2290, threw us a curveball. He (along with a group of contributors) kicked off the year with a bang, launching a troll campaign that uploaded an npm package aptly named everything. This package, true to its name, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-02-27T19:36:04Z","apple_news_api_id":"b58c09c8-ab60-4993-80c3-d5669bf754b6","apple_news_api_modified_at":"2024-02-28T14:55:46Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AtYwJyKtgSZOAw9Vmm_dUtg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[346,1136,991,71],"class_list":["post-42260","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-javascript","tag-node-js","tag-open-source-software","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=42260"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42260\/revisions"}],"predecessor-version":[{"id":42264,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/42260\/revisions\/42264"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=42260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=42260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=42260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}