AI summary by TwinMind

How One Command Broke NPM

Theo - t3․gg

19m 26s

Everything 1.0 Package Creation (2015)

  • Patrick JS published joke package "everything" depending on all 22,000 npm packages at time
  • Package sat quietly on GitHub/npm with no issues
  • Trash tweeted about it, making it go viral

Everything 2.0 Modernization

  • Patrick partnered with Trash to modernize for 2+ million current packages
  • Technical limitations discovered:
    • ~800 dependency limit per package.json
    • 10MB size limit on packages
  • Solution: chunking strategy
    • Divided into ~3,000 sub-packages with 800 dependencies each
    • Created hierarchical structure: chunk zero, chunk one, chunk two with sub-chunks
  • Publishing challenges:
    • Rate limiting during bulk publishing
    • GitHub action tracked progress through dependency tree
    • Had to wait 1+ hours when rate limited, then resume
    • Process ran around the clock

Left Pad Incident Background (2015-2016)

  • Created by Azer Koçulu - simple function adding spaces to left of string
  • Depended on by thousands of projects despite trivial functionality
  • Azer owned 252 packages total, including "kik" bootstrapping tool
  • Kik chat app disputed trademark with npm
  • March 2016: npm sided with Kik company, transferred package
  • Critical error: new owner didn't publish new version to maintain compatibility
  • Azer frustrated, unpublished all 252 packages including left pad
  • Broke hundreds of projects/builds per minute

Left Pad Restoration Attempt

  • Someone republished identical left pad as version 1.0.0
  • Original was version 0.0.3 - version mismatch broke dependent projects
  • Projects couldn't build (0.0.3 ≠ 1.0.0)
  • Can't publish older version than latest in npm
  • NPM had to restore from backup for first time ever
  • No established process existed
  • Nearly 3 hours of ecosystem-wide outage

NPM Policy Changes (2016)

  • March 29, 2016: new unpublishing policy published
  • Acknowledged unrestricted unpublishing was dangerous
  • Initial changes:
    • Can only unpublish within 24 hours of publishing
    • Cannot unpublish if other packages depend on it
  • Policy overwhelmed support queues
  • 2020 revision - current rules:
    • Can unpublish if: no package dependencies in registry, <300 downloads/week, single owner/maintainer
    • 72-hour window (extended from 24 hours)
    • Within 72 hours: only enforces "no dependencies" rule

Star Version Dependency Problem

  • Package A (no dependencies, v1.0) - can unpublish if <300 installs/month
  • Package B depends on Package A v1.0 - now Package A v1.0 cannot be unpublished
  • Package A v2.0 published - can unpublish v2.0 (B still depends on v1.0)
  • Critical edge case: if Package B depends on Package A version "*" (star)
    • Makes ALL versions of Package A unpublishable forever
    • Past and future versions locked permanently

Everything Package Star Dependencies

  • Everything package depended on version "*" for every package
  • Removed unpublish ability from every package in registry
  • Created cyclic dependency preventing self-unpublishing
  • Sub-packages depended on everything, creating circular lock

Community Response and Aftermath

  • Patrick/Trash opened GitHub issues explaining situation
  • Contacted npm through multiple channels including personal connections
  • Patrick's professional response got 5 downvotes
  • Community comments ranged from confused to hostile
  • Examples of bad responses:
    • "What the hell were you thinking"
    • Accusations of intentional registry abuse
    • Claims of "Reckless negligence"
  • Patrick maintained polite, professional responses throughout

NPM's Official Response

  • Claimed violation of GitHub acceptable use policies
  • Said projects "significantly disrupted other users' experiences"
  • Violated code of conduct
  • Resolved dependency issues, removed packages from registry and GitHub
  • Position: no systemic issue exists

Broader Impact Examples

  • React Query affected in 2022
  • Popular packages with star dependencies permanently lose unpublish ability
  • Even accidental publications (wrong namespace) cannot be corrected
  • NPM's official solution: "just publish new version"
  • Policy treats legitimate mistakes same as malicious actions

TwinMind

Get summaries like this for your own meetings

TwinMind takes notes in the background during meetings, lectures, and calls, then writes the summary for you.

Free plan to get started

No bot joins your calls

Phone, desktop & Chrome apps

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome

Your next meeting, summarized like this

TwinMind listens in the background and turns meetings, lectures, and calls into searchable notes you can chat with. Start free.

Available on phone, desktop & Chrome