I'm not sure if they are all optional, since half of the pain comes from dependencies of dependencies, where you have very little control (esp in the npm world where you can't override resolutions).
https://docs.npmjs.com/cli/v9/configuring-npm/package-json?v...