Skip to content

Commit

Permalink
Merge pull request #199 from chrisswaine/promisify
Browse files Browse the repository at this point in the history
Promisify client prototype functions
  • Loading branch information
nicolasembleton authored Apr 24, 2017
2 parents 937cd19 + 0975879 commit 2bf9207
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/solr.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var http = require('http'),
duplexer = require('duplexer'),
request = require('request'),
JSONbig = require('json-bigint'),
versionUtils = require('./utils/version');
versionUtils = require('./utils/version'),
Promise = require('bluebird');

/**
* Expose `createClient()`.
Expand Down Expand Up @@ -1001,3 +1002,5 @@ function handleJSONResponse(request, bigint, callback){
});
};
};

Promise.promisifyAll(Client.prototype);
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "solr-client",
"main": "./main",
"description": " A Solr client library for indexing, adding, deleting, committing, optimizing and searching documents within an Apache Solr installation (version>=3.2)",
"version": "0.6.0",
"version": "0.6.1",
"repository": {
"type": "git",
"url": "https://github.com/lbdremy/solr-node-client"
Expand All @@ -17,6 +17,7 @@
},
"dependencies": {
"JSONStream": "~1.0.6",
"bluebird": "^3.5.0",
"duplexer": "~0.1.1",
"httperror": "~0.2.3",
"json-bigint": "~0.1.4",
Expand Down

0 comments on commit 2bf9207

Please sign in to comment.