victronenergy / venus

Victron Energy Unix/Linux OS
https://github.com/victronenergy/venus/wiki
552 stars 69 forks source link

npm recipes: better handle optionalDependencies and --omit=dev #1304

Open mpvader opened 2 weeks ago

mpvader commented 2 weeks ago

The NPM definition of an optional dependency is:

If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the optionalDependencies object.

That conflicts with what we want: reproducible builds + things changing only when we want them to change.

So we need to fix that.

Secondly, npm install --optional is apparently outdated.

So, lets replace that by npm install --omit=dev --omit=optional. Which would require: