Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

warn/throw on mismatched engine/platform all the time, not only for newly added modules #134

@isaacs

Description

@isaacs

See npm/rfcs#195

  • Currently we call checkEngine()/checkPlatform() in lib/arborist/reify.js, but only for nodes being added to the tree in reifyNode().
  • Either move that check to loadActual and loadVirtual, so that we can warn when we're initially building the tree, or put it in buildIdealTree since we only care about it when we're going to be modifying stuff? (Ie, should npm ls warn about it? Should npm ls --engines-strict fail entirely and not even show a tree?)
  • Since it's probably too aggressive to fail entirely if a package in the virtual/actual tree has an engine/platform mismatch, we can collect these errors up to the top level, and then have buildIdealTree() decide to throw if there are any engine mismatches and options.enginesStrict is true.

Metadata

Metadata

Assignees

Labels

Enhancementnew feature or improvementsemver:majorbackwards-incompatible breaking changes

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions