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
Suggestion: Remove all aliases in v5 #9372
Comments
I have edited your post for better readability. Good idea overall, we need to deprecate duplicate cases first, then remove them from master. This change should be easy to implement in small PRs |
@sunshinewyin the ones Iisted where just examples, there are quite a few more. |
@sushantdhiman I'll see if I can do that. |
As requested by @sushantdhiman Final
QuestionShould we add deprecation message or just add the migration table in the changelog ? |
Thanks @frlinw , A few changes
I can take care of deprecating them from v4 once these changes land to master |
Yea sorry, been super busy, cudos to @frlinw for taking over. |
I started to work on it. I'm doing some reorg for imports (require) in test files because it's a mess, will make a PR after that. |
beforeConnection added to the list, it's not used internally and it's the last hook alias |
Implemented in #9933 |
Hey, what about all the
and more? |
They are ok for now |
One more, what about the |
|
Another alias I came across is Also at the same time that section should be optimized, accessing enums shouldn't invoke object creation, we should just Object.freeze and assign it directly :) |
With V5 aliases have been removed ; (see sequelize/sequelize#9372 )
with V5 aliases have been removed ; (see sequelize/sequelize#9372 )
with V5 aliases have been removed ; (see sequelize/sequelize#9372 )
* Chore: npm audit fix --force * Chore: add core-js@2 dependency babel/babel#9734 - in project error was : Cannot find module 'core-js/modules/es6.object.define-property' from 'index.js' * Test: test fix after sequelize update with V5 aliases have been removed ; (see sequelize/sequelize#9372 ) * Chore: updated yarn.lock
* Chore: npm audit fix --force * Chore: add core-js@2 dependency babel/babel#9734 - in project error was : Cannot find module 'core-js/modules/es6.object.define-property' from 'index.js' * Test: test fix after sequelize update with V5 aliases have been removed ; (see sequelize/sequelize#9372 ) * Chore: updated yarn.lock
Not sure if I'm too late here but over the years Sequelize has create many many aliases functions. I think it would be a good idea to remove the aliases with the next major release.
find
vs.findOne
findById
vs.findByPrimary
afterBulkDestroy
vsafterBulkDelete
addHook
v.hook
VIRTUAL
vsNONE
Edit: Formatting
The text was updated successfully, but these errors were encountered: