Open
Description
Documentation for the keys of the packages
property in package-lock.json files describes them as "relative paths from the root project folder". This does not appear to be entirely true.
Consider the following package.json:
package.json:
{
"name": "my-project",
"dependencies": {
"@scope/package-a": "^1.0.0",
}
}
Assume also that "@scope/package-a" has a dependency on a package called "@scope.package-b". When npm installs dependencies, the project directory structure looks like this:
my-project
├─node_modules
│ └─@scope
│ ├─package-a
│ └─package-b
├─package.json
└─package-lock.json
However, package-lock.json has the following entry under packages
:
"node_modules/@scope/package-a/node_modules/@scope/package-b": {
"version": "1.0.0",
...
},
Notice the path does not actually exist in the directory.
Documentation should be clear about whether this is expected or whether the relative paths, as described, are true paths.