Skip to content

Commit

Permalink
(#3834) - Follow up, highlight code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
daleharvey committed Aug 3, 2015
1 parent f381b44 commit 45fcb09
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions docs/_posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md
Expand Up @@ -19,7 +19,9 @@ We previously used `bluebird` as our `Promise` polyfill in node.js because it is

PouchDB will always use the globally available `Promise` object where available, so if you have only used standard `Promise` functionality, this change will not break anything. If you require the extra functionality provided by `bluebird`, then you can have PouchDB use it with

global.Promise = require('bluebird');
```js
global.Promise = require('bluebird');
````

* Remove `local_seq` - ([#4080](https://github.com/pouchdb/pouchdb/issues/4080))

Expand All @@ -29,26 +31,34 @@ This was a little-used functionality whose semantics are due to change in CouchD

These callbacks have long been replaced with the `EventEmitter`-style `changes()`, `replicate()` and `sync()` APIs, and are finally being removed. If you still have:

db.changes({
onChange: changeFun,
complete: completeFun
});
```js
db.changes({
onChange: changeFun,
complete: completeFun
});
```

You can replace them with:

db.changes()
.on('change', changeFun)
.on('complete', completeFun);
```js
db.changes()
.on('change', changeFun)
.on('complete', completeFun);
```

* Remove `uptodate` event - ([#4100](https://github.com/pouchdb/pouchdb/issues/4100))

`uptodate` was an event introduced to indicate when a `live` replication had finished processing all current changes and was waiting on future changes. It has since been replaced by the `paused` event, which will do the same and additionally indicate whether the replication was paused due to an error. If you have:

replication.on('uptodate', doneFun);
```js
replication.on('uptodate', doneFun);
```

You can replace it with:

replication.on('paused', doneFun);
```js
replication.on('paused', doneFun);
```

### New features

Expand Down

0 comments on commit 45fcb09

Please sign in to comment.