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

arangojs

Package Overview
Dependencies
Maintainers
2
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arangojs - npm Package Compare versions

Comparing version 3.6.0 to 3.7.0

lib/util/once.js

25

lib/connection.js

@@ -5,3 +5,3 @@ 'use strict';

var qs = require('querystring');
var xhr = require('request');
var createRequest = require('./util/request');
var ArangoError = require('./error');

@@ -18,2 +18,3 @@ var Route = require('./route');

this.config = extend({}, Connection.defaults, config);
this.config.agentOptions = extend({}, Connection.agentDefaults, this.config.agentOptions);
if (!this.config.headers) this.config.headers = {};

@@ -23,2 +24,3 @@ if (!this.config.headers['x-arango-version']) {

}
this._request = createRequest(this.config.agent, this.config.agentOptions);
}

@@ -31,2 +33,7 @@

};
Connection.agentDefaults = {
maxSockets: 3,
keepAlive: true,
keepAliveMsecs: 1000
};

@@ -69,3 +76,3 @@ extend(Connection.prototype, {

xhr({
this._request({
url: this._resolveUrl(opts),

@@ -75,12 +82,12 @@ headers: extend(headers, this.config.headers, opts.headers),

body: body
}, function (err, response, rawBody) {
response.rawBody = rawBody;
if (err) callback(err, response);else if (response.headers['content-type'].match(jsonMime)) {
}, function (err, res) {
if (err) callback(err);else if (res.headers['content-type'].match(jsonMime)) {
try {
response.body = JSON.parse(rawBody);
res.rawBody = res.body;
res.body = JSON.parse(res.rawBody);
} catch (e) {
return callback(extend(e, { response: response }));
return callback(extend(e, { response: res }));
}
if (!response.body.error) callback(null, response);else callback(extend(new ArangoError(response.body), { response: response }));
} else callback(null, extend(response, { body: rawBody }));
if (!res.body.error) callback(null, res);else callback(extend(new ArangoError(res.body), { response: res }));
} else callback(null, extend(res, { rawBody: res.body }));
});

@@ -87,0 +94,0 @@ return promise;

@@ -388,13 +388,3 @@ 'use strict';

},
query: (function (_query) {
function query(_x, _x2, _x3) {
return _query.apply(this, arguments);
}
query.toString = function () {
return _query.toString();
};
return query;
})(function (query, bindVars, cb) {
query: function query(_query, bindVars, cb) {
if (typeof bindVars === 'function') {

@@ -410,8 +400,8 @@ cb = bindVars;

if (query && typeof query.toAQL === 'function') {
query = query.toAQL();
if (_query && typeof _query.toAQL === 'function') {
_query = _query.toAQL();
}
var self = this;
self._api.post('cursor', {
query: query,
query: _query,
bindVars: bindVars

@@ -422,3 +412,3 @@ }, function (err, res) {

return promise;
}),
},
functions: function functions(cb) {

@@ -425,0 +415,0 @@ var _promisify20 = promisify(cb);

@@ -7,5 +7,5 @@ 'use strict';

if (arr.length === 0) {
return callback(null, result);
}function step(i) {
if (arr.length === 0) return callback(null, result);
function step(i) {
return function (err, res) {

@@ -12,0 +12,0 @@ pending -= 1;

{
"name": "arangojs",
"version": "3.6.0",
"version": "3.7.0",
"description": "The official ArangoDB JavaScript driver.",

@@ -29,5 +29,5 @@ "main": "index.js",

"coveralls": "npm run cover && cat ./coverage/lcov.info | coveralls ; rm -rf ./coverage",
"watch": "dirwatch -d 500 -c 'npm run test-only && npm run lint && npm run dist' ./lib ./test",
"watch": "watch 'npm run test-only && npm run lint && npm run dist' ./lib ./test",
"dist": "npm run babel && npm run bundle && npm run minify",
"babel": "babel --optional utility.deadCodeElimination --compact false -d lib src",
"babel": "babel --compact false -d lib src",
"bundle": "npm run all-bundle && npm run raw-bundle",

@@ -53,22 +53,16 @@ "minify": "npm run all-minify && npm run raw-minify",

"devDependencies": {
"async": "^0.9.0",
"babel": "^5.1.10",
"browserify": "^7.0.2",
"babel": "^5.2.17",
"browserify": "^10.1.3",
"coveralls": "^2.11.2",
"dekeywordify": "^0.2.0",
"dirwatch": "^1.1.0",
"eslint": "^0.19.0",
"expect.js": "^0.3",
"istanbul": "^0.3.5",
"mocha": "^2.0.1",
"uglify-js": "^2.4.15",
"xhr": "^2.0.0"
"dekeywordify": "^0.2.1",
"eslint": "^0.21.0",
"expect.js": "^0.3.1",
"istanbul": "^0.3.14",
"mocha": "^2.2.4",
"uglify-js": "^2.4.21",
"watch": "^0.16.0"
},
"browser": {
"request": "xhr"
},
"dependencies": {
"extend": "^2.0.0",
"request": "^2.42.0"
"extend": "^2.0.1"
}
}

Sorry, the diff of this file is too big to display

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