@npmcli/arborist 2.4.3 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/arborist/reify.js +9 -2
- package/package.json +1 -1
package/lib/arborist/reify.js
CHANGED
|
@@ -972,8 +972,15 @@ module.exports = cls => class Reifier extends cls {
|
|
|
972
972
|
// would allow versions outside the requested range. Tags and
|
|
973
973
|
// specific versions save with the save-prefix.
|
|
974
974
|
const isRange = (subSpec || req).type === 'range'
|
|
975
|
-
|
|
976
|
-
|
|
975
|
+
|
|
976
|
+
let range = spec
|
|
977
|
+
if (
|
|
978
|
+
!isRange ||
|
|
979
|
+
spec === '*' ||
|
|
980
|
+
subset(prefixRange, spec, { loose: true })
|
|
981
|
+
)
|
|
982
|
+
range = prefixRange
|
|
983
|
+
|
|
977
984
|
const pname = child.packageName
|
|
978
985
|
const alias = name !== pname
|
|
979
986
|
newSpec = alias ? `npm:${pname}@${range}` : range
|