pkgjs / support

Package Support Format
MIT License
24 stars 7 forks source link

fix so that show works for non-nested cases #12

Closed mhdawson closed 4 years ago

mhdawson commented 4 years ago

Signed-off-by: Michael Dawson michael_dawson@ca.ibm.com

rodion-arr commented 4 years ago

@mhdawson I'm wondering what test we should have here to check specified "flat" structure. Could you please look at this test folder is it correct? Test is failing with this node_modules structure - https://github.com/rodion-arr/support/tree/flat_node_modules/test/cli/show-local-tree-flat/node_modules

mhdawson commented 4 years ago

I see what you mean in that dep3 shows at the top level.

I think it might have to do with having hand created the node_modules versus what npm created, possibly because there is no package-lock.json file. On the other hand npm list shows the expected structure so maybe its a bug in arborist?

rodion-arr commented 4 years ago

In debugger I see that dep3 receives depth = 1 from arborist, so it is printing result on the same level as dep1 and dep2

mhdawson commented 4 years ago

@rodion-arr that might be a bug in arborist, I'd suggest we land this PR as it improves the current situation and then see if we can understand if its a problem on our end or in arborist.