hauru / sequelize-to-json

Serialization of Sequelize models into JSON-compatible objects
21 stars 13 forks source link

Not working with Sequelize v5.1.0 #9

Closed doublesharp closed 4 years ago

doublesharp commented 5 years ago

The Model seems to have changed in Sequelize 5 is being detected as invalid.

Error: class extends Model {} is not a valid Sequelize model
     at new Serializer (/node_modules/sequelize-to-json/index.js:124:13)
     at Function.serializeMany (/node_modules/sequelize-to-json/index.js:352:22)
ablankenship10 commented 4 years ago

Are there any plans to maintain this package for version 6 and beyond?

hauru commented 4 years ago

@ablankenship10 Hey. I don't think i'll be able to actively maintain this package so that each new Sequelize release is supported. Probably will update it when i need it in my own work (or someone submits a PR).

doublesharp commented 4 years ago

@ablankenship10 @hauru I ended up forking this module to make a version that is currently working with Sequelize 6.3, however I also did some refactoring to replace some of the blocking code with non-blocking versions using the async module, meaning that some of the changes may be breaking as they return a Promise now. It's also been reformatted using the eslint:recommended style guide. If you would like me to share it let me know!