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

electrodb

Package Overview
Dependencies
Maintainers
0
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrodb - npm Package Versions

23
17

3.0.1

Diff

Changelog

Source

[3.0.1]

Fixed

  • The execution option { compare: "attributes" } used incorrect expression comparisons that impacted lte queries on indexes with a single composite key.
tywalch
published 3.0.0 •

Changelog

Source

[3.0.0]

Changed

  • ElectroDB is changing how it generates query parameters to give more control to users. Prior to v3, query operations that used the gt, lte, or between methods would incur additional post-processing, including additional filter expressions and some sort key hacks. The post-processing was an attempt to bridge an interface gap between attribute-level considerations and key-level considerations. Checkout the GitHub issue championed by @rcoundon and @PaulJNewell77 here to learn more. With v3, ElectroDB will not apply post-processing to queries of any type and abstains from adding implicit/erroneous filter expressions to queries by default. This change should provide additional control to users to achieve more advanced queries, but also introduces some additional complexity. There are many factors related to sorting and using comparison queries that are not intuitive, and the simplest way to mitigate this is by using additional filter expressions to ensure the items returned will match expectations. To ease migration and adoption, I have added a new execution option called compare; To recreate v2 functionality without further changes, use the execution option { compare: "v2" }. This value is marked as deprecated and will be removed at a later date, but should allow users to safely upgrade to v3 and experiment with the impact of this change on their existing data. The new compare option has other values that will continue to see support, however; to learn more about this new option, checkout Comparison Queries.
  • The validate callback on attributes now expects a strict return type of boolean. Additionally, the semantic meaning of a boolean response has flipped. The callback should return true for "valid" values and false for "invalid" values. If your validation function throws an error, ElectroDB will still behave as it previously did in v2, by catching and wrapping the error.
  • Providing the execution option limit on queries now only applies a Limit parameter to its request to DynamoDB. Previously, the limit option would cause ElectroDB to effectively "seek" DynamoDB until the limit was at least reached. The execution option count can be used in similar cases where limit was used, but performance may vary depending on your data and use case.

Removed

  • The execution options includeKeys and raw were deprecated in version 2.0.0 and have now been removed in favor of the execution option data. To migrate from v2, use the options { data: "includeKeys" } and { data: "raw" } respectively.

Fixed

  • Response typing and formatting logic for delete
tywalch
published 2.15.0 •

Changelog

Source

[2.15.0] - 2024-09-19

Updated

  • Updated @aws-sdk/lib-dynamodb dependency from pinned version 3.395.0 to latest release ^3.654.0. This impacts users using the v3 aws-sdk.
  • Adds dependency @aws-sdk/util-dynamodb for unmarshalling functionality.
tywalch
published 2.14.3 •

Changelog

Source

[2.14.3] - 2024-07-29

Fixed

  • Raised via Issue #196 and Discussion 361; When using a clustered index with an empty composite array, update and patch methods would not correctly form the complete sort key value for the index. This would prevent impacted items from being queried via an Entity, though they could be queried via a collection on a Service. Thank you to github users @daniel7byte and @santiagomera for raising this issue!
tywalch
published 2.14.2 •

Changelog

Source

[2.14.2] - 2024-07-07

Fixed

  • Raised via Issue #196 and Issue #390, a breaking change was made to the project's dependency @aws-sdk/lib-dynamodb. The change resulted in the error Error: Cannot find module '@aws-sdk/lib-dynamodb/dist-cjs/commands/utils'. This change updates ElectroDB's dependency version to the static version 3.395.0, a version known to be compadible. Thank you github users @miyamonz, @kevinlonigro, @srodriki, @pablote, @sargisshahinyan, and @arpadgabor!
tywalch
published 2.14.1 •

Changelog

Source

[2.14.1] - 2024-05-17

Fixed

  • Further fixes in service of Issue #366. A bug was discovered that the logic to validate the presence of an attribute was a simple falsey check instead of a check that the value was undefined. This caused empty strings, zero values, and the boolean value false to incorrectly be considered missing.
tywalch
published 2.14.0 •

Changelog

Source

[2.14.0] - 2024-04-29

Fixed/Changed

  • Addresses Issue #366 with unexpected outcomes from index condition usage. Discussion inside the issue ticket revealed complexities associated with the implementation of the condition callback. Previously, a callback returning false would simply not write the fields associated with an index on update. Through discussion with @sam3d and @nonken, it was revealed that this behavior could lead to inconsistencies between indexes and attributes. Furthermore, this behavior did not align with user expectations/intuitions, which expected a false response to trigger the removal of the item from the index. To achieve this, it was discussed that the presence of a condition callback should add a new runtime validation check on all mutations to verify all member attributes of the index must be provided if a mutation operation affects one of the attributes. Previously ElectroDB would validate only that composite members of an index field (a partition or sort key) within an index were fully provided; now, when a condition callback is present, it will validate that all members from both fields are provided. If you are unable to update/patch all member attributes, because some are readOnly, you can also use the composite method on update and patch. More information and the discussion around the reasoning behind this change can be found here. Failure to provide all attributes will result in an Invalid Index Composite Attributes Provided Error.
tywalch
published 2.13.1 •

Changelog

Source

[2.13.1] - 2024-01-23

Fixed

  • Fixes custom attribute type extraction for union types with RecordItem. Patch provided by GitHub user @wentsul via PR #346. Thank you for another great addition!
tywalch
published 2.13.0 •

Changelog

Source

[2.13.0] - 2023-12-28

Added

  • Adds new query execution option count which allows you to specify a specific item count to return from a query. This is useful for cases where you must return a specific/consistent number of items from a query, a deceptively difficult task with DynamoDB and Single Table Design.
tywalch
published 2.12.3 •

Changelog

Source

[2.12.3] - 2023-12-26

Fixed

  • Collection queries returned an undefined cursor (currently typed as string | null) when using the raw:true execution option. Fixed to return null instead of undefined.
  • Removed superfluous and unused files, ./library-data.json and test.csv, accidentally published in version 2.12.2.
23
17
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