Giter VIP home page Giter VIP logo

pouchdb-adapter-fs's People

Contributors

gr2m avatar greenkeeperio-bot avatar nolanlawson avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pouchdb-adapter-fs's Issues

Flaky test: test.ajax.js-http #5061 ajax returns ETIMEDOUT error on timeout:

seen it on travis and locally, tested with Node v6 and v7

  1) test.ajax.js-http #5061 ajax returns ETIMEDOUT error on timeout:

     Uncaught AssertionError: expected 'ESOCKETTIMEDOUT' to match /(ETIMEDOUT|ENETUNREACH|EAGAIN|ECONNREFUSED)/
      at tests/integration/test.ajax.js:19:25
      at Request._callback (node_modules/pouchdb-ajax/lib/index.js:79:14)
      at self.callback (node_modules/request/request.js:187:22)
      at ClientRequest.<anonymous> (node_modules/request/request.js:779:16)
      at Socket.socket.once (_http_client.js:566:38)
      at Socket._onTimeout (net.js:339:8)

Can’t get it to work

Hey @nolanlawson, it took a while, but finally got around to give this a try. Unfortunately something’s not quite working:

const PouchDB = require('pouchdb-core').plugin(require('pouchdb-adapter-fs'))
const db = new PouchDB('test')

db.put({_id: 'test'})

This creates a test.json file withe the content of undefined in it. I guess the problem is in fsdown.

I’m pretty sure the adapter worked when I tested it right after you created it, something must get broken since then. Do you have an idea? Or could you give me pointers for what to look for?

Testing: npm link .. fails for me

npm link ..
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/gregor/.nvm/versions/node/v6.4.0/bin/node" "/Users/gregor/.nvm/versions/node/v6.4.0/bin/npm" "link" ".."
npm ERR! node v6.4.0
npm ERR! npm  v3.10.3

npm ERR! May not delete: /Users/gregor/Projects/pouchdb-adapter-fs/pouchdb
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/gregor/Projects/pouchdb-adapter-fs/pouchdb/npm-debug.log

I suggest we add a section Testing to the README and ask people to git clone pouchdb into a different repository, install dependencies and then run npm link /path/to/pouchdb-adapter-fs and then run CLIENT_ADAPTER=pouchdb-adapter-fs npm test in the pouchdb folder?

That would be a simple first step. In general it would be nice to have a best practice for PouchDB adapter developers to test their adapter using the pouchdb test suite

enable Greenkeeper

I tried to do it myself but I don’t have admin access to the repository

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

use `prefix` option as prefix to path, not only the db

This code currently creates .fsdown/datamydb.json, but I’d expect data/mydb.json as the leveldb adapter does it.

var PouchDB = require('pouchdb-core')
  .plugin(require('pouchdb-adapter-fs'))
  .defaults({
    prefix: 'data/'
  })

new PouchDB('mydb')

Would you agree?

For Hoodie we need the folder where the databases are stored to be configurable.
I’d suggest that we default to .fsdown/ unless the prefix option is set.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.