awslabs / dynamodb-data-mapper-js

A schema-based data mapper for Amazon DynamoDB.
https://awslabs.github.io/dynamodb-data-mapper-js/
Apache License 2.0
816 stars 106 forks source link

Incorrect or old version published? #172

Open juhamust opened 4 years ago

juhamust commented 4 years ago

When installing package dynamodb-data-mapper with npm, the itemIdentifier -function seem to be missing the latest fix:

function itemIdentifier(marshalled, keyProperties) {
    var e_15, _a;
    var keyAttributes = [];
    try {
        for (var keyProperties_1 = tslib_1.__values(keyProperties), keyProperties_1_1 = keyProperties_1.next(); !keyProperties_1_1.done; keyProperties_1_1 = keyProperties_1.next()) {
            var key = keyProperties_1_1.value;
            var value = marshalled[key];
            key + "=" + (value.B || value.N || value.S);
        }
    }
// ...

However, when built from source code, the itemIdentifier the fix is there:

function itemIdentifier(marshalled, keyProperties) {
    var e_15, _a;
    var keyAttributes = [];
    try {
        for (var keyProperties_1 = tslib_1.__values(keyProperties), keyProperties_1_1 = keyProperties_1.next(); !keyProperties_1_1.done; keyProperties_1_1 = keyProperties_1.next()) {
            var key = keyProperties_1_1.value;
            var value = marshalled[key];
            keyAttributes.push(key + "=" + (value.B || value.N || value.S));
        }
    }
// ...

So, the fix is not released yet or the incorrect version was published to npm?

ofekray commented 4 years ago

The published version is old. I'm also waiting for the fix to be published. @jeskew, can you publish a new version?

jeskew commented 4 years ago

Sorry @ofekray, but I am no longer at Amazon and cannot publish a new version. There's some discussion on the current status of the project at https://github.com/aws/aws-sdk-js/issues/2637