-
Notifications
You must be signed in to change notification settings - Fork 0
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
How do we approach the TypeScript conversion? #6
Comments
I think we should start with core files then move outwards, otherwise when we convert a core file to TS we might have to change the files which depend on it. |
I'm happy with any decision you guys make. Will be happy to merge things since it shouldn't really affect anything (other than making things better) |
After sequelize/sequelize#13805, @WikiRik and I are starting to think we should postpone the TypeScript migration to v7. We've received a couple of issues regarding unexpected breaking changes in v6. So far all of them are caused by users accessing the internal APIs ( So our options are:
I would opt for option 2 because option 3 is a lot of work and option 1 is already causing users to open issues: |
If I remember correctly we decided to try to do the TypeScript migration in v6 since we expected to work around the breaking changes. Seeing the number of downloads on v5 (200k on 5.22.4 in the last week) people are hesitant to upgrade to a new major version so we decided to move v7 to when we have more breaking changes ready. So this will not be an easy decision (also linked to #5 ) |
TBH I have no problem at all having the ts changes in v7 and let the people decide if they want to migrate. |
Follow-up (for during the meeting) would be if we want to release v7 as soon as TypeScript migration is done and do other breaking changes in v8 or do we want to still accumulate breaking changes before we release v7? |
I hope it's ok to put this here before the meeting but: I think it's better to accumulate breaking changes that bring new features or improve existing ones, to give an incentive to upgrade |
I guess I would accumulate all the interesting changes and continuously release alpha builds for v7. |
New issue regarding the migration sequelize/sequelize#13811 :( |
Proposal:
What do you think. Happy to have the discussion asynchronously here. However, I think we can all agree on the fact that we are stepping on everybody's toes when we continue the TS migration on v6. Opinion? Edit: This might also ease the craziness in needing a proper backwards compatibility. |
I vote to do exactly that. |
Agree with the proposal. Two questions though;
|
Splitting would be part of v7 and we will only turn into 7.0.0 final when every breaking change is in. |
or in other words: yes we keep breaking the alpha until we are happy with it :) edit: btw. creating a first beta is rather optional. we can talk about it in more depths once we are done with the ts migration. we can also remain in the alpha state as long as we want. |
FYI: Independently of the outcome of this conversation, I'll prep an alpha pipeline for v7. For that I force replaced the existing v7 branch and stored the former changes in v7-bak (which we can then copy over). With a bit of luck we should have a v7 alpha in a moment: sequelize/sequelize@98ad525 |
Q: What's the status of data types conversion? --> Create draft PRs and list all files you are likely going to touch/convert! |
Sascha: Started working on utils: https://github.com/sequelize/sequelize/pull/13782/files |
Blocking decision: Do we drop support for TypeScript < 4.1? TypeScript 4.1 added Key remapping in mapped types, and Template Literal Types. Both incredibly useful features to improve our typing. 4.1 is also more than a year old now. I think one year of support is enough and dropping < 4.1 would allow us to greatly reduce the boilerplate our typescript users have to go add. Blocks sequelize/sequelize#13782 and sequelize/sequelize#13909 |
Feel free to make a PR to drop testing on < 4.1 and add to the docs that we support 4.1 and above and then we'll see if people disagree. But I think a support window for TS versions for at least one year is fine and I would suggest doing a minor version bump whenever we lose support for older versions of TS |
I agree with the minor bumb. TypeScript itself doesn't follow semver due to the idea that any TypeScript change is a breaking change. I think we should do the same. |
As in, any TS version change could contain breaking changes? |
FWIW: I'm fine with any solution. |
Any version of TSC could include a breaking change because as they say it very well themselves, if they fix a bug, something that was not reported as an error in your codebase is now getting reported (microsoft/TypeScript#14116 (comment)) Similarly for us, if we fix our typings / make them stricter (which we've been doing a lot recently), errors that previously went unreported are now getting reported. I'll do a PR soon :) |
Regarding DataType migration:
@allawesome497 do you want to have help with the remaining 4 conversions? |
What would be the very next steps afterwards?
New tests should be written in TypeScript (.ts) |
Easier associations in TS --> sequelize/sequelize#14302 |
I've started migrating |
I've also started migrating the associations folder, as it's very often used by |
What's still missing right now?
|
data-type PR review was done yesterday. sequelize/model could be handled independently. |
Copying @ephys message from Slack here; To give an idea of where we are at: We have a PR open for the migration of DataTypes, which is an absolutely massive PR (and not close to being finished)
|
Update now the DataTypes PR has been merged;
We have also created parent classes for |
And to add to the message above; we haven't included various other files like |
Update on the TypeScript migration;
|
Update on the TypeScript migration;
|
I have just merged sequelize/sequelize#13569.
What are the next steps?
The text was updated successfully, but these errors were encountered: