← Back to context

Comment by tiagod

3 months ago

Or use pnpm. The latest versions have all dependency lifecycle scripts ignored by default. You must whitelist each package.

pnpm is not only more secure, it's also faster, more efficient wrt disk usage, and more deterministic by design.

  • It also has catalogs feature for defining versions or version ranges as reusable constants that you can reference in workspace packages. It was almost the only reason (besides speed) I switched a year ago from npm and never looked back.

This is the way. It’s a pain to manually disable the checks, but certainly better than becoming victim to an attack like this.