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

Is there is reson to use full pouchdb in dependency ? #241

Open
zorn-v opened this issue Apr 10, 2019 · 6 comments
Open

Is there is reson to use full pouchdb in dependency ? #241

zorn-v opened this issue Apr 10, 2019 · 6 comments

Comments

@zorn-v
Copy link

zorn-v commented Apr 10, 2019

Why not use only pouchdb-browser ? In that case there will be no need to compile leveldown which is not needed at all for ember.

@jlami
Copy link
Collaborator

jlami commented May 21, 2019

That does seem alluring, but I'm not sure if it is technically correct. Ember should also be able to work in node, for example with fastboot. I'm not sure if ember-pouch works with fastboot, but using pouchdb-browser would surely prevent this.

We could make the user choose through peer or optional dependencies. But that would make an out of the box installation harder.

@zorn-v
Copy link
Author

zorn-v commented May 21, 2019

Ember should also be able to work in node, for example with fastboot.

How ember-data work with fastboot ? Isn't it for client side only ?


Oh, I see there is addon for it https://github.com/cardstack/ember-data-fastboot
Not so popular BTW, and I dont know is it support pouchdb or not.

And we get not popular method for caching ember-data models VERSUS problems with compiling leveldown (on windows for example).

@jlami
Copy link
Collaborator

jlami commented May 21, 2019

Yes, it might be better to let people who really want fastboot to have to do more work. But I'm not sure if using pouchdb-browser would make that impossible, or just a little bit harder.

We would have to look into whether pouchdb-browser comes with the required distribution files we use to load pouchdb-find before we can really switch tough.

@zorn-v
Copy link
Author

zorn-v commented May 21, 2019

https://pouchdb.com/custom.html

Seems pouchdb-find does not included in pouchdb-browser. But I think not big problem

@jlami
Copy link
Collaborator

jlami commented May 21, 2019

It does require us to either use pouchdb-browser as a direct dependency or go the peerDependency route. Peer dependencies are technically more correct, but harder to get right for normal users.

Maybe we can use afterInstall from ember-cli to setup the default browser config, and let bootstrap users change this default configuration to suite their own needs. It makes it a bit harder to manage the installed versions though.

@zorn-v
Copy link
Author

zorn-v commented May 21, 2019

but harder to get right for normal users.

Just one more line in readme/changelog
If follow semver this should be done in major release

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

No branches or pull requests

2 participants