Closed trashhalo closed 7 years ago
Hi
I used too a shrinkwrap file (which is exposed) to freeze my dependencies, because this is a good practice to avoid as much as possible the wildcard version token (to avoid side effects)
I could update my sequelize version, but that means I have to check first if I don't find a side effect.
And maybe offers an option to specify the current sequelize object instead.
Regards
Or maybe declare instead the sequelize as devDependency: since "peerDependencies" is not anymore available since NPM 3.X, it seems now the right
Here an example of a famous gulp plugin which declare into the devDependencies the gulp version. So it let you to have the expected gulp version: https://github.com/hparra/gulp-rename/blob/master/package.json
Regards
And maybe offers an option to specify the current sequelize object instead.
This makes sense too. Or update the readme to say if you aren't using my exact version of sequelize this library won't work.
Squelize's query generator uses several instanceof checks. Because you are specificfying a specific version of sequelize anyone depending on your library that isnt using that exact version of sequelize is getting broken sql for joins.
This is due to the fact npm will give your library a different sequelize and so when the query builder asks if the association is an instanceof BelongsTo it gets back false becauses its a different BelongsTo.
I recommend adding a ^ to the front of the version specifier so anyone using a 3.X.X will not have this problem.