So people learned basically nothing from leftPad.js ?
Just a proxy that delays new version availability for a week would protect you from this.
But yarn add directly from the account of a madman who made your dependency is so much easier.
Pin dependendency versions, don't allow auto-upgrade. And cache your dependencies locally for as long as you depend on them.
Yes.
Or vet them thoroughly.