{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/9150","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/9150/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/9150/comments","events_url":"https://api.github.com/repos/npm/npm/issues/9150/events","html_url":"https://github.com/npm/npm/issues/9150","id":98834117,"number":9150,"title":"Work out the UX for `npm ls` in the brave new npm@3 world","user":{"login":"iarna","id":983798,"avatar_url":"https://avatars.githubusercontent.com/u/983798?v=3","gravatar_id":"","url":"https://api.github.com/users/iarna","html_url":"https://github.com/iarna","followers_url":"https://api.github.com/users/iarna/followers","following_url":"https://api.github.com/users/iarna/following{/other_user}","gists_url":"https://api.github.com/users/iarna/gists{/gist_id}","starred_url":"https://api.github.com/users/iarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iarna/subscriptions","organizations_url":"https://api.github.com/users/iarna/orgs","repos_url":"https://api.github.com/users/iarna/repos","events_url":"https://api.github.com/users/iarna/events{/privacy}","received_events_url":"https://api.github.com/users/iarna/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/feature-request","name":"feature-request","color":"98DCFF"},{"url":"https://api.github.com/repos/npm/npm/labels/ux","name":"ux","color":"9BA0EF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/npm/npm/milestones/21","html_url":"https://github.com/npm/npm/milestones/3.x","labels_url":"https://api.github.com/repos/npm/npm/milestones/21/labels","id":1171864,"number":21,"title":"3.x","description":"","creator":{"login":"iarna","id":983798,"avatar_url":"https://avatars.githubusercontent.com/u/983798?v=3","gravatar_id":"","url":"https://api.github.com/users/iarna","html_url":"https://github.com/iarna","followers_url":"https://api.github.com/users/iarna/followers","following_url":"https://api.github.com/users/iarna/following{/other_user}","gists_url":"https://api.github.com/users/iarna/gists{/gist_id}","starred_url":"https://api.github.com/users/iarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iarna/subscriptions","organizations_url":"https://api.github.com/users/iarna/orgs","repos_url":"https://api.github.com/users/iarna/repos","events_url":"https://api.github.com/users/iarna/events{/privacy}","received_events_url":"https://api.github.com/users/iarna/received_events","type":"User","site_admin":false},"open_issues":62,"closed_issues":68,"state":"open","created_at":"2015-06-19T05:57:33Z","updated_at":"2016-02-02T23:34:34Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-08-03T20:37:52Z","updated_at":"2016-02-03T07:54:41Z","closed_at":null,"body":"In npm@2, we essentially showed you the directory structure of your `node_modules` folder, with some minimal trimming/hoisting in `bfsify`, documented thusly:\r\n\r\n```\r\n  // walk over the data, and turn it from this:\r\n  // +-- a\r\n  // |   `-- b\r\n  // |       `-- a (truncated)\r\n  // `--b (truncated)\r\n  // into this:\r\n  // +-- a\r\n  // `-- b\r\n  // which looks nicer\r\n```\r\n\r\nOptions exist to only show dev deps, but dev deps, like optional deps, would never be listed as `MISSING`.\r\n\r\nBy contrast, `npm@3` builds a tree showing the dependency tree, not the actual node_modules on disk. It otherwise works as before, including `bfsify` above.\r\n\r\nI propose:\r\n\r\n1. Removing `bfsify` (or at the very least its hoisting behavior) as it makes the results harder to understand. \r\n2. Adding some facility for listing the physical tree.\r\n3. Adding some facility for annotating the logical tree (the usual output) with the locations of the modules.\r\n"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/179073746","html_url":"https://github.com/npm/npm/issues/9150#issuecomment-179073746","issue_url":"https://api.github.com/repos/npm/npm/issues/9150","id":179073746,"user":{"login":"SimenB","id":1404810,"avatar_url":"https://avatars.githubusercontent.com/u/1404810?v=3","gravatar_id":"","url":"https://api.github.com/users/SimenB","html_url":"https://github.com/SimenB","followers_url":"https://api.github.com/users/SimenB/followers","following_url":"https://api.github.com/users/SimenB/following{/other_user}","gists_url":"https://api.github.com/users/SimenB/gists{/gist_id}","starred_url":"https://api.github.com/users/SimenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimenB/subscriptions","organizations_url":"https://api.github.com/users/SimenB/orgs","repos_url":"https://api.github.com/users/SimenB/repos","events_url":"https://api.github.com/users/SimenB/events{/privacy}","received_events_url":"https://api.github.com/users/SimenB/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T07:54:41Z","updated_at":"2016-02-03T07:54:41Z","body":"@iarna Not sure exactly what I meant, but I'm pretty sure it's the fact that `npm ls -p` is basically a normal `ls node_modules` with full path and looking for nested `node_modules`, while in npm@2 it (looked like) it always show dependencies nested.\r\n\r\nSo probably just a misunderstanding based on the flat hierarchy of npm@3, and me wanting to get parseable output of my own dependencies, not the dependencies of my dependencies (if that makes sense). So yeah, obsolete :smile: "}}