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

Commit b2bccb8a by Sushant Committed by GitHub

build: update dependencies (#12300)

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