aws-core-utils
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -57,3 +57,3 @@ 'use strict'; | ||
// If no options were specified, then use an empty object | ||
const options = dynamoDBDocClientOptions ? copy(dynamoDBDocClientOptions, {deep: true}) : {}; | ||
const options = dynamoDBDocClientOptions ? copy(dynamoDBDocClientOptions) : {}; | ||
@@ -95,6 +95,10 @@ // If no region was specified in the given dynamoDBDocClient options, then set it to the current region | ||
} | ||
// Create a new DynamoDB.DocumentClient instance with the modified options | ||
dynamoDBDocClient = new AWS.DynamoDB.DocumentClient(options); | ||
// Cache the new instance and the options used to create it | ||
// Create a new DynamoDB.DocumentClient instance with a COPY of the resolved options (COPY avoids subsequent cache | ||
// comparison failures failures due to later versions of AWS SDK (e.g. 2.45.0) mutating the options passed to the | ||
// constructor, e.g. by adding "attrValue" with value "S8" | ||
dynamoDBDocClient = new AWS.DynamoDB.DocumentClient(options ? copy(options) : options); | ||
// Cache the new instance ... | ||
dynamoDBDocClientByRegionKey.set(regionKey, dynamoDBDocClient); | ||
// ... and cache the ORIGINAL (pre-COPY) options "used" to create it | ||
dynamoDBDocClientOptionsByRegionKey.set(regionKey, options); | ||
@@ -101,0 +105,0 @@ |
{ | ||
"name": "aws-core-utils", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "Core utilities for working with Amazon Web Services (AWS), including ARNs, regions, stages, Lambdas, AWS errors, stream events, Kinesis, DynamoDB.DocumentClients, etc.", | ||
@@ -8,3 +8,3 @@ "author": "Byron du Preez", | ||
"engines": { | ||
"node": ">=4.3.2" | ||
"node": ">=6.10" | ||
}, | ||
@@ -15,10 +15,10 @@ "scripts": { | ||
"dependencies": { | ||
"core-functions": "^3.0.2", | ||
"logging-utils": "^4.0.1", | ||
"deep-equal": "^1.0.1" | ||
"core-functions": "3.0.4", | ||
"logging-utils": "4.0.3", | ||
"deep-equal": "1.0.1" | ||
}, | ||
"devDependencies": { | ||
"aws-sdk": "2.4.9" | ||
"aws-sdk": "2.45.0" | ||
}, | ||
"repository": "https://github.com/byron-dupreez/aws-core-utils" | ||
} |
@@ -1,2 +0,2 @@ | ||
# aws-core-utils v6.0.1 | ||
# aws-core-utils v6.0.2 | ||
@@ -391,2 +391,12 @@ Core utilities for working with Amazon Web Services (AWS), including ARNs, regions, stages, Lambdas, AWS errors, stream events, Kinesis, DynamoDB.DocumentClients, etc. | ||
### 6.0.2 | ||
- Upgraded to Node 6.10.3 | ||
- Updated `core-functions` dependency to version 3.0.4 | ||
- Updated `logging-utils` dependency to version 4.0.3 | ||
- Upgraded `aws-sdk` dev dependency to version 2.45.0 | ||
- Changes to `dynamodb-doc-client-cache` module: | ||
- Changed `setDynamoDBDocClient` to create & cache each new DynamoDB.DocumentClient instance with a COPY of the options | ||
while still caching the ORIGINAL options to avoid subsequent cache comparison failures related to AWS SDK 2.45.0 | ||
mutating the options passed to the constructor, e.g. by adding "attrValue" with value "S8" | ||
### 6.0.1 | ||
@@ -393,0 +403,0 @@ - Updated `core-functions` dependency to version 3.0.2 |
{ | ||
"name": "aws-core-utils-tests", | ||
"description": "Unit tests for aws-core-utils modules", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"author": "Byron du Preez", | ||
@@ -9,3 +9,3 @@ "license": "Apache-2.0", | ||
"engines": { | ||
"node": ">=4.3.2" | ||
"node": ">=6.10" | ||
}, | ||
@@ -12,0 +12,0 @@ "scripts": { |
437818
6284
688
+ Addedcore-functions@3.0.4(transitive)
+ Addeddeep-equal@1.0.1(transitive)
+ Addedlogging-utils@4.0.3(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.2(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removedcore-functions@3.0.25(transitive)
- Removeddeep-equal@1.1.2(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.1.1(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.7(transitive)
- Removedget-proto@1.0.1(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-arguments@1.2.0(transitive)
- Removedis-date-object@1.1.0(transitive)
- Removedis-regex@1.2.1(transitive)
- Removedlogging-utils@4.0.25(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedregexp.prototype.flags@1.5.4(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
Updatedcore-functions@3.0.4
Updateddeep-equal@1.0.1
Updatedlogging-utils@4.0.3