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

documentdb

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documentdb - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

4

changelog.md

@@ -0,1 +1,5 @@

## Changes in 1.5.5 : ##
- Fixed hashParitionResolver resolveForRead(): When no partition key supplied was throwing exception, instead of returning a list of all registered links.
## Changes in 1.5.4 : ##

@@ -2,0 +6,0 @@

2

lib/constants.js

@@ -149,3 +149,3 @@ /*

UserAgent: "documentdb-nodejs-sdk-1.5.4",
UserAgent: "documentdb-nodejs-sdk-1.5.5",

@@ -152,0 +152,0 @@ DefaultPrecisions: {

@@ -43,2 +43,3 @@ /*

this.consistentHashRing = new ConsistentHashRing(collectionLinks, options);
this.collectionLinks = collectionLinks;
}, {

@@ -60,3 +61,7 @@ /**

resolveForRead: function (partitionKey) {
return [this._resolve(partitionKey)];
if (partitionKey === undefined || partitionKey === null) {
return this.collectionLinks;
}
return [this._resolve(partitionKey)];
},

@@ -63,0 +68,0 @@ /**

@@ -12,3 +12,3 @@ {

],
"version": "1.5.4",
"version": "1.5.5",
"author": "Microsoft Corporation",

@@ -15,0 +15,0 @@ "main": "./index.js",

@@ -78,10 +78,13 @@ /*

it("invalid key", function () {
it("null key", function () {
var resolver = new HashPartitionResolver("ignored", ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]);
assert.throws(
function () {
resolver.resolveForRead(null);
},
/partitionKey must be a 'string'/);
var links = resolver.resolveForRead(null);
assert.deepEqual(links, ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]);
});
it("undefined key", function () {
var resolver = new HashPartitionResolver("ignored", ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]);
var links = resolver.resolveForRead();
assert.deepEqual(links, ["dbs/foo/colls/A", "dbs/foo/colls/B", "dbs/foo/colls/C"]);
});
});

@@ -88,0 +91,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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