Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloudant-follow

Package Overview
Dependencies
Maintainers
4
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudant-follow - npm Package Compare versions

Comparing version 0.18.0-SNAPSHOT.56 to 0.18.0

5

CHANGES.md

@@ -1,3 +0,6 @@

# UNRELEASED
# 0.18.0 (2018-10-30)
- [NEW] Support use of changes selector filter.
- [FIXED] Abort request retry for dead feed.
- [FIXED] Pipe using decoded request.
- [FIXED] Support using `since="now"` parameter in a `/_db_updates` feed.

@@ -4,0 +7,0 @@ # 0.17.0 (2018-03-22)

44

lib/feed.js

@@ -101,3 +101,3 @@ // Copyright © 2017, 2018 IBM Corp. All rights reserved.

if (typeof opts === 'string') {
opts = {'db': opts};
opts = { 'db': opts };
}

@@ -167,6 +167,3 @@

var uri = self.is_db_updates ? self.db.replace(/\/_db_updates$/, '') : self.db;
var req = {'uri': uri, 'headers': headers};
Object.keys(self.request).forEach(function(key) {
req[key] = self.request[key];
});
var req = { 'uri': uri, 'headers': headers };

@@ -205,17 +202,18 @@ req = self.httpAgent(req, db_response);

if (self.since === 'now') {
self.log.debug('Query since "now" is the same as query since -1');
self.since = -1;
}
if (self.since === -1) {
self.log.debug('Query since ' + self.since + ' will start at ' + db.update_seq);
self.since = db.update_seq;
} else if (self.since < 0) {
if (isNaN(db.update_seq)) {
return self.emit('error', new Error('DB requires specific id in "since"'));
// `/_db_updates` does not support since=-1, we use since="now" instead.
if (!self.is_db_updates) {
if (self.since === 'now') {
self.log.debug('Query since "now" is the same as query since -1');
self.since = -1;
}
self.log.debug('Query since ' + self.since + ' will start at ' + (db.update_seq + self.since + 1));
self.since = db.update_seq + self.since + 1;
if (self.since === -1) {
self.log.debug('Query since ' + self.since + ' will start at ' + db.update_seq);
self.since = db.update_seq;
} else if (self.since < 0) {
if (isNaN(db.update_seq)) {
return self.emit('error', new Error('DB requires specific id in "since"'));
}
self.log.debug('Query since ' + self.since + ' will start at ' + (db.update_seq + self.since + 1));
self.since = db.update_seq + self.since + 1;
}
}

@@ -275,2 +273,4 @@

self.headers.accept = self.headers.accept || 'application/json';
self.headers['content-type'] = self.headers['content-type'] || 'application/json';
var req = {

@@ -355,3 +355,3 @@ method: 'GET',

changes_stream.feed = self.feed;
resp.pipe(changes_stream);
feed_request.pipe(changes_stream);

@@ -596,3 +596,3 @@ changes_stream.created_at = now;

self.log.debug('Retry since=' + self.since + ' after ' + self.retry_delay + 'ms ');
self.emit('retry', {since: self.since, after: self.retry_delay, db: self.db_safe});
self.emit('retry', { since: self.since, after: self.retry_delay, db: self.db_safe });

@@ -679,3 +679,3 @@ self.retry_timer = setTimeout(function() {

var req = lib.JDUP({'query': self.query_params});
var req = lib.JDUP({ 'query': self.query_params });
var filter_args;

@@ -682,0 +682,0 @@

@@ -53,3 +53,3 @@ // Copyright © 2017 IBM Corp. All rights reserved.

'fatal': debug('follow:' + name + ':fatal'),
'level': {'level': 0, 'levelStr': 'noop'},
'level': { 'level': 0, 'levelStr': 'noop' },
'setLevel': noop

@@ -56,0 +56,0 @@ };

@@ -141,3 +141,3 @@ // Copyright © 2017 IBM Corp. All rights reserved.

self.log.debug('write: ' + util.inspect({'data': data, 'buf': buf}));
self.log.debug('write: ' + util.inspect({ 'data': data, 'buf': buf }));

@@ -144,0 +144,0 @@ // Buf could have 0, 1, or many JSON objects in it.

{
"name": "cloudant-follow",
"version": "0.18.0-SNAPSHOT.56",
"version": "0.18.0",
"author": {

@@ -26,16 +26,16 @@ "name": "IBM Cloudant",

"dependencies": {
"request": "^2.83.0",
"browser-request": "~0.3.0",
"debug": "^3.0.0"
"debug": "^4.0.1",
"request": "^2.88.0"
},
"devDependencies": {
"eslint": "^4.16.0",
"eslint-plugin-standard": "^3.0.1",
"eslint": "^5.0.0",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^6.0.0",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-react": "^7.7.0",
"eslint-config-standard": "^11.0.0",
"eslint-config-semistandard": "^12.0.0",
"eslint-plugin-header": "^1.0.0",
"eslint-config-standard": "^12.0.0",
"eslint-config-semistandard": "^13.0.0",
"eslint-plugin-header": "^2.0.0",
"tap": "~12.0.0",

@@ -42,0 +42,0 @@ "commander": "^2.11.0"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc