Version 2.0 Rewrite
See original GitHub issueVersion 2.0 Rewrite
Summary:
This issue tracks the full rewrite of Dynamoose for version 2.0.
Last Steps Before Final:
- After deployment we need to make sure the cache control is correct for the items
Next Steps:
- Rethink
dynamoose.undefined
based on comments in #726 - Model.update
- Add support for set if_not_exists
- Add support for setting to not update updatedAt timestamp when updating
- Ensure support for enum for lists, and sets works correctly
- Ensure this works for Model.update when both setting, and appending to an array or set
-
errorUnknown
Schema setting from Dynamoose v1 - Model.delete
update
option - Figure out
allowEmptyArray
setting for Model.update - Figure out
createRequired
setting for Model.update - Figure out
returnValues
setting for Model.update - Add support for only getting certain attributes in Model.get (options.attributes)
- Add support for consistent option in Model.get (options.consistent) (ensure this also exists on Scan/Query)
- Do research on if Indexes can exist in nested properties (inside lists or maps) (I don’t think they can). If not we should truly think about if they should exists on the Schema or if we should move them to the Model. If we decide to keep it on the Schema, we should throw an error for nested schemas if the nested schema contains an index.
- Rethink about if there is a better way to handle
expires/ttl
other than adding a property to the Schema - Figure out how to remove
utils/empty_function.js
from code coverage summary afternpm test
- Clean up system for finding index and rearranging parameter names for Query
- Add support for splitting up batchGet requests for every 100 items and making multiple requests
- Add support for processing
UnprocessedKeys
in batchGet - Do more research between global and local indexes
- Think about if
rangeKey
&hashKey
should truly be on the Schema like v1, since it only gets set per Table, maybe it should be on the Model.
Long term steps:
- Allow for custom
updateDetails
timeout forupdateTimeToLive
. We should also maybe refactor how the setup flow works. We are doing a bunch of different things, and in a lot of cases we retrieve data before running a check function. We should standardize that process to make the code more dry. - There is an issue where when we do
JSON.stringify(test.schema)
throughout the test suite, it prints{}
, we need to figure out how to fix this
v2.x Tasks:
- TypeScript Support (#788)
- Plugin support
-
Model.populate
- It’d be cool for Model.populate to support passing another Model in as the type of a Schema property, that would basically create a reference to that other Model.
- Nested Schema support (#301)
- https://github.com/dynamoosejs/dynamoose/issues/768#issuecomment-608160537
- Add support for
null
DynamoDB type - Add support for passing in array of conditions into function settings (like
Model.update
) - Add support for custom date types like
moment
- Add support for ISO date format
- Add support for custom large numbers like
bignumber.js
- Add support for setting tags on the table
Goals:
- 100% code coverage with automated tests that cover as many edge cases as can possibly be thought of
- Better documentation, everything should be documented as it’s being written and created
- Fix a lot of pesky long lingering bugs in the codebase (ex. #669)
- Better parity with Mongoose
- Taking advantage of ES6 and beyond features from top to bottom
- This is not always possible. Especially when it comes to classes. https://stackoverflow.com/q/58864709/894067
- Have the codebase be more sustainable to adopt more features and functionality in the future, for example things like TypeScript, and new JavaScript features
Other Notes:
- I assume that v2.0 will be a step backwards from Dynamoose v1.x at the beginning, for example I don’t believe the following items don’t make it into v2.0:
- Plugins
- Populate
- TypeScript type file
- This description will change frequently as work is done on this project, so check back often for updates
- v2.0 will include MAJOR breaking changes, it will be likely that we will encourage all users to test their entire Dynamoose stack from top to bottom due to the amount of breaking changes that will be introduced
News/Announcements:
- February 16th 2020 - Beta 1 of Version 2.0 has been released. I’m really looking for a lot of feedback as devs integrate the beta version. If you have a smooth or difficult experience, I want to hear about it all. Feel free to comment below or contact me.
- November 14th 2019 - We are looking for submissions of unit or integration tests to be run on features or functionality to be prioritized for version 2.0. These tests should be very through and cover as many edge cases as possible. If you have reported bugs in Dynamoose v1.x that still haven’t been resolved (or have), this is a great opportunity to have your issues (or features) be prioritized for v2.0. In order to participate, please submit a pull request with your tests added. This PR should be branched off of and merged into the
2.0
branch.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:16
- Comments:7 (7 by maintainers)
Top Results From Across the Web
URL Rewrite : The Official Microsoft IIS Site
IIS URL Rewrite 2.1 enables Web administrators to create powerful rules to implement URLs that are easier for users to remember and easier...
Read more >Using URL Rewrite Module 2.0 - Microsoft Learn
URL Rewrite 2.0 for IIS 7 and above is an incremental release that includes all the features from version 1.1, and adds support...
Read more >Rephrase your Story to Rewrite, Redefine & Reinvent your Life
Reinvention 2.0 Edition : Rephrase your Story to Rewrite, Redefine & Reinvent your Life - Kindle edition by Subrata Ranjan Chanda. Download it...
Read more >mod_rewrite - Apache HTTP Server Version 2.2
This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited...
Read more >Money 2.0: Rewrite Your Money Story | Hidden Brain Media
This week, we kick off our new “Money 2.0” series with psychologist Brad Klontz. He says that while external economic forces often shape...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for your excellent library, I has been using the version 2.0 and created the NestJS Dynamoose Module. I also created a demo Serverless Starter Project which utilized those libraries. Thank for your great work again, it make my life so much easier 😃
Sounds good and I can totally understand especially when it comes to documentation, test coverage and bug fixes.