Lets assume I create two packages (pk1
) and pkg2
) that are somehow dependent and share the same @
handle for the name
field of the package.json
.
A minimal example for pkg1
might look like this:
{
"name": "@test/pkg1",
"version": "1.0.0",
"description": "My package",
"author": "",
}
For pkg2
the name is redefined as @test/pkg2
After navigating to each folder and using npm link
, the global list of packages will look like this:
C:Program Filesnodejs -> .
+-- @test/[email protected] -> [...]
+-- @test/[email protected] -> [...]
When navigating to the project and typing npm link @test/pkg1
and npm link @test/pkg2
I would expect to see the following new folders
node_modules@testpk1
and node_modules@testpk2
. Instead, the folders are replaced/overwritten with the last executed command, so there is only one subfolder under @test
.
Is this the expected behavior? If so, what is the correct way to “group” packages that belong to the same project/institution?