Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Enable automated running of dedupe #4761

Closed
@bclinkinbeard

Description

The nested versus flat dependency tree argument is literally the only thing people regularly bring up as a reason to use Bower over npm. The only reply ever given is to use dedupe, but there is no way to automate it. If npm is going to significantly improve adoption for client side use, I think this needs to change. You can't make the argument that people should use a different tool than they currently are while rejecting their top complaint about the tool being offered.

Currently, the primary hurdle to automating dedupe is that running a command like npm install --save foo does not trigger the postinstall hook. (I personally think that should be considered a bug, but that is neither here nor there.) There also seem to be issues with the npm update hook being inconsistent but I've yet to document their exact nature.

What it comes down to is there needs to be a way to run a command whenever the contents of node_modules changes for any reason (as a result of an npm command). This could be used to run dedupe for people worried about such things, or even something like lockdown.

I want npm to "win" as badly as anyone, but refusing to address this issue just seems like a non-starter.

/cc @isaacs @domenic @timoxley @kristoferjoseph @techwraith @robdodson @IgorMinar

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions