sequelize-paginate
sequelize-paginate copied to clipboard
chore(deps): update dependency sequelize to v6
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
sequelize (source) | 5.22.4 -> 6.23.1 |
Release Notes
sequelize/sequelize
v6.23.1
Bug Fixes
v6.23.0
Features
v6.22.1
Bug Fixes
v6.22.0
Features
v6.21.6
Bug Fixes
v6.21.5
Bug Fixes
v6.21.4
Bug Fixes
v6.21.3
Bug Fixes
v6.21.2
Bug Fixes
v6.21.1
Bug Fixes
v6.21.0
Features
v6.20.1
Bug Fixes
v6.20.0
Features
v6.19.2
Bug Fixes
v6.19.1
Bug Fixes
⚠️ BREAKING CHANGE: This change is a security fix that patches a serious SQL injection vulnerability, however it is possible that your application made use of it and broke as a result of this change. Please see this issue for more information.
v6.19.0
Bug Fixes
Features
v6.18.0
Features
v6.17.0
Bug Fixes
- fix typo in query-generator.js error message (#14151) (2d339d0)
- postgres: correctly re-acquire connection for pg-native (#14090) (82506a6)
- types: drop excess argument for upsert (#14156) (da8678d)
-
types: export
GroupedCountResultItem
interface (#14154) (a81b7ab) - types: update 'replication' option property (#14126) (7ac1221)
-
types: update return type of
Model.update
(#14155) (b80aeed)
Features
- types: infer nullable creation attributes as optional (#14147) (f5c06bd)
-
types: make
Model.getAttributes
stricter (#14017) (e974e20)
v6.16.3
Bug Fixes
v6.16.2
Bug Fixes
v6.16.1
Bug Fixes
v6.16.0
Features
v6.15.1
Bug Fixes
-
types: accept
$nested.syntax$
in WhereAttributeHash (#13983) (4a513cf) -
types: correct typing definitions for
Sequelize.where
(#14018) (99c612b) - types: improve branded types (#13990) (a578ea0)
v6.15.0
Bug Fixes
Features
v6.14.1
Bug Fixes
v6.14.0
Bug Fixes
- don't call overloaded versions of find functions internally (#13951) (fc53cdb)
- don't call overloaded versions of find functions internally (#13951) (b253d8e)
-
model.d: fix type for
count
andfindAndCountAll
(#13786) (b06c1fc) - types: add hooks to InstanceDestroyOptions type (#13491) (dbd9ea8)
- types: add missing fields to FindOr{Create,Build}Options (#13389) (ef63f8f)
- types: fix QueryInterface#bulkInsert attribute arg type (#13945) (9e108e3)
Features
-
types: add
InferAttributes
utility type (#13909) (fd42687) - types: add typings for DataTypes.TSVECTOR (#13940) (b8f0463)
- types: drop TypeScript < 4.1 (#13954) (dd49044)
v6.13.0
Bug Fixes
Features
- mariadb: add mariadb support in Sequelize.set function (#13926) (02bda05), closes #13920
- postgres: drop indices concurrently in Postgres (#13903) (37f20a6)
v6.12.5
Bug Fixes
- dialect: sequelize pool doesn't take effect in dialect "mssql" (#13880) (fc155b6)
- model: fix count with grouping typing (#13884) (49beb29), closes #13871
- types: improve ModelCtor / ModelStatic typing (#13890) (34aa808)
- types: omit FK and scope keys in HasManyCreateAssociationMixin (#13892) (b315ce8)
v6.12.4
Bug Fixes
v6.12.3
Bug Fixes
v6.12.2
Bug Fixes
- abstract: patch jsonb operator for pg if value is json (#13780) (a2375c5)
- operators: fix ts support for operators.ts (#13805) (b532ab1)
- postgres: allows usage of schema for ARRAY(ENUM) type name (#13807) (da5b0ce)
- query-interface: bring back quoteIdentifier(s) to queryInterface (#13810) (001dc60)
v6.12.1
Bug Fixes
- allow deep imports (#13795) (1ecdaf9)
- fix invalid ts import style of lib/operators (#13797) (8acc14f)
v6.12.0
Bug Fixes
- data-types: unnecessary warning when getting data with DATE dataTypes (#13712) (121884b)
- docs: add aws-lamda route (#13693) (3059bce)
- example: fix coordinates format as per GeoJson (#13718) (f9dec20)
- increment: fix key value broken query (#12985) (fc0b19e)
- model.d: fix findAndCountAll.count type (#13736) (b7b472e)
- snowflake: fix to prevent disconnect attempt on already disconnected connection (#13775) (2a9a551)
- types: add Col to where Ops (#13717) (2d7b865)
- types: add instance member declaration (#13684) (ae3cde5)
- types: add missing schema field to sequelize options (c7a0839), closes #12606
- types: allow override json function with custom return type (#13694) (2c3b384)
- upsert: fall back to DO NOTHING if no update key values provided (#13594) (4071378)
- upsert: fall back to DO NOTHING if no update key values provided (#13711) (f9dfaa7), closes #13594
- wrong interface used within mixin (#13685) (bd3ddf5)
Features
- dialects: add experimental support for db2 (#13374) (4443d2a)
- dialect: snowflake dialect support (#13406) (ad68a5e)
- model: complete getAttributes feature (b6510df)
- typescript: create alpha release with ts (911125e)
- types: transition lib/errors (#13710) (8cdce6a)
- upsert: add conflictFields option (#13723) (496bede)
v6.11.0
Features
v6.10.0
Bug Fixes
- typing on creation within an association (#13678) (0312f8e)
- logger: change logging depth from 3 to 1 (#12879) (ddddc24)
- mariadb: fix MariaDB 10.5 JSON (#13633) (cdd61dd)
- model: clone options object instead of modifying (#13589) (3be43de)
- mssql: fix sub query issue occurring with renamed primary key fields (#12801) (73d99ab)
- mssql: sqlserver 2008 fix for using offsets and include criteria (47c4494)
- query: make stacktraces include original calling code (#13347) (f581543)
- types: Add missing type definitions in models (#13553) (73ecf6c)
- types: add specifc tojson type in model.d.ts (#13661) (5924be5)
- types: DataType.TEXT overloading definition (#13654) (1690801)
- types: include 'paranoid' in IncludeThroughOptions definition (#13625) (b1fb1f3)
- types: ne op documentation (#13666) (98485df)
- types: rename types and update CONTRIBUTING docs (#13348) (1f23924)
- expect result is null but got zero (#13637) (da3ac09)
Features
- definitions: Adds AbstractQuery and before/afterQuery hook definitions (#13635) (37a5858)
- postgresql: easier SSL config and options param support (#13673) (9591573)
v6.9.0
Bug Fixes
- docs: using incorrect esdocs syntax (#13615) (c3c690b)
- sqlite: quote table names in sqlite getForeignKeysQuery (#13587) (eeb6a8f)
- upsert: do not overwrite an explcit created_at during upsert (#13593) (594cee8)
Features
v6.8.0
Bug Fixes
-
types: allow any values in
isIn
validator (#12962) (d511d91) - allows insert primary key with zero (#13458) (e4aff2f)
- model: Convert number values only if they aren't null to avoid NaN (199b632)
- model.d: accept [Op.is] in where (broken in TypeScript 4.4) (#13499) (d685a9a)
-
postgres: fix
findCreateFind
to work with postgres transactions (#13482) (84421d7) -
select: do not force set
subQuery
tofalse
(#13490) (0943339) - sqlite: fix wrongly overwriting storage if empty string (#13376) (c3e608b), closes #13375
- types: add missing upsert hooks (#13394) (5e9c209)
- types: extend BulkCreateOptions by SearchPathable (#13469) (47c2d05), closes #13454
- types: typo in model.d.ts (#13574) (31d0fbc)
Features
-
postgres: support
query_timeout
dialect option (#13258) (3ca085d) - typings: add UnknownConstraintError (#13461) (69d899e)
v6.7.0
Bug Fixes
- deps: upgrade to secure versions of dev deps (#13549) (cf53734)
- docs: fix typo in documentation for polymorphic associations (#13405) (bbf3d76)
- types: allow rangable to take a string tuple (#13486) (ca2a11a)
Features
- test: add test for nested column in where query (#13478) (26b62c7), closes #13288
- types: make config type deeply writeable for before connect hook (#13424) (f078f77)
v6.6.5
Bug Fixes
v6.6.4
Bug Fixes
-
typings: make
Transactionable
compatible withTransactionOptions
(#13334) (cd2de40) - utils: clone attributes before mutating them (#13226) (1a16b91)
-
data-types: use proper field name for
ARRAY(ENUM)
(#13210) (1cfbd33) -
typings: fix
ignoreDuplicates
option (#13220) (b33d78e) -
typings: allow
schema
for queryInterface methods (#13223) (6b0b532) - typings: restrict update typings (#13216) (63ceb73)
-
typings:
returning
can specify column names (#13215) (143cc84) - typings: model init returns model class, not instance (#13214) (8f2a0d5)
- plurals: bump inflection dependency (#13260) (deeb5c6)
-
bulk-create:
ON CONFLICT
with unique index (#13345) (6dcb565)
v6.6.2
Bug Fixes
v6.6.1
Bug Fixes
-
query-generator: use
AND
in sql fornot
/between
(#13043) (a663c54) - sqlite: retrieve primary key on upsert (#12991) (023e1d9)
-
types: allow
(keyof TAttributes)[]
inUpdateOptions.returning
(#13130) (97ba242) - types: models with attributes couldn't be used in some cases (#13010) (de5f21d)
-
types: remove
string
fromOrder
type (#13057) (ac39f8a)
v6.6.0
Bug Fixes
-
types: allow
sequelize.col
inattributes
(#13105) (3fd64cb) -
types: allow bigints in
WhereValue
(#13028) (8892507) -
types: decapitalize
queryGenerator
property (#13126) (9cb4d7f) -
types: fix
Model#previous
type (#13106) (466e361) -
types: fix
ValidationErrorItem
types (#13108) (e35a9bf)
Features
v6.5.1
Bug Fixes
-
mysql: release connection on deadlocks (#13102) (6388507)
- Note: this complements the work done in 6.5.0, fixing another situation not covered by it with MySQL.
-
types: allow transaction to be
null
(#13093) (ced4dc7)
v6.5.0
Second release in 2021! :tada:
Bug Fixes
- mysql, mariadb: release connection on deadlocks (#12841) (c77b1f3)
- types: allow changing values on before hooks (#12970) (e5b8929)
- types: typo in sequelize.js and sequelize.d.ts (#12975) (2fe980e)
Features
v6.4.0
Bug Fixes
- types: better support for readonly arrays (287607a)
- types: remove part forgotten in #12175 (2249ded)
Features
v6.3.5
Bug Fixes
v6.3.4
Bug Fixes
v6.3.3
Bug Fixes
v6.3.2
Bug Fixes
v6.3.1
Bug Fixes
v6.3.0
Bug Fixes
Features
v6.2.4
Bug Fixes
v6.2.3
Bug Fixes
v6.2.2
Bug Fixes
v6.2.1
Bug Fixes
v6.2.0
Bug Fixes
Features
v6.1.1
Bug Fixes
v6.1.0
Sequelize v6 is the next major release after v5. Below is a list of breaking changes to help you upgrade.
Breaking Changes
Support for Node 10 and up
Sequelize v6 will only support Node 10 and up #10821.
CLS
You should now use cls-hooked package for CLS support.
const cls = require('cls-hooked');
const namespace = cls.createNamespace('....');
const Sequelize = require('sequelize');
Sequelize.useCLS(namespace);
Database Engine Support
We have updated our minimum supported database engine versions. Using older database engine will show SEQUELIZE0006
deprecation warning. Please check ENGINE.md for version table.
Sequelize
- Bluebird has been removed. Internally all methods are now using async/await. Public API now returns native promises. Thanks to Andy Edwards for this refactor work.
-
Sequelize.Promise
is no longer available. -
sequelize.import
method has been removed.
Model
options.returning
Option returning: true
will no longer return attributes that are not defined in the model. Old behavior can be achieved by using returning: ['*']
instead.
Model.changed()
This method now tests for equality with _.isEqual
and is now deep aware for JSON objects. Modifying a nested value for a JSON object won't mark it as changed (since it is still the same object).
const instance = await MyModel.findOne();
instance.myJsonField.someProperty = 12345; // Changed from something else to 12345
console.log(instance.changed()); // false
await instance.save(); // this will not save anything
instance.changed('myJsonField', true);
console.log(instance.changed()); // ['myJsonField']
await instance.save(); // will save
Model.bulkCreate()
This method now throws Sequelize.AggregateError
instead of Bluebird.AggregateError
. All errors are now exposed as errors
key.
Model.upsert()
Native upsert is now supported for all dialects.
const [instance, created] = await MyModel.upsert({});
Signature for this method has been changed to Promise<Model,boolean | null>
. First index contains upserted instance
, second index contains a boolean (or null
) indicating if record was created or updated. For SQLite/Postgres, created
value will always be null
.
- MySQL - Implemented with ON DUPLICATE KEY UPDATE
- PostgreSQL - Implemented with ON CONFLICT DO UPDATE
- SQLite - Implemented with ON CONFLICT DO UPDATE
- MSSQL - Implemented with MERGE statement
Note for Postgres users: If upsert payload contains PK field, then PK will be used as the conflict target. Otherwise first unique constraint will be selected as the conflict key.
QueryInterface
addConstraint
This method now only takes 2 parameters, tableName
and options
. Previously the second parameter could be a list of column names to apply the constraint to, this list must now be passed as options.fields
property.
Changelog
6.0.0-beta.7
- docs(associations): belongs to many create with through table
- docs(query-interface): fix broken links #12272
- docs(sequelize): omitNull only works for CREATE/UPDATE queries
- docs: asyncify #12297
- docs: responsive #12308
- docs: update feature request template
- feat(postgres): native upsert #12301
- feat(sequelize): allow passing dialectOptions.options from url #12404
- fix(include): check if attributes specified for included through model #12316
- fix(model.destroy): return 0 with truncate #12281
- fix(mssql): empty order array generates invalid FETCH statement #12261
- fix(postgres): parse enums correctly when describing a table #12409
- fix(query): ensure correct return signature for QueryTypes.RAW #12305
- fix(query): preserve cls context for logger #12328
- fix(query-generator): do not generate GROUP BY clause if options.group is empty #12343
- fix(reload): include default scope #12399
- fix(types): add Association into OrderItem type #12332
- fix(types): add clientMinMessages to Options interface #12375
- fix(types): transactionType in Options #12377
- fix(types): add support for optional values in "where" clauses #12337
- fix(types): add missing fields to 'FindOrCreateType' #12338
- fix: add missing sql and parameters properties to some query errors #12299
- fix: remove custom inspect #12262
- refactor: cleanup query generators #12304
6.0.0-beta.6
- docs(add-constraint): options.fields support
- docs(association): document uniqueKey for belongs to many #12166
- docs(association): options.through.where support
- docs(association): use and instead of 'a nd' #12191
- docs(association): use correct scope name #12204
- docs(manuals): avoid duplicate header ids #12201
- docs(model): correct syntax error in example code #12137
- docs(query-interface): removeIndex indexNameOrAttributes #11947
- docs(resources): add sequelize-guard library #12235
- docs(typescript): fix confusing comments #12226
- docs(v6-guide): bluebird removal API changes
- docs: database version support info #12168
- docs: remove remaining bluebird references #12167
- feat(belongs-to-many): allow creation of paranoid join tables #12088
- feat(belongs-to-many): get/has/count for paranoid join table #12256
- feat(pool): expose maxUses pool config option #12101
- feat(postgres): minify include aliases over limi
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
Chore
- deps: update dependency sequelize to v6 (8f5cc78)
Contributors
Commit-Lint commands
You can trigger Commit-Lint actions by commenting on this PR:
-
@Commit-Lint merge patch
will merge dependabot PR on "patch" versions (X.X.Y - Y change) -
@Commit-Lint merge minor
will merge dependabot PR on "minor" versions (X.Y.Y - Y change) -
@Commit-Lint merge major
will merge dependabot PR on "major" versions (Y.Y.Y - Y change) -
@Commit-Lint merge disable
will desactivate merge dependabot PR -
@Commit-Lint review
will approve dependabot PR -
@Commit-Lint stop review
will stop approve dependabot PR