You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sys): tweak NodeLazyRequire logic around too-high-versions errors (#3347)
this changes the logic that we use in the `NodeLazyRequire` class to
error out in fewer situations. the changes are:
- the data structure for specifying our version ranges is changed from
`[string, string]` (`[minVersion, recommendedVersion]`) to an object
with `minVersion` `recommendedVersion` required properties and an
optional `maxVersion` property.
- in the `ensure` method on `NodeLazyRequire` we check if `maxVersion`
is defined on a given version range requirement.
- If so, we check that the installed version is greater than or
equal to `minVersion` and less than the major version of
`maxVersion`.
- If not, we just check that `minVersion <= installedVersion`
this should give us the flexibility to mark certain versions of packages
as incompatible (for instance jest@28) without having to do that for all
packages that we lazy require. this is helpful because for most of them
we just want to set a minimum version and don't have a need for an
enforced maximum version.
0 commit comments