Version 3.0 Planning
See original GitHub issueVersion 3.0 Planning
The time has come to start thinking about what the next version of Dynamoose will look like.
Overview
v3.0 is planning to be pretty light in terms of breaking changes compared to v2.0. The main priority for v3.0 is to get an extremely solid foundation to be able to iterate on for a long time to come. I envision all future major versions of Dynamoose to include maybe 1 or 2 breaking changes that are relatively minor in scale. The goal is for this to be the last major version that requires any type of substantial changes to users codebases to get working with the new version. I also envision future major versions of Dynamoose to possibly take place more frequently due to the smaller amount of breaking changes that will occur.
This really includes things like solidifying the concepts of Dynamoose. What does a Model
really mean? What should be the behavior of defaults
? What does set
mean (ex. should it occur before or after type checking, etc)? Lots of foundational questions like that I hope users will ask and discuss as part of our v3.0 process.
Goals
- Upgrade to AWS SDK for Node.js 3.0 #1145
- Drop support for older Node.js versions (<v10) #1146
- Change Document name to Item (to better match DynamoDB naming) #1152
- Move logger to different package
- Improve internal vs. external API
- Move internal API behind symbol #1172
- Expose more APIs (ex. I use
getIndexAttributes
in another project, which is really bad practice and doesn’t follow the Dynamoose guidelines, we should expose that), https://github.com/dynamoose/dynamoose/discussions/1218, https://github.com/dynamoose/dynamoose/issues/1286
- Fix website deployment error
- Changing concept of
Model
to represent an entity as opposed to having it represent a DynamoDB Table- Ensure 100% code coverage
- Need to figure out how this works for populating
- Need to ensure transactions work properly here
- Add
dynamoose.type.Constant()
helper method to easily create constant types - Add
dynamoose.type.Combine()
helper method to easily create combine types - Rename
dynamoose.NULL
todynamoose.type.Null
- Rename
dynamoose.THIS
todynamoose.type.This
- Change
internalSettings
to useinternalProperties
symbol - Consider switching to Jest
Alpha
- #900
- #1093
- The v3 documentation for Model is incorrect, it shows a lot of settings that are no longer valid
Beta
- #932
- Any type (this should work for both
type
&schema
in Schema objects) - #1023?
- Make FAQ about what order Dynamoose processes events (ie.
set
/get
happen after type check) - Setup automatic dark mode for documentation based on OS setting
- #1129
- Consider making
global
setting true on indexes by default - https://github.com/dynamoose/dynamoose/issues/1306
- #1002
- Foundation code
- Add tests for adding new instances
- Add documentation
- Consider only initializing Table when request is made (get, update, etc). We could also add a
table.initialize
method to do this manually. - #1320
- Rename Initalizer to be correct spelling
- Add object/item/document wide
set
,get
,validate
methods- Set
- Get
- Validate
- Make
Condition.requestObject
private - Make Serializer properties private
- Promote to beta
- Need to figure out how to merge publish changes made in v3 into v2
- Create new v2 branch based on main
- Update README branch strategy
- Merge v3 into main
- Publish new v3 release
- https://github.com/dynamoose/dynamoose/issues/1321
- Make more schema properties private
- Make more item properties private
- #1301
- #1155
- Remove all instances of
//...
in documentation - #1361
- #1360
- Add more JSDoc documentation
- Build system to convert
.d.ts
files to.js
files to use for documentation. Basically we can take everyinterface
and turn it into an object and then use that to create our documentation.
- Build system to convert
- Plugin Support
- Need to figure out how this is going to work with TypeScript
- Allow for schema and model prioritization to be impacted by
validate
methods - Consider changing
rangeKey
andhashKey
to not be settings of the property but instead be settings of the model (or table in v3) - Add more functions to
dynamoose.Table
- Look into more single table design improvements
- Drop native callback support and encourage users to use
util.callbackify
as an alternative?- After considering this more, I don’t think this is going to happen in v3.
- #977?
- Take TypeScript out of beta? (Will be easier if we move to Jest and write tests in TypeScript)
- Throw warnings for invalid settings (ex.
timestamps
on Model settings). Need to make sure this is compatible with plugins. - Disallow
Model
’s having multiple schemas- After seeing https://github.com/dynamoose/dynamoose/discussions/1277, I’m not sure we want to do this. There seem to be some valid use case for multiple schemas on a model. Will have to think about more.
- Consider removing
dynamoose.UNDEFINED
. This could be handled by havingdelete obj.a
have different behavior thanobj.a = undefined
. We can check this by usingobj.a === undefined
andobj.hasOwnProperty('a')
.- This can’t be done due to how update works. There is no way to pass in a single object and determine between reverting to the default, and using removing the property.
Timeline
- Discussion/RFC/Proposals - Now
- Development Starts - Now
- Beta Release - TBD
- Final Release - TBD
Blockers
FAQ
How can I submit ideas/goals for v3.0?
Create a new issue and include v3.0 right after the ]
in the issue title. Make it clear it’s a proposal for v3.0, and I will add it to this issue Goals
section above. Your issue you create is where discussion will occur about the proposal.
How can I support v3.0?
Right now, submit feedback! What would you like to see in v3.0? If you could have complete control over Dynamoose and could break everything to make it work better, what would you change? No ideas are off limits here. Even if I shot down an idea in the past because it was a breaking change, now is the time to bring it up again.
As this process moves forward, the ways you can support v3.0 will change. This will include submitting PRs, testing beta versions, etc.
I have an idea for v3.0, but I’m not sure if it’s good.
Follow the steps above for How can I submit ideas/goals for v3.0?
! Even if you are unsure about it, it will lead to discussion which will benefit Dynamoose.
What does the timeline look like for v3.0?
This is definitely a 2021 project at the earliest. The reason I’m starting discussion now is to keep breaking changes organized. I also want a very extended period where users can comment on ideas for v3.0. Right now, I don’t anticipate development starting in 2020. However this could change and I might decide to start minor development in late December.
Can I submit PRs for v3.0 right now?
Yes! Feel free to submit PRs to the v3
branch. It would be a good idea to comment here and tag me so I’m aware and don’t overlap with your work.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (8 by maintainers)
Top GitHub Comments
AWS SDK v3 is out for node
I’ll see what I can do ! give me like a week