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

Commit b2bccb8a by Sushant Committed by GitHub

build: update dependencies (#12300)

1 parent d7fcf213
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
const util = require('util'); const util = require('util');
const _ = require('lodash'); const _ = require('lodash');
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid').v4;
const semver = require('semver'); const semver = require('semver');
const Utils = require('../../utils'); const Utils = require('../../utils');
......
'use strict'; 'use strict';
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid').v4;
const TransactionQueries = { const TransactionQueries = {
/** /**
......
...@@ -5,7 +5,7 @@ const SqlString = require('../../sql-string'); ...@@ -5,7 +5,7 @@ const SqlString = require('../../sql-string');
const QueryTypes = require('../../query-types'); const QueryTypes = require('../../query-types');
const Dot = require('dottie'); const Dot = require('dottie');
const deprecations = require('../../utils/deprecations'); const deprecations = require('../../utils/deprecations');
const uuid = require('uuid/v4'); const uuid = require('uuid').v4;
class AbstractQuery { class AbstractQuery {
......
...@@ -38,7 +38,7 @@ class ConnectionManager extends AbstractConnectionManager { ...@@ -38,7 +38,7 @@ class ConnectionManager extends AbstractConnectionManager {
options: { options: {
port: parseInt(config.port, 10), port: parseInt(config.port, 10),
database: config.database, database: config.database,
encrypt: false trustServerCertificate: true
} }
}; };
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
const DataTypes = require('./data-types'); const DataTypes = require('./data-types');
const SqlString = require('./sql-string'); const SqlString = require('./sql-string');
const _ = require('lodash'); const _ = require('lodash');
const uuidv1 = require('uuid/v1'); const uuidv1 = require('uuid').v1;
const uuidv4 = require('uuid/v4'); const uuidv4 = require('uuid').v4;
const operators = require('./operators'); const operators = require('./operators');
const operatorsSet = new Set(Object.values(operators)); const operatorsSet = new Set(Object.values(operators));
......
...@@ -34,30 +34,30 @@ ...@@ -34,30 +34,30 @@
"dottie": "^2.0.0", "dottie": "^2.0.0",
"inflection": "1.12.0", "inflection": "1.12.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"moment": "^2.24.0", "moment": "^2.26.0",
"moment-timezone": "^0.5.21", "moment-timezone": "^0.5.31",
"retry-as-promised": "^3.2.0", "retry-as-promised": "^3.2.0",
"semver": "^7.3.2", "semver": "^7.3.2",
"sequelize-pool": "^3.1.0", "sequelize-pool": "^5.0.0",
"toposort-class": "^1.0.1", "toposort-class": "^1.0.1",
"uuid": "^3.4.0", "uuid": "^8.1.0",
"validator": "^10.11.0", "validator": "^10.11.0",
"wkx": "^0.5.0" "wkx": "^0.5.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^8.3.5", "@commitlint/cli": "^8.3.5",
"@commitlint/config-angular": "^8.3.4", "@commitlint/config-angular": "^8.3.4",
"@types/node": "^12.12.37", "@types/node": "^12.12.42",
"@types/validator": "^10.11.0", "@types/validator": "^10.11.0",
"acorn": "^7.1.1", "acorn": "^7.2.0",
"chai": "^4.x", "chai": "^4.x",
"chai-as-promised": "^7.x", "chai-as-promised": "^7.x",
"chai-datetime": "^1.x", "chai-datetime": "^1.6.0",
"cheerio": "^1.0.0-rc.2", "cheerio": "^1.0.0-rc.3",
"cls-hooked": "^4.2.2", "cls-hooked": "^4.2.2",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"delay": "^4.3.0", "delay": "^4.3.0",
"dtslint": "^3.4.2", "dtslint": "^3.6.4",
"env-cmd": "^10.1.0", "env-cmd": "^10.1.0",
"esdoc": "^1.1.0", "esdoc": "^1.1.0",
"esdoc-ecmascript-proposal-plugin": "^1.0.0", "esdoc-ecmascript-proposal-plugin": "^1.0.0",
...@@ -66,29 +66,29 @@ ...@@ -66,29 +66,29 @@
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-plugin-jsdoc": "^20.4.0", "eslint-plugin-jsdoc": "^20.4.0",
"eslint-plugin-mocha": "^6.2.2", "eslint-plugin-mocha": "^6.2.2",
"fs-jetpack": "^2.2.3", "fs-jetpack": "^2.4.0",
"husky": "^4.2.5", "husky": "^4.2.5",
"js-combinatorics": "^0.5.5", "js-combinatorics": "^0.5.5",
"lcov-result-merger": "^3.0.0", "lcov-result-merger": "^3.0.0",
"lint-staged": "^10.1.7", "lint-staged": "^10.2.6",
"mariadb": "^2.3.1", "mariadb": "^2.3.1",
"markdownlint-cli": "^0.22.0", "markdownlint-cli": "^0.23.1",
"marked": "^1.0.0", "marked": "^1.1.0",
"mocha": "^7.1.1", "mocha": "^7.1.2",
"mysql2": "^1.6.5", "mysql2": "^2.1.0",
"nyc": "^15.0.0", "nyc": "^15.0.0",
"p-map": "^4.0.0", "p-map": "^4.0.0",
"p-props": "^3.1.0", "p-props": "^4.0.0",
"p-timeout": "^3.2.0", "p-timeout": "^3.2.0",
"pg": "^7.8.1", "pg": "^8.2.1",
"pg-hstore": "^2.x", "pg-hstore": "^2.x",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"semantic-release": "^17.0.7", "semantic-release": "^17.0.7",
"sinon": "^9.0.2", "sinon": "^9.0.2",
"sinon-chai": "^3.3.0", "sinon-chai": "^3.3.0",
"sqlite3": "^4.1.1", "sqlite3": "^4.2.0",
"tedious": "6.0.0", "tedious": "8.3.0",
"typescript": "^3.6.3" "typescript": "^3.9.3"
}, },
"keywords": [ "keywords": [
"mysql", "mysql",
......
...@@ -29,6 +29,7 @@ $config = @{ ...@@ -29,6 +29,7 @@ $config = @{
database = "sequelize_test" database = "sequelize_test"
dialectOptions = @{ dialectOptions = @{
options = @{ options = @{
encrypt = $false
requestTimeout = 25000 requestTimeout = 25000
cryptoCredentialsDetails = @{ cryptoCredentialsDetails = @{
ciphers = "RC4-MD5" ciphers = "RC4-MD5"
......
...@@ -5,7 +5,6 @@ const chai = require('chai'), ...@@ -5,7 +5,6 @@ const chai = require('chai'),
Sequelize = require('../../../../index'), Sequelize = require('../../../../index'),
Support = require('../../support'), Support = require('../../support'),
dialect = Support.getTestDialect(), dialect = Support.getTestDialect(),
tedious = require('tedious'),
sinon = require('sinon'); sinon = require('sinon');
if (dialect === 'mssql') { if (dialect === 'mssql') {
...@@ -29,8 +28,13 @@ if (dialect === 'mssql') { ...@@ -29,8 +28,13 @@ if (dialect === 'mssql') {
this.config.password, this.config.password,
this.config this.config
); );
this.Connection = {};
this.connectionStub = sinon.stub(tedious, 'Connection'); const self = this;
this.connectionStub = sinon.stub(this.instance.connectionManager, 'lib').value({
Connection: function FakeConnection() {
return self.Connection;
}
});
}); });
afterEach(function() { afterEach(function() {
...@@ -38,7 +42,7 @@ if (dialect === 'mssql') { ...@@ -38,7 +42,7 @@ if (dialect === 'mssql') {
}); });
it('connectionManager._connect() does not delete `domain` from config.dialectOptions', async function() { it('connectionManager._connect() does not delete `domain` from config.dialectOptions', async function() {
this.connectionStub.returns({ this.Connection = {
STATE: {}, STATE: {},
state: '', state: '',
once(event, cb) { once(event, cb) {
...@@ -50,7 +54,7 @@ if (dialect === 'mssql') { ...@@ -50,7 +54,7 @@ if (dialect === 'mssql') {
}, },
removeListener: () => {}, removeListener: () => {},
on: () => {} on: () => {}
}); };
expect(this.config.dialectOptions.domain).to.equal('TEST.COM'); expect(this.config.dialectOptions.domain).to.equal('TEST.COM');
await this.instance.dialect.connectionManager._connect(this.config); await this.instance.dialect.connectionManager._connect(this.config);
...@@ -58,7 +62,7 @@ if (dialect === 'mssql') { ...@@ -58,7 +62,7 @@ if (dialect === 'mssql') {
}); });
it('connectionManager._connect() should reject if end was called and connect was not', async function() { it('connectionManager._connect() should reject if end was called and connect was not', async function() {
this.connectionStub.returns({ this.Connection = {
STATE: {}, STATE: {},
state: '', state: '',
once(event, cb) { once(event, cb) {
...@@ -70,7 +74,7 @@ if (dialect === 'mssql') { ...@@ -70,7 +74,7 @@ if (dialect === 'mssql') {
}, },
removeListener: () => {}, removeListener: () => {},
on: () => {} on: () => {}
}); };
try { try {
await this.instance.dialect.connectionManager._connect(this.config); await this.instance.dialect.connectionManager._connect(this.config);
...@@ -83,7 +87,7 @@ if (dialect === 'mssql') { ...@@ -83,7 +87,7 @@ if (dialect === 'mssql') {
it('connectionManager._connect() should call connect if state is initialized', async function() { it('connectionManager._connect() should call connect if state is initialized', async function() {
const connectStub = sinon.stub(); const connectStub = sinon.stub();
const INITIALIZED = { name: 'INITIALIZED' }; const INITIALIZED = { name: 'INITIALIZED' };
this.connectionStub.returns({ this.Connection = {
STATE: { INITIALIZED }, STATE: { INITIALIZED },
state: INITIALIZED, state: INITIALIZED,
connect: connectStub, connect: connectStub,
...@@ -96,7 +100,7 @@ if (dialect === 'mssql') { ...@@ -96,7 +100,7 @@ if (dialect === 'mssql') {
}, },
removeListener: () => {}, removeListener: () => {},
on: () => {} on: () => {}
}); };
await this.instance.dialect.connectionManager._connect(this.config); await this.instance.dialect.connectionManager._connect(this.config);
expect(connectStub.called).to.equal(true); expect(connectStub.called).to.equal(true);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!