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

NPM with dry run for testing? #3505

Closed
moimikey opened this issue May 31, 2013 · 11 comments
Closed

NPM with dry run for testing? #3505

moimikey opened this issue May 31, 2013 · 11 comments
Milestone

Comments

@moimikey
Copy link

Was this a feature that used to exist or will exist eventually? I'm in the midst of writing a shell script with a dry-run option and wanted to pipe that action to NPM.

Thanks

@mfncooper
Copy link
Contributor

Dry run meaning what, and for which npm commands? Note that much of npm's behaviour is driven by the contents of files that are downloaded from the registry, so there's not a lot of useful work it can do without downloading anything. And once you're downloading files, you're already beyond a dry run.

@moimikey
Copy link
Author

moimikey commented Jun 1, 2013

I probably should be more of a tinkerer and actually take a look at the code to see how npm functions. I think I blindly asked the question out of anticipation to get my script finished.

Dry run in the sense that npm will display what dependencies it will be installing (with its normal verbose output), but not actually do any of the downloading and file dropping. Similar to wget --spider maybe.

@BorePlusPlus
Copy link

👍

@BorePlusPlus
Copy link

I would be interested in having a dry run option for install npm install --dry-run which would print out what would npm install if it was to run the command. I'd find it useful in my docker workflow.

Is there any desire for such an option? If I spend some time to implement it, does it stand a chance of being merged or should I do it as a standalone project?

Cheers

@moimikey
Copy link
Author

and 2 years later, i'm still interested as well :)

@othiym23 othiym23 added this to the multi-stage install milestone Apr 23, 2015
@othiym23
Copy link
Contributor

You're in luck, because a version of --dry-run is included in the multi-stage branch of npm, which will someday soon become npm@3.

@BorePlusPlus
Copy link

Nice to hear that. Any approximate timeline as to when this may happen?

@othiym23
Copy link
Contributor

See #7774 for what needs to be done before we can put npm@3 into beta.

@BorePlusPlus
Copy link

Cool - cheers.

@iarna
Copy link
Contributor

iarna commented Apr 27, 2015

Closing this as fixed in npm/npm#multi-stage

@iarna iarna closed this as completed Apr 27, 2015
@moimikey
Copy link
Author

amazing! thanks!

@npm npm locked and limited conversation to collaborators Jun 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants