[BUG] cpu and os properties not respected #2707
Labels
Bug
thing that needs fixing
Priority 1
high priority issue
Release 7.x
work is associated with a specific npm 7 release
Milestone
At Netlify, we publish a module that relies on a platform-specific binary.
In order to only install the appropriate binary for the user's machine, we publish several platform-specific modules, with
package.json
appropriately tagged with the rightcpu
andos
properties. The main module lists all the platform-specific modules asoptionalDependencies
, so that when installed, any platform-specific module that doesn't apply to the user's machine will be skipped, leaving them only with the right module installed in the end.This behaviour broke with npm v7.
Current Behavior:
When installing
@netlify/traffic-mesh-agent
, all the optional dependencies are installed, regardless of whether they apply to the user's platform.Expected Behavior:
When installing
@netlify/traffic-mesh-agent
, only the optional dependencies that apply to the user's platform are actually installed. The others are skipped at the installation process.Steps To Reproduce:
npm install @netlify/traffic-mesh-agent
node_modules
:@netlify/traffic-mesh-agent-darwin-x64
,@netlify/traffic-mesh-agent-win32-x64
and@netlify/traffic-mesh-agent-linux-x64
Environment:
The text was updated successfully, but these errors were encountered: