Skip to content

Prune should not remove bundleDependencies. #4573

Open
michaelgilley opened this Issue Jan 30, 2014 · 5 comments

3 participants

@michaelgilley

As is, npm prune will remove bundled dependencies. This issue can be fixed by adding a check for bundleDependencies in read-installed.js (although I'm unaware if this will create other side effects).

@michaelgilley

This only occurs when bundledDependencies are not specified as dependencies. (Maybe specify this in the docs?

@rlidwka
rlidwka commented Feb 1, 2014

Why did you close it?

I think it is a bug, bundled deps should not be removed because they are used when packing.

@michaelgilley
@rlidwka
rlidwka commented Feb 2, 2014

Bundled deps should also be listed in dependencies or devDependencies.

Why is that? I can add a private package that's not installable from anywhere, and use it as bundledDependency just as well.

@michaelgilley

For now, if you just list the package in one of the dependency hashes also everything will run as expected.

However, it is a legitimate question why bundleDependencies are not treated as their own kind of dependency.

I'm reopening this for official comment.

@michaelgilley michaelgilley reopened this Feb 3, 2014
@rlidwka rlidwka referenced this issue in npm/read-installed Mar 6, 2014
Closed

do not mark bundled deps as extra #18

@rlidwka rlidwka added a commit to rlidwka/yapm that referenced this issue Mar 7, 2014
@rlidwka rlidwka "yapm prune" should not remove bundleDependencies e2ee581
@mrdanimal mrdanimal added a commit to mrdanimal/debowerify that referenced this issue Mar 25, 2014
@mrdanimal mrdanimal use felafel fork until substack/node-falafel#29 lands or npm fixes
unexpected `prune` behavior npm/npm#4573
e174851
@mrdanimal mrdanimal added a commit to mrdanimal/debowerify that referenced this issue Mar 25, 2014
@mrdanimal mrdanimal use felafel fork until substack/node-falafel#29 lands or npm fixes
unexpected `prune` behavior npm/npm#4573
d8a9dfb
@othiym23 othiym23 added the bug label Sep 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.