Skip to content

V7: TypeScript Migration #12429

Closed
Closed

Description

@sushantdhiman

This has been requested from some time. I have also started using Typescript (or Flow) with my projects.

There are lots of inconsistencies with internal code base, I think this migration will benefit our code base. This migration should help us with documentation as well. We are currently using esdoc which is not maintained at all.

Blocking issues

Activity

  1. added
    type: refactor
    on Jun 26, 2020
  2. added this to the v7 milestone on Jun 26, 2020
  3. kf6kjg commented on Jul 3, 2020

    @kf6kjg
    Contributor

    Is the goal to revamp the interface from the ground up, a la sequelize-typescript, or simply to convert existing functionality more-or-less as-is to TS and leave major rebuilding for later?

    While I would love Sequelize to be re-engineered for many reasons, I think that would be a bridge too far as it would make being able to push a stable release move way out into the future.
    The pragmatic part of me says that a simple TS-conversion, and fixing the type bugs that said conversion will expose, is the better one: the result would result in a lot less breakage and easier uptake by the users.

  4. sushantdhiman commented on Jul 4, 2020

    @sushantdhiman
    ContributorAuthor

    @kf6kjg Yes plan is to keep breaking changes minimal and mainly achieve type safely in internal code-base.

  5. fnimick commented on Jul 8, 2020

    @fnimick

    @sushantdhiman question for you - as master is now in the midst of this migration, if we have open PRs with merge conflicts, should we rebase them against master or change the base branch to v6?

  6. sushantdhiman commented on Jul 9, 2020

    @sushantdhiman
    ContributorAuthor

    All new bug fixes and features should use master as base branch. After merging to master a duplicate PR can be opened for v6 branch, if release is required.

    Existing PRs should be based to v6 branch, but before that fix/feature can be merged in v6 a PR for master is required

  7. fnimick commented on Jul 9, 2020

    @fnimick

    @sushantdhiman thank you for the information, I will use master as a base branch for the rebase of my PR. My PR also modified types/lib/model.d.ts, specifically the BulkCreateOptions interface - I am unable to find where in current master the Typescript definitions of the model interfaces have been moved. Should I simply modify the model.js docstrings, or is there a type definition I can now modify as well?

  8. sshivananda commented on Jul 31, 2020

    @sshivananda

    @sushantdhiman - If there is some help required with the typescript migration - I can chip in as well. Were you planning on converting multiple files to typescript at once/ go through this for each file?
    I have seen projects where adding the typescript config (with allowJs set to true) and then modifying files one by one - goes faster - as folks can spread the activity around multiple small PRs and even work on them in parallel. In the meanwhile - existing PRs do not get blocked - and conflicts (if any) are relatively easily solved.

  9. ConAntonakos commented on Aug 5, 2020

    @ConAntonakos

    @kf6kjg I would love to see better TypeScript support or something similar to sequelize-typescript or typeorm. But I think by migrating to TypeScript internally opens the door for better support in the future. Do the maintainers agree with that approach?

  10. kf6kjg commented on Aug 6, 2020

    @kf6kjg
    Contributor

    From the response to my comment I suspect that that is the goal. As I am not a maintainer I cannot answer definitively. In general the future of open source project often depends on individuals actually getting up the gumption to PR a a change and ride the critiques until it's either merged or rejected - and be there to help move other PRs forward.

    I've not looked to see how far along @sushantdhiman is in this change, but from the bit of work and poking around I've done I suspect it's a much larger bite than anyone could have guessed: there's a LOT of code in here that's done in a very clever "javascript" manner that just doesn't look like it'll translate to quality TypeScript easily or quickly. No I don't have examples, it was just my passing observation.

  11. papb commented on Jan 18, 2021

    @papb
    Member

    Hello everyone!! Thank you all for the interest in helping. Sushant left the project for personal reasons, and we have decided to postpone the TypeScript migration for now, to focus on overall maintainance of issues and PRs. I will give an update when we decide to come back to it.

  12. unpinned this issue on Jan 18, 2021
  13. github-actions commented on Nov 2, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  14. ephys commented on Mar 24, 2022

    @ephys
    Member

    A bit of an update on this thread: We have been migrating the codebase to TypeScript. A lot has been done, and a lot more is underway.

    We've also migrated the API reference to TypeDoc on our new website.

    Finally, we have a series of RFC open with the goal of making TypeScript a first class citizen:

    I'll close this issue, it's since been replaced with sequelize/meetings#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: refactor

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions