Say I have the following package structure:
Main
- c @ 2.0.0
- b @ 1.0.0
- d @ 1.0.0
- b @ 1.0.0
Here, C's require(b) and D's require(b) will be different (unique instances, not ===). This can be solved by moving b up a level:
Main
- b @ 1.0.0
- c @ 2.0.0
- d @ 1.0.0
Now, when C and D require(b), they will get the actual same object. However, say I have this layout:
Main
- b @ 2.0.0
- c @ 2.0.0
- b @ 1.0.0
- d @ 1.0.0
- b @ 1.0.0
Here, I don't think there's any layout I can do to have Main's require(b) be 2.0.0, but still allow c and d to share the same b. Am I correct? I could symlink c and d's b to the same location, but then I can't represent that structure in shrink-wrap or any other format really.