{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1343","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1343/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1343/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1343/events","html_url":"https://github.com/ansible/ansible-modules-extras/issues/1343","id":120850242,"number":1343,"title":"NPM module should have ability to do equivalent of \"npm prune\"","user":{"login":"bwlz","id":10136541,"avatar_url":"https://avatars.githubusercontent.com/u/10136541?v=3","gravatar_id":"","url":"https://api.github.com/users/bwlz","html_url":"https://github.com/bwlz","followers_url":"https://api.github.com/users/bwlz/followers","following_url":"https://api.github.com/users/bwlz/following{/other_user}","gists_url":"https://api.github.com/users/bwlz/gists{/gist_id}","starred_url":"https://api.github.com/users/bwlz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwlz/subscriptions","organizations_url":"https://api.github.com/users/bwlz/orgs","repos_url":"https://api.github.com/users/bwlz/repos","events_url":"https://api.github.com/users/bwlz/events{/privacy}","received_events_url":"https://api.github.com/users/bwlz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-07T19:37:29Z","updated_at":"2015-12-16T20:29:11Z","closed_at":null,"body":"##### Issue Type:\r\n- Feature Idea\r\n\r\n##### Ansible Version:\r\n1.9.4\r\n\r\n##### Summary:\r\nThe command `npm prune` will uninstall any packages not present in the project directory's `package.json`, or any packages supplied as arguments. It would be great if the npm module could do this idempotently. I would bet `state=absent` will remove packages supplied as arguments, but am unclear as to whether it will work the same with a `package.json` present in the `path` parameter. I have checked in IRC to find out whether this is known to already be the case, but it doesn't sound like it is (or if it is, it isn't very well documented)."},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments/165235616","html_url":"https://github.com/ansible/ansible-modules-extras/issues/1343#issuecomment-165235616","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1343","id":165235616,"user":{"login":"gregdek","id":252125,"avatar_url":"https://avatars.githubusercontent.com/u/252125?v=3","gravatar_id":"","url":"https://api.github.com/users/gregdek","html_url":"https://github.com/gregdek","followers_url":"https://api.github.com/users/gregdek/followers","following_url":"https://api.github.com/users/gregdek/following{/other_user}","gists_url":"https://api.github.com/users/gregdek/gists{/gist_id}","starred_url":"https://api.github.com/users/gregdek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregdek/subscriptions","organizations_url":"https://api.github.com/users/gregdek/orgs","repos_url":"https://api.github.com/users/gregdek/repos","events_url":"https://api.github.com/users/gregdek/events{/privacy}","received_events_url":"https://api.github.com/users/gregdek/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T20:29:11Z","updated_at":"2015-12-16T20:29:11Z","body":"[module: npm.py]"}}