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

3.0.0 #440

Merged
merged 25 commits into from
Oct 20, 2024
Merged

3.0.0 #440

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
26dbd74
Adds compare execution option
tywalch Aug 28, 2024
f9b64cd
Formatting code
tywalch Sep 15, 2024
8d1845c
Removing more filters, fixing test impact
tywalch Sep 17, 2024
55fa5a6
fixing tests impacted by change in default `compare` value
tywalch Sep 17, 2024
7e9380a
Lifts and shifts "conversions"
tywalch Sep 19, 2024
cad2cf5
Merge branch 'master' of https://github.com/tywalch/electrodb into fe…
tywalch Sep 21, 2024
594b59f
Working tests
tywalch Oct 5, 2024
56ada9d
Working execution option `compare`
tywalch Oct 11, 2024
d8662b0
Simplifies `validate` api
tywalch Oct 11, 2024
14539e0
Updates documentation to with impact of `compare` execution option ch…
tywalch Oct 13, 2024
12a2c8b
Fixing tests and removing `raw:true` and `includeKeys:true`
tywalch Oct 18, 2024
6d20cc5
Updates rough changelog
tywalch Oct 18, 2024
3946fa3
Tidies documentation
tywalch Oct 18, 2024
ab5a0db
Documentation updates
tywalch Oct 18, 2024
7296de6
Fixes `response` return logic for delete
tywalch Oct 18, 2024
c633a64
Rough changelog updates
tywalch Oct 18, 2024
c6b350d
Merge branch 'master' of https://github.com/tywalch/electrodb into ve…
tywalch Oct 18, 2024
65792c8
Fixes `delete` response type tests
tywalch Oct 18, 2024
5f35339
Documentation clean up
tywalch Oct 18, 2024
6b636ba
Polish
tywalch Oct 20, 2024
29b0c2f
Updating page sections for language diversity
tywalch Oct 20, 2024
660139c
Pages updates
tywalch Oct 20, 2024
81b182a
Page updates
tywalch Oct 20, 2024
c822380
Page updates
tywalch Oct 20, 2024
08d8dc0
Adds undefined `compare` tests, removes skipped validation tests
tywalch Oct 20, 2024
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
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,4 +536,14 @@ All notable changes to this project will be documented in this file. Breaking ch
## [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.
- Adds dependency `@aws-sdk/util-dynamodb` for unmarshalling functionality.

## [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](https://github.com/tywalch/electrodb/issues/228) 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](https://electrodb.dev/en/queries/filters/) 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](https://electrodb.dev/en/queries/query#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`
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@

_Please submit issues/feedback or reach out on Twitter [@tinkertamper](https://twitter.com/tinkertamper)._

<a href="https://electrodb.dev/en/core-concepts/v3-migration/"><h1 align="center">ElectroDB v3 now released</h1></a>

<p align="center">Visit the <a href="https://electrodb.dev/en/core-concepts/v3-migration/">v3 migration page</a> to learn more about this new update.</p>

---

<a href="https://electrodb.dev"><h1 align="center">New: Documentation now found at ElectroDB.dev</h1></a>
<a href="https://electrodb.dev"><h1 align="center">Documentation now found at ElectroDB.dev</h1></a>

<p align="center">ElectroDB's new website for Documentation is now live at <a href="https://electrodb.dev">www.ElectroDB.dev</a>.</p>
<p align="center">ElectroDB's new website for Documentation is now live at <a href="https://electrodb.dev">electrodb.dev</a>.</p>

---

<a href="https://electrodb.fun"><h1 align="center">Introducing: The NEW ElectroDB Playground</h1></a>
<a href="https://electrodb.fun"><h1 align="center">The NEW ElectroDB Playground</h1></a>

<p align="center">
<a href="https://electrodb.fun"><img width="400" src="https://github.com/tywalch/electrodb/blob/master/assets/playground.jpg?raw=true"></a>
Expand Down
Loading
Loading