不要怂,就是干,撸起袖子干!

Commit d064073b by Sushant Committed by GitHub

build: update dependencies (#11487)

1 parent edf997fa
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
"space-before-function-paren": ["error", "never"], "space-before-function-paren": ["error", "never"],
"space-before-blocks": "error", "space-before-blocks": "error",
"space-infix-ops": "error", "space-infix-ops": "error",
"no-multi-spaces": "error",
"arrow-parens": ["error", "as-needed"], "arrow-parens": ["error", "as-needed"],
"comma-style": ["error", "last"], "comma-style": ["error", "last"],
"indent": [ "indent": [
......
...@@ -145,7 +145,7 @@ class BelongsToMany extends Association { ...@@ -145,7 +145,7 @@ class BelongsToMany extends Association {
this.through.model = this.sequelize.define(this.through.model, {}, Object.assign(this.options, { this.through.model = this.sequelize.define(this.through.model, {}, Object.assign(this.options, {
tableName: this.through.model, tableName: this.through.model,
indexes: [], //we don't want indexes here (as referenced in #2416) indexes: [], //we don't want indexes here (as referenced in #2416)
paranoid: false, // A paranoid join table does not make sense paranoid: false, // A paranoid join table does not make sense
validate: {} // Don't propagate model-level validations validate: {} // Don't propagate model-level validations
})); }));
} else { } else {
......
...@@ -112,7 +112,7 @@ class QueryGenerator { ...@@ -112,7 +112,7 @@ class QueryGenerator {
let emptyQuery = ''; let emptyQuery = '';
let outputFragment = ''; let outputFragment = '';
let identityWrapperRequired = false; let identityWrapperRequired = false;
let tmpTable = ''; //tmpTable declaration for trigger let tmpTable = ''; //tmpTable declaration for trigger
if (modelAttributes) { if (modelAttributes) {
_.each(modelAttributes, (attribute, key) => { _.each(modelAttributes, (attribute, key) => {
...@@ -347,8 +347,8 @@ class QueryGenerator { ...@@ -347,8 +347,8 @@ class QueryGenerator {
const bind = []; const bind = [];
const modelAttributeMap = {}; const modelAttributeMap = {};
let outputFragment = ''; let outputFragment = '';
let tmpTable = ''; // tmpTable declaration for trigger let tmpTable = ''; // tmpTable declaration for trigger
let selectFromTmp = ''; // Select statement for trigger let selectFromTmp = ''; // Select statement for trigger
let suffix = ''; let suffix = '';
if (_.get(this, ['sequelize', 'options', 'dialectOptions', 'prependSearchPath']) || options.searchPath) { if (_.get(this, ['sequelize', 'options', 'dialectOptions', 'prependSearchPath']) || options.searchPath) {
...@@ -1330,7 +1330,7 @@ class QueryGenerator { ...@@ -1330,7 +1330,7 @@ class QueryGenerator {
// Add GROUP BY to sub or main query // Add GROUP BY to sub or main query
if (options.group) { if (options.group) {
options.group = Array.isArray(options.group) ? options.group.map(t => this.aliasGrouping(t, model, mainTable.as, options)).join(', ') : this.aliasGrouping(options.group, model, mainTable.as, options); options.group = Array.isArray(options.group) ? options.group.map(t => this.aliasGrouping(t, model, mainTable.as, options)).join(', ') : this.aliasGrouping(options.group, model, mainTable.as, options);
if (subQuery) { if (subQuery) {
subQueryItems.push(` GROUP BY ${options.group}`); subQueryItems.push(` GROUP BY ${options.group}`);
......
...@@ -20,8 +20,8 @@ class MariaDBQueryGenerator extends MySQLQueryGenerator { ...@@ -20,8 +20,8 @@ class MariaDBQueryGenerator extends MySQLQueryGenerator {
} }
showSchemasQuery(options) { showSchemasQuery(options) {
const skip = options.skip && Array.isArray(options.skip) && options.skip.length > 0 ? options.skip : null; const skip = options.skip && Array.isArray(options.skip) && options.skip.length > 0 ? options.skip : null;
return `SELECT SCHEMA_NAME as schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('MYSQL', 'INFORMATION_SCHEMA', 'PERFORMANCE_SCHEMA'${skip ? skip.reduce( (sql, schemaName) => sql += `,${this.escape(schemaName)}`, '') : ''});`; return `SELECT SCHEMA_NAME as schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('MYSQL', 'INFORMATION_SCHEMA', 'PERFORMANCE_SCHEMA'${skip ? skip.reduce( (sql, schemaName) => sql += `,${this.escape(schemaName)}`, '') : ''});`;
} }
showTablesQuery() { showTablesQuery() {
......
...@@ -557,7 +557,7 @@ class MSSQLQueryGenerator extends AbstractQueryGenerator { ...@@ -557,7 +557,7 @@ class MSSQLQueryGenerator extends AbstractQueryGenerator {
template = attribute.type.toSql(); template = attribute.type.toSql();
template += ` CHECK (${this.quoteIdentifier(attribute.field)} IN(${attribute.values.map(value => { template += ` CHECK (${this.quoteIdentifier(attribute.field)} IN(${attribute.values.map(value => {
return this.escape(value); return this.escape(value);
}).join(', ') }))`; }).join(', ') }))`;
return template; return template;
} }
template = attribute.type.toString(); template = attribute.type.toString();
......
...@@ -226,7 +226,7 @@ class Query extends AbstractQuery { ...@@ -226,7 +226,7 @@ class Query extends AbstractQuery {
case 1451: case 1451:
case 1452: { case 1452: {
// e.g. CONSTRAINT `example_constraint_name` FOREIGN KEY (`example_id`) REFERENCES `examples` (`id`) // e.g. CONSTRAINT `example_constraint_name` FOREIGN KEY (`example_id`) REFERENCES `examples` (`id`)
const match = err.message.match(/CONSTRAINT ([`"])(.*)\1 FOREIGN KEY \(\1(.*)\1\) REFERENCES \1(.*)\1 \(\1(.*)\1\)/); const match = err.message.match(/CONSTRAINT ([`"])(.*)\1 FOREIGN KEY \(\1(.*)\1\) REFERENCES \1(.*)\1 \(\1(.*)\1\)/);
const quoteChar = match ? match[1] : '`'; const quoteChar = match ? match[1] : '`';
const fields = match ? match[3].split(new RegExp(`${quoteChar}, *${quoteChar}`)) : undefined; const fields = match ? match[3].split(new RegExp(`${quoteChar}, *${quoteChar}`)) : undefined;
......
...@@ -480,7 +480,7 @@ module.exports = BaseTypes => { ...@@ -480,7 +480,7 @@ module.exports = BaseTypes => {
castKey = `${Utils.addTicks( castKey = `${Utils.addTicks(
Utils.generateEnumName(options.field.Model.getTableName(), options.field.fieldName), Utils.generateEnumName(options.field.Model.getTableName(), options.field.fieldName),
'"' '"'
) }[]`; ) }[]`;
} }
str += `::${castKey}`; str += `::${castKey}`;
......
...@@ -131,7 +131,7 @@ class ValidationErrorItem { ...@@ -131,7 +131,7 @@ class ValidationErrorItem {
this.origin = type; this.origin = type;
} else { } else {
const lowercaseType = `${type}`.toLowerCase().trim(); const lowercaseType = `${type}`.toLowerCase().trim();
const realType = ValidationErrorItem.TypeStringMap[ lowercaseType ]; const realType = ValidationErrorItem.TypeStringMap[ lowercaseType ];
if (realType && ValidationErrorItem.Origins[ realType ]) { if (realType && ValidationErrorItem.Origins[ realType ]) {
this.origin = realType; this.origin = realType;
......
...@@ -638,7 +638,7 @@ class Model { ...@@ -638,7 +638,7 @@ class Model {
if (through.scope) { if (through.scope) {
include.through.where = include.through.where ? { [Op.and]: [include.through.where, through.scope] } : through.scope; include.through.where = include.through.where ? { [Op.and]: [include.through.where, through.scope] } : through.scope;
} }
include.include.push(include.through); include.include.push(include.through);
...@@ -669,7 +669,7 @@ class Model { ...@@ -669,7 +669,7 @@ class Model {
} }
if (include.association.scope) { if (include.association.scope) {
include.where = include.where ? { [Op.and]: [include.where, include.association.scope] } : include.association.scope; include.where = include.where ? { [Op.and]: [include.where, include.association.scope] } : include.association.scope;
} }
if (include.limit && include.separate === undefined) { if (include.limit && include.separate === undefined) {
...@@ -2647,7 +2647,7 @@ class Model { ...@@ -2647,7 +2647,7 @@ class Model {
return; return;
} }
const includeOptions = _(Utils.cloneDeep(include)) const includeOptions = _(Utils.cloneDeep(include))
.omit(['association']) .omit(['association'])
.defaults({ .defaults({
transaction: options.transaction, transaction: options.transaction,
...@@ -2767,7 +2767,7 @@ class Model { ...@@ -2767,7 +2767,7 @@ class Model {
return; return;
} }
const includeOptions = _(Utils.cloneDeep(include)) const includeOptions = _(Utils.cloneDeep(include))
.omit(['association']) .omit(['association'])
.defaults({ .defaults({
transaction: options.transaction, transaction: options.transaction,
...@@ -2803,7 +2803,7 @@ class Model { ...@@ -2803,7 +2803,7 @@ class Model {
valueSets.push(values); valueSets.push(values);
} }
const throughOptions = _(Utils.cloneDeep(include)) const throughOptions = _(Utils.cloneDeep(include))
.omit(['association', 'attributes']) .omit(['association', 'attributes'])
.defaults({ .defaults({
transaction: options.transaction, transaction: options.transaction,
...@@ -3215,7 +3215,7 @@ class Model { ...@@ -3215,7 +3215,7 @@ class Model {
valuesUse = Utils.mapValueFieldNames(valuesUse, options.fields, this); valuesUse = Utils.mapValueFieldNames(valuesUse, options.fields, this);
options = Utils.mapOptionFieldNames(options, this); options = Utils.mapOptionFieldNames(options, this);
options.hasTrigger = this.options ? this.options.hasTrigger : false; options.hasTrigger = this.options ? this.options.hasTrigger : false;
// Run query to update all rows // Run query to update all rows
return this.QueryInterface.bulkUpdate(this.getTableName(options), valuesUse, options.where, options, this.tableAttributes).then(affectedRows => { return this.QueryInterface.bulkUpdate(this.getTableName(options), valuesUse, options.where, options, this.tableAttributes).then(affectedRows => {
...@@ -3775,7 +3775,7 @@ class Model { ...@@ -3775,7 +3775,7 @@ class Model {
const include = this._options.includeMap[key]; const include = this._options.includeMap[key];
const association = include.association; const association = include.association;
const accessor = key; const accessor = key;
const primaryKeyAttribute = include.model.primaryKeyAttribute; const primaryKeyAttribute = include.model.primaryKeyAttribute;
let childOptions; let childOptions;
let isEmpty; let isEmpty;
...@@ -3951,7 +3951,7 @@ class Model { ...@@ -3951,7 +3951,7 @@ class Model {
const instance = this.get(include.as); const instance = this.get(include.as);
if (!instance) return Promise.resolve(); if (!instance) return Promise.resolve();
const includeOptions = _(Utils.cloneDeep(include)) const includeOptions = _(Utils.cloneDeep(include))
.omit(['association']) .omit(['association'])
.defaults({ .defaults({
transaction: options.transaction, transaction: options.transaction,
...@@ -4027,7 +4027,7 @@ class Model { ...@@ -4027,7 +4027,7 @@ class Model {
if (!Array.isArray(instances)) instances = [instances]; if (!Array.isArray(instances)) instances = [instances];
if (!instances.length) return Promise.resolve(); if (!instances.length) return Promise.resolve();
const includeOptions = _(Utils.cloneDeep(include)) const includeOptions = _(Utils.cloneDeep(include))
.omit(['association']) .omit(['association'])
.defaults({ .defaults({
transaction: options.transaction, transaction: options.transaction,
......
...@@ -6,7 +6,7 @@ const _ = require('lodash'); ...@@ -6,7 +6,7 @@ const _ = require('lodash');
const uuidv1 = require('uuid/v1'); const uuidv1 = require('uuid/v1');
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid/v4');
const Promise = require('./promise'); const Promise = require('./promise');
const operators = require('./operators'); const operators = require('./operators');
const operatorsSet = new Set(_.values(operators)); const operatorsSet = new Set(_.values(operators));
let inflection = require('inflection'); let inflection = require('inflection');
......
...@@ -35,35 +35,35 @@ ...@@ -35,35 +35,35 @@
"debug": "^4.1.1", "debug": "^4.1.1",
"dottie": "^2.0.0", "dottie": "^2.0.0",
"inflection": "1.12.0", "inflection": "1.12.0",
"lodash": "^4.17.11", "lodash": "^4.17.15",
"moment": "^2.24.0", "moment": "^2.24.0",
"moment-timezone": "^0.5.21", "moment-timezone": "^0.5.21",
"retry-as-promised": "^3.1.0", "retry-as-promised": "^3.2.0",
"semver": "^6.1.1", "semver": "^6.3.0",
"sequelize-pool": "^2.3.0", "sequelize-pool": "^2.3.0",
"toposort-class": "^1.0.1", "toposort-class": "^1.0.1",
"uuid": "^3.2.1", "uuid": "^3.3.3",
"validator": "^10.11.0", "validator": "^10.11.0",
"wkx": "^0.4.6" "wkx": "^0.4.8"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^8.0.0", "@commitlint/cli": "^8.2.0",
"@commitlint/config-angular": "^8.0.0", "@commitlint/config-angular": "^8.2.0",
"@types/bluebird": "^3.5.26", "@types/bluebird": "^3.5.26",
"@types/node": "^10.12.27", "@types/node": "^12.7.8",
"@types/validator": "^10.11.0", "@types/validator": "^10.11.0",
"big-integer": "^1.6.42", "big-integer": "^1.6.45",
"chai": "^4.x", "chai": "^4.x",
"chai-as-promised": "^7.x", "chai-as-promised": "^7.x",
"chai-datetime": "^1.x", "chai-datetime": "^1.x",
"chai-spies": "^1.x", "chai-spies": "^1.x",
"continuation-local-storage": "^3.x", "continuation-local-storage": "^3.x",
"cross-env": "^5.2.0", "cross-env": "^5.2.1",
"env-cmd": "^8.0.2", "env-cmd": "^8.0.2",
"esdoc": "^1.1.0", "esdoc": "^1.1.0",
"esdoc-inject-style-plugin": "^1.0.0", "esdoc-inject-style-plugin": "^1.0.0",
"esdoc-standard-plugin": "^1.0.0", "esdoc-standard-plugin": "^1.0.0",
"eslint": "^6.0.0", "eslint": "^6.4.0",
"eslint-plugin-jsdoc": "^4.1.1", "eslint-plugin-jsdoc": "^4.1.1",
"eslint-plugin-mocha": "^5.2.1", "eslint-plugin-mocha": "^5.2.1",
"fs-jetpack": "^2.2.2", "fs-jetpack": "^2.2.2",
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
"js-combinatorics": "^0.5.4", "js-combinatorics": "^0.5.4",
"lcov-result-merger": "^3.0.0", "lcov-result-merger": "^3.0.0",
"lint-staged": "^8.1.5", "lint-staged": "^8.1.5",
"mariadb": "^2.0.3", "mariadb": "^2.1.1",
"markdownlint-cli": "^0.17.0", "markdownlint-cli": "^0.18.0",
"mocha": "^6.1.4", "mocha": "^6.1.4",
"mysql2": "^1.6.5", "mysql2": "^1.6.5",
"nyc": "^14.1.1", "nyc": "^14.1.1",
...@@ -81,11 +81,11 @@ ...@@ -81,11 +81,11 @@
"pg-types": "^2.0.0", "pg-types": "^2.0.0",
"rimraf": "^2.6.3", "rimraf": "^2.6.3",
"semantic-release": "^15.13.16", "semantic-release": "^15.13.16",
"sinon": "^7.3.2", "sinon": "^7.5.0",
"sinon-chai": "^3.3.0", "sinon-chai": "^3.3.0",
"sqlite3": "^4.0.6", "sqlite3": "^4.0.6",
"tedious": "6.0.0", "tedious": "6.0.0",
"typescript": "^3.3.3333" "typescript": "^3.6.3"
}, },
"keywords": [ "keywords": [
"mysql", "mysql",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"no-unused-expressions": 0, "no-unused-expressions": 0,
"camelcase": 0, "camelcase": 0,
"no-console": 0, "no-console": 0,
"no-prototype-builtins": 0 "no-prototype-builtins": 0,
"no-multi-spaces": 0
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!