Skip to content

Sequelize and ES6 Classes - Roadmap? #3840

Closed

Description

@trevoro

Hey there,

With ES6 a lot of new features are coming down the pipe, and one of them is classes.
Has anyone given any thought to using ES6 features in sequelize yet?

Thanks!

Activity

  1. BridgeAR commented on May 31, 2015

    @BridgeAR
    Contributor

    Sequelize should also work in old nodejs versions. So this is not really an option. Besides that: What would be the benefit for you?

  2. janmeier commented on May 31, 2015

    @janmeier
    Member

    ES6 is not coming to sequelize anytime soon (and propably not anytime late either ;) )

    As @BridgeAR mentions, we need to support older node versions as well. Object initializers would be cool, but personally I don't see much gain from classes either

    (you are welcome to provide further points for discussion, but I'll close this issue since the github tracker is meant for feature requests and bugs)

  3. mickhansen commented on Jun 1, 2015

    @mickhansen
    Contributor

    I've actually been given a lot of though to using babel-node internally so we can use ES6 features in the project but still support 0.10. However that wouldn't really enable you to use ES6 classes.

    I see a lot to gain by using ES6 classes though, generally better semantics rather than trying to roll your own like we do currently with sequelize.define()

  4. trevoro commented on Jun 1, 2015

    @trevoro
    Author

    That's what I was thinking too. We're backing into a world where these things will be 1st class citizens, and I was wondering how to get "from here there". I use babel-node in all of my projects for this particular reason and that's why I was wondering about sequelize.

    I'll take a few stabs at implementing something and see what happens. If you have any implementation ideas I'm all ears. ;)

  5. xpepermint commented on Jul 13, 2015

    @xpepermint

    +1 for babel (cli also)

  6. SpainTrain commented on Jul 14, 2015

    @SpainTrain

    👍

    @BridgeAR @janmeier For an example of a project that supports ES5 and ES6 syntax for creating derived classes - https://facebook.github.io/react/docs/reusable-components.html

    Admittedly React is an extreme case due to jsx, but interop is feasible even in smaller and simpler projects e.g., https://github.com/home-buddy/rest-buddy

    I would love to see ES6 interop on the sequelize roadmap.

    @trevoro Did you make any progress on your attempt? I am about to create a wrapper for one of my projects, but wanted to see what folks may have already done that I could use. Thanks!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions