hoodiehq / pouchdb-admins

PouchDB plugin to simulate CouchDB’s admin accounts
Apache License 2.0
7 stars 2 forks source link

Nvm 'stable' version jump causing travis cache of node_modules to go stale #21

Closed minrwhite closed 7 years ago

minrwhite commented 8 years ago

See here - the package leveldown was fetched for the previous 'stable' version of v6.9.1 here and cached for later. Between then and now the version nvm considers 'stable' has jumped to v7.0.0 and the cached binary module refuses to run against this later version.

minrwhite commented 8 years ago

I believe this PR should fix any further caching issues of this type.

This update causes the node version to be stored with the cache. npm rebuild is then run if a discrepancy is detected between the running node version and the previously stored version, refetching all the binary dependencies if there's been a version bump.

gr2m commented 8 years ago

Thanks for this! I think there are a few things we can improve with pouchdb-admins.

In this PR

with another PR

Out of scope, just fyi

This shouldn’t be a pouchdb plugin at all :) it doesn’t do anything with PouchDB. All it does is mimicking how CouchDB calculates admins. It returns an API that should live by itself, and not be set on pouchdb.admins. In fact, we already use it this way: https://github.com/hoodiehq/hoodie-account-server/blob/f99a6d6676a9cec4cb282e5ff4d94d6316bfa791/plugin/index.js#L7

So what I think we should do is depracte pouchdb-admins on npm, rename this repository to couchdb-admins, and remove PouchDB entirely from this :)

minrwhite commented 8 years ago

Caching explicitly disabled in this PR. I'll open another PR as requested for replacing the pouchdb dependencies.