Skip to content
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

chore(deps): update devdependencies (major) #357

Merged
merged 3 commits into from Nov 18, 2020

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 15, 2020

This PR contains the following updates:

Package Type Update Change
eslint-plugin-unicorn devDependencies major 22.0.0 -> 23.0.0
np devDependencies major 6.5.0 -> 7.0.0
sequelize (source) devDependencies major 5.21.6 -> 6.3.5

Release Notes

sindresorhus/eslint-plugin-unicorn

v23.0.0

Compare Source

New rules
Improvements
  • explicit-length-check: Use 'non-zero': 'greater-than' by default (#​850) 7c5df5f
  • prevent-abbreviations: Add fn/func -> function, i/idx/j -> index replacements (#​836) e502f42
  • consistent-function-scoping: Check anonymous functions (#​835) 29ecbf6
  • no-console-spaces: Make space position more specific (#​838) e17a63f
  • no-nested-ternary: Improve report location & message (#​844) ca1afa6
  • Track JSX presence per-function, fixing some false negatives (#​830) 85d424c
Fixes
  • prefer-flat-map: Exclude .flat() where depth is not 1 (#​859) 61d9851
sindresorhus/np

v7.0.0

Compare Source

Breaking
  • Prefer local install (#​572) 0cff2b4
    If you run the global np command, it will now defer to the local np if any. This is important when you use config and other things which might change across np versions. This is unlikely to be a breaking change for most people, but it's a major version to me safe.
Improvements
  • Show files added since the last release and not part of the package (#​456) 08a2c06
Fixes
sequelize/sequelize

v6.3.5

Compare Source

Bug Fixes
  • truncate: fix missing await in truncate all models with cascade (#​12664) (933b3f6)

v6.3.4

Compare Source

Bug Fixes

v6.3.3

Compare Source

Bug Fixes

v6.3.2

Compare Source

Bug Fixes

v6.3.1

Compare Source

Bug Fixes

v6.3.0

Compare Source

Bug Fixes
Features

v6.2.4

Compare Source

Bug Fixes

v6.2.3

Compare Source

Bug Fixes
  • sqlite: describeTable now returns unique constraint and references (#​12420) (2de3377)

v6.2.2

Compare Source

Bug Fixes
  • types: fixed types for model.init and sequelize.define; update docs (#​12435) (9c446f9)

v6.2.1

Compare Source

Bug Fixes
  • mssql: insert/upsert operations do not return all fields (#​12433) (aeb318a)

v6.2.0

Compare Source

Bug Fixes
Features
  • types: added optional stricter typing for Model attributes (#​12405) (871157b)

v6.1.1

Compare Source

Bug Fixes

v6.1.0

Compare Source

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 limit #​11940
  • feat(sequelize): handle query string host value #​12041
  • fix(associations): ensure correct schema on all generated attributes #​12258
  • fix(docs/instances): use correct variable for increment #​12087
  • fix(include): separate queries are not sub-queries #​12144
  • fix(model): fix unchained promise in association logic in bulkCreate #​12163
  • fix(model): updateOnDuplicate handles composite keys #​11984
  • fix(model.count): distinct without any column generates invalid SQL #​11946
  • fix(model.reload): ignore options.where and always use this.where() #​12211
  • fix(mssql) insert record failure because of BOOLEAN column type #​12090
  • fix(mssql): cast sql_variant in query generator #​11994
  • fix(mssql): dont use OUTPUT INSERTED for update without returning #​12260
  • fix(mssql): duplicate order in FETCH/NEXT queries #​12257
  • fix(mssql): set correct scale for float #​11962
  • fix(mssql): tedious v9 requires connect call #​12182
  • fix(mssql): use uppercase for engine table and columns #​12212
  • fix(pool): show deprecation when engine is not supported #​12218
  • fix(postgres): addColumn support ARRAY(ENUM) #​12259
  • fix(query): do not bind $ used within a whole-word #​12250
  • fix(query-generator): handle literal for substring based operators #​12210
  • fix(query-interface): allow passing null for query interface insert #​11931
  • fix(query-interface): allow sequelize.fn and sequelize.literal in fields of IndexesOptions #​12224
  • fix(scope): don't modify original scope definition #​12207
  • fix(sqlite): multiple primary keys results in syntax error #​12237
  • fix(sync): pass options to all query methods #​12208
  • fix(typings): add type_helpers to file list #​12000
  • fix(typings): correct Model.init return type #​12148
  • fix(typings): fn is assignable to where #​12040
  • fix(typings): getForeignKeysForTables argument definition #​12084
  • fix(typings): make between operator accept date ranges #​12162
  • refactor(ci): improve database wait script #​12132
  • refactor(tsd-test-setup): add & setup dtslint #​11879
  • refactor: move all dialect conditional logic into subclass #​12217
  • refactor: remove sequelize.import helper #​12175
  • refactor: use native versions #​12159
  • refactor: use object spread instead of Object.assign #​12213
6.0.0-beta.5
  • fix(find-all): throw on empty attributes #​11867
  • fix(types): queryInterface.addIndex #​11844
  • fix(types): plain option in sequelize.query #​11596
  • fix(types): correct overloaded method order #​11727
  • fix(types): comparator arg of Sequelize.where #​11843
  • fix(types): fix BelongsToManyGetAssociationsMixinOptions #​11818
  • fix(types): adds hooks to CreateOptions #​11736
  • fix(increment): broken queries #​11852
  • fix(associations): gets on many-to-many with non-primary target key #​11778
  • fix: properly select SRID if present #​11763
  • feat(sqlite): automatic path provision for options.storage #​11853
  • feat(postgres): idle_in_transaction_session_timeout connection option #​11775
  • feat(index): improve to support multiple fields with operator #​11934
  • docs(transactions): fix addIndex example and grammar #​11759
  • docs(raw-queries): remove outdated info #​11833
  • docs(optimistic-locking): fix missing manual #​11850
  • docs(model): findOne return value for empty result #​11762
  • docs(model-querying-basics.md): add some commas #​11891
  • docs(manuals): fix missing models-definition page #​11838
  • docs(manuals): extensive rewrite #​11825
  • docs(dialect-specific): add MSSQL domain auth example #​11799
  • docs(associations): fix typos in assocs manual #​11888
  • docs(associations): fix typo #​11869
6.0.0-beta.4
  • feat(sync): allow to bypass drop statements when sync with alter enabled #​11708
  • fix(model): injectDependentVirtualAttrs on included models #​11713
  • fix(model): generate ON CONFLICT ... DO UPDATE correctly #​11666
  • fix(mssql): optimize formatError RegEx #​11725
  • fix(types): add getForeignKeyReferencesForTable type #​11738
  • fix(types): add 'restore' hooks to types #​11730
  • fix(types): added 'fieldMaps' to QueryOptions typings #​11702
  • fix(types): add isSoftDeleted to Model #​11628
  • fix(types): fix upsert typing #​11674
  • fix(types): specified 'this' for getters and setters in fields #​11648
  • fix(types): add paranoid to UpdateOptions interface #​11647
  • fix(types): include 'as' in IncludeThroughOptions definition #​11624
  • fix(types): add Includeable to IncludeOptions.include type #​11622
  • fix(types): transaction lock #​11620
  • fix(sequelize.fn): escape dollarsign (#​11533) #​11606
  • fix(types): add nested to Includeable #​11354
  • fix(types): add date to where #​11612
  • fix(types): add getDatabaseName (#​11431) #​11614
  • fix(types): beforeDestroy #​11618
  • fix(types): query-interface table schema #​11582
  • docs: README.md #​11698
  • docs(sequelize): detail options.retry usage #​11643
  • docs: clarify logging option in Sequelize constructor #​11653
  • docs(migrations): fix syntax error in example #​11626
  • docs: describe logging option #​11654
  • docs(transaction): fix typo #​11659
  • docs(hooks): add info about belongs-to-many #​11601
  • docs(associations): fix typo #​11592
6.0.0-beta.3
6.0.0-beta.2
  • feat(postgres): change returning option to only return model attributes #​11526
  • fix(associations): allow binary key for belongs-to-many #​11578
  • fix(postgres): always replace returning statement for upsertQuery
  • fix(model): make .changed() deep aware #​10851
  • change: use node 10 #​11580

v5.22.3

Compare Source

Bug Fixes

v5.22.2

Compare Source

Bug Fixes
  • mssql: insert/upsert operations do not return all fields (#​12434) (56d07c6)

v5.22.1

Compare Source

Bug Fixes

v5.22.0

Compare Source

Bug Fixes
Features
  • sequelize: allow passing dialectOptions.options from url (#​12412) (2391d08)

v5.21.13

Compare Source

Bug Fixes
  • types: specified 'this' for getters and setters in fields (#​12370) (7fba668)

v5.21.12

Compare Source

Bug Fixes

v5.21.11

Compare Source

Bug Fixes
  • include: check if attributes specified for included through model (#​12020) (5c733ef)

v5.21.10

Compare Source

Bug Fixes

v5.21.9

Compare Source

Bug Fixes

v5.21.8

Compare Source

Bug Fixes

v5.21.7

Compare Source

Bug Fixes

Renovate configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled due to failing status checks.

♻️ Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@mmkal
Copy link
Contributor

mmkal commented Oct 15, 2020

@papb the error here is the lint rule we have reminding us to do some cleanup before switching to sequelize v6.

I'm not a sequelize user (outside of maintaing this repo!) - but it occurs to me that we should make sequelize an optional peerDependency (using the new-to-npm, old-to-yarn peerDependenciesMeta field: npm/cli#224). That way we can be specific about which sequelize versions we support. Do we want to drop support for v5? v4?

Either way, I'm not sure upgrading sequelize is something we can entrust to a bot, so I'm going to leave this red for now, but maybe we can close this and start a Discussions thread about sequelize.

@renovate renovate bot force-pushed the renovate/major-devdependencies branch from 08bd4af to 544a458 Compare October 16, 2020 22:02
@renovate renovate bot changed the title chore(deps): update dependency sequelize to v6 chore(deps): update devdependencies (major) Oct 16, 2020
@papb
Copy link
Member

papb commented Oct 22, 2020

Hello, we can drop support for Sequelize v4 and earlier, but let's still support Sequelize v5. Setting it as an optional peer dependency is a great idea.

@renovate renovate bot force-pushed the renovate/major-devdependencies branch 4 times, most recently from a46eb07 to c595acd Compare October 31, 2020 00:52
@renovate renovate bot force-pushed the renovate/major-devdependencies branch from c595acd to b189e0b Compare November 2, 2020 16:48
@mmkal
Copy link
Contributor

mmkal commented Nov 18, 2020

@papb coming back to this after a bit... are you sure we need to support v5? Given this is a "platform-agnotic" migration tool I'm not sure how long it makes sense to support old versions of separate tools. People stuck on old sequelize could always use old umzug too.

(edit: I separated out sequelize from this update to unblock renovate, but thought it was worth bringing up anyway)

@mmkal mmkal merged commit 2602ad9 into master Nov 18, 2020
@mmkal mmkal deleted the renovate/major-devdependencies branch November 18, 2020 17:53
@papb
Copy link
Member

papb commented Dec 3, 2020

@mmkal I think we should, at least for a little longer, yes... I think we can update it to v6 in package.json but have a separate github action that runs npm i sequelize@^5 before the test, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants