Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove peer dependency on express #52

Closed
clarkie opened this issue Jan 8, 2016 · 5 comments
Closed

Remove peer dependency on express #52

clarkie opened this issue Jan 8, 2016 · 5 comments

Comments

@clarkie
Copy link
Contributor

clarkie commented Jan 8, 2016

I'm using hapi instead of express yet I now have both installed just to use this lib. When using npm v2 peer dependencies are automatically installed.

I'm not sure if there is anything I can do to prevent having both express and hapi installed, except upgrade to npm v3.

Any thoughts?

@seanadkinson
Copy link
Contributor

Yeah, I've known that was a little silly to have in there for awhile, since if someone wasn't using express, they'd get the whole package.

I think if we move it to optionalDependencies, it should not be automatically downloaded, but still have a version constraint if it is there. I'll try to throw up a branch with that so that you can give it a try.

@clarkie
Copy link
Contributor Author

clarkie commented Jan 9, 2016

I've just had a look at this and optionalDependencies are automatically installed by default so it doesn't help unless you use the --no-optional flag when running npm install.

It doesn't feel like there's a nice solution to this. I wonder which is the most common version of npm in use? v2 or v3?

I think the biggest value of this module is the react component and lifecycle bit. Generating the signed url is the easy bit. It might be worth removing the express section completely and just improving the docs to explain what's required from the user's backend.

What do you think?

@seanadkinson
Copy link
Contributor

Could also just remove the dependency altogether, since someone who is using express will naturally already have the dependency specified elsewhere. Then if you aren't using express and never import the router, it wouldn't be a problem.

@clarkie
Copy link
Contributor Author

clarkie commented Jan 10, 2016

see #53. Let me know what you think

@seanadkinson
Copy link
Contributor

Merged #53 and published v2.0.0 with this change. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants