Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,3 +628,7 @@ All notable changes to this project will be documented in this file. Breaking ch
## [3.6.1]
### Fixed
- [Issue #548](https://github.com/tywalch/electrodb/issues/548); Fixed invalid `ProjectionExpression` generated for entities without a sort key when using the `attributes` option. An empty string was incorrectly added to `ExpressionAttributeNames`, causing DynamoDB to reject the request.

## [3.6.2]
## Added
- Fast follow to 3.6.0, relaxes projection attribute constraint on collection entities. 3.6.0 required [collection] member entities to all share the same attributes when using a `projection` defined index. This constraint came from the original scope of 3.6.0. Thankfully, due to the work of [@anatolzak](https://github.com/anatolzak), 3.6.0 shipped with robust collection typing and this no longer was a concern.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electrodb",
"version": "3.6.1",
"version": "3.6.2",
"description": "A library to more easily create and interact with multiple entities and heretical relationships in dynamodb",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function isMatchingProjection(received, expected) {
if (isStringHasLength(received) && isStringHasLength(expected)) {
return received === expected;
} else if (Array.isArray(received) && Array.isArray(expected)) {
return received.length === expected.length && expected.every((attribute) => received.includes(attribute));
return true;
} else {
return isValueOrUndefined(received, IndexProjectionOptions.all) && isValueOrUndefined(expected, IndexProjectionOptions.all)
}
Expand Down
Loading
Loading