Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes a DocumentClient bug with the minified version of the browser SDK. #1990

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

chrisradek
Copy link
Contributor

Where sending Sets of data with the DynamoDB DocumentClient would cause an error to be returned from the service.

Also updated the browser test task to use the minified version of the browser SDK so we should catch these problems in the future.

There was an issue occurring where trying to use Sets with the DynamoDB DocumentClient would fail in the minified SDK. This is because the typeName check looked at the constructor.name property of a Set. Since minifying the SDK gets rid of function names, the constructor.name property of Sets became constructor instead of Set.

I've kept the existing check in place for native types (like typed arrays) but also check for a new property on our custom types first.

…g Sets of data with the DynamoDB DocumentClient would cause an error to be returned from the service.
@codecov-io
Copy link

codecov-io commented Mar 29, 2018

Codecov Report

Merging #1990 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1990      +/-   ##
==========================================
+ Coverage   95.98%   95.98%   +<.01%     
==========================================
  Files         221      221              
  Lines        7329     7331       +2     
  Branches     1401     1402       +1     
==========================================
+ Hits         7035     7037       +2     
  Misses        294      294
Impacted Files Coverage Δ
lib/dynamodb/numberValue.js 100% <100%> (ø) ⬆️
lib/dynamodb/types.js 95.65% <100%> (ø) ⬆️
lib/dynamodb/set.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5349bc8...5604ea9. Read the comment docs.

Copy link
Contributor

@jeskew jeskew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. In an ideal world, we could use Symbol.toStringTag and actual Sets, but alas.

@chrisradek chrisradek merged commit b663ae8 into aws:master Mar 29, 2018
@chrisradek chrisradek deleted the fix-minified-doc-client branch March 29, 2018 21:59
@lock
Copy link

lock bot commented Sep 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants