dumbmatter / fakeIndexedDB

A pure JS in-memory implementation of the IndexedDB API
Apache License 2.0
585 stars 70 forks source link

Dev dependencies installed during production install #14

Closed xuset closed 7 years ago

xuset commented 7 years ago

First off, awesome project! 👍

When running npm install fake-indexeddb the dev dependencies of the project are also installed like browserify and phantomjs. Running ls node_modules/fake-indexeddb/node_modules confirms this.

Looking at the package.json this shouldn't be happening so I'm somewhat confused. This may be due to the use of shrinkwrapping which appears to include the dev dependencies alongside the production ones.

dumbmatter commented 7 years ago

Thanks :)

That's default npm behavior http://stackoverflow.com/questions/9268259/how-do-you-prevent-install-of-devdependencies-npm-modules-for-node-js-package

xuset commented 7 years ago

I agree, running npm install should install both dev and production dependencies, and this is expected behavior. But npm install fake-indexeddb should not install dev dependencies.

Can you confirm?

Edit: Also, thanks for quick reply! :)

dumbmatter commented 7 years ago

http://stackoverflow.com/questions/17544051/how-to-shrinkwrap-devdependencies-but-not-install-them-unless-necessary explains it. I hadn't noticed this behavior before.

xuset commented 7 years ago

Unfortunately the workaround doesn't apply if fake-indexeddb is included in a project's dependency tree. Anyways, I just wanted to bring this to your attention. Happy coding!

dumbmatter commented 7 years ago

On the plus side, I released v1.0.9 yesterday without the shrinkwrap file, so that should fix your problem :)

xuset commented 7 years ago

Oh, I didn't realize. Awesome 👍