mssql 12.1.1 → 12.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/msnodesqlv8/connection-pool.js +3 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ const config = {
|
|
|
95
95
|
trustedConnection: true, // Set to true if using Windows Authentication
|
|
96
96
|
trustServerCertificate: true, // Set to true if using self-signed certificates
|
|
97
97
|
},
|
|
98
|
-
driver: "
|
|
98
|
+
// driver: "ODBC Driver 18 for SQL Server", // Uncomment to use specific driver
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
(async () => {
|
|
@@ -9,7 +9,7 @@ const ConnectionError = require('../error/connection-error')
|
|
|
9
9
|
const { platform } = require('node:os')
|
|
10
10
|
const { buildConnectionString } = require('@tediousjs/connection-string')
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const DEFAULT_CONNECTION_DRIVER = ['darwin', 'linux'].includes(platform()) ? 'ODBC Driver 17 for SQL Server' : 'SQL Server Native Client 11.0'
|
|
13
13
|
|
|
14
14
|
class ConnectionPool extends BaseConnectionPool {
|
|
15
15
|
_poolCreate () {
|
|
@@ -23,7 +23,7 @@ class ConnectionPool extends BaseConnectionPool {
|
|
|
23
23
|
|
|
24
24
|
if (!this.config.connectionString) {
|
|
25
25
|
cfg.conn_str = buildConnectionString({
|
|
26
|
-
Driver:
|
|
26
|
+
Driver: this.config.driver && this.config.driver !== 'msnodesqlv8' ? this.config.driver : DEFAULT_CONNECTION_DRIVER,
|
|
27
27
|
Server: this.config.options.instanceName ? `${this.config.server}\\${this.config.options.instanceName}` : `${this.config.server},${this.config.port}`,
|
|
28
28
|
Database: this.config.database,
|
|
29
29
|
Uid: this.config.user,
|
|
@@ -43,7 +43,7 @@ class ConnectionPool extends BaseConnectionPool {
|
|
|
43
43
|
|
|
44
44
|
msnodesql.open(cfg, (err, tds) => {
|
|
45
45
|
if (err) {
|
|
46
|
-
err = new ConnectionError(err)
|
|
46
|
+
err = new ConnectionError(err.message, err.code)
|
|
47
47
|
return reject(err)
|
|
48
48
|
}
|
|
49
49
|
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"azure",
|
|
22
22
|
"node-mssql"
|
|
23
23
|
],
|
|
24
|
-
"version": "12.
|
|
24
|
+
"version": "12.2.1",
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"type": "commonjs",
|
|
27
27
|
"repository": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@commitlint/cli": "^20.0.0",
|
|
45
45
|
"@commitlint/config-conventional": "^20.0.0",
|
|
46
|
-
"@semantic-release/commit-analyzer": "^
|
|
47
|
-
"@semantic-release/github": "^
|
|
48
|
-
"@semantic-release/npm": "^
|
|
49
|
-
"@semantic-release/release-notes-generator": "^
|
|
46
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
47
|
+
"@semantic-release/github": "^12.0.6",
|
|
48
|
+
"@semantic-release/npm": "^13.1.5",
|
|
49
|
+
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
50
50
|
"mocha": "^11.0.1",
|
|
51
|
-
"semantic-release": "^
|
|
51
|
+
"semantic-release": "^25.0.3",
|
|
52
52
|
"standard": "^17.0.0"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|