@npmcli/arborist 9.1.0 → 9.1.1
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 +2 -6
- package/package.json +1 -1
package/lib/arborist/reify.js
CHANGED
|
@@ -871,13 +871,9 @@ module.exports = cls => class Reifier extends cls {
|
|
|
871
871
|
return relative(dir, resolve(rootDir, overridePath))
|
|
872
872
|
}
|
|
873
873
|
|
|
874
|
-
// Fallback: derive the
|
|
874
|
+
// Fallback: derive the file path from node.resolved in a platform-agnostic way
|
|
875
875
|
const filePath = node.resolved.replace(/^file:/, '')
|
|
876
|
-
|
|
877
|
-
const pathParts = filePath.split(/[\\/]/)
|
|
878
|
-
const packageName = pathParts[pathParts.length - 1]
|
|
879
|
-
|
|
880
|
-
return join('..', packageName)
|
|
876
|
+
return join(filePath)
|
|
881
877
|
}
|
|
882
878
|
|
|
883
879
|
#registryResolved (resolved) {
|