mssql 8.1.3 → 9.0.0

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/CHANGELOG.txt CHANGED
@@ -1,3 +1,8 @@
1
+ v9.0.0 (2022-08-10)
2
+ -------------------
3
+ [change] Upgrade tedious to v15 ([#1417](https://github.com/tediousjs/node-mssql/pull/1417))
4
+ [removed] Removed NodeJS 10 & 12 support ([#1417](https://github.com/tediousjs/node-mssql/pull/1417))
5
+
1
6
  v8.1.3 (2022-08-08)
2
7
  -------------------
3
8
  [fix] requestTimeout correctly resolved ([#1398](https://github.com/tediousjs/node-mssql/pull/1398))
package/LICENSE.md CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2013-2018 Patrik Simek and contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ MIT License
2
+
3
+ Copyright (c) 2013-2018 Patrik Simek and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -2025,6 +2025,11 @@ request.query('select @myval as myval', (err, result) => {
2025
2025
  - If you're facing problems with connecting SQL Server 2000, try setting the default TDS version to 7.1 with `config.options.tdsVersion = '7_1'` ([issue](https://github.com/tediousjs/node-mssql/issues/36))
2026
2026
  - If you're executing a statement longer than 4000 chars on SQL Server 2000, always use [batch](#batch-batch-callback) instead of [query](#query-command-callback) ([issue](https://github.com/tediousjs/node-mssql/issues/68))
2027
2027
 
2028
+ ## 8.x to 7.x changes
2029
+
2030
+ - Upgraded to tedious version 15
2031
+ - Dropped support for Node version < 12
2032
+
2028
2033
  ## 7.x to 8.x changes
2029
2034
 
2030
2035
  - Upgraded to tedious version 14
package/bin/mssql CHANGED
File without changes
@@ -1,9 +1,9 @@
1
- 'use strict'
2
-
3
- module.exports = {
4
- READ_UNCOMMITTED: 0x01,
5
- READ_COMMITTED: 0x02,
6
- REPEATABLE_READ: 0x03,
7
- SERIALIZABLE: 0x04,
8
- SNAPSHOT: 0x05
9
- }
1
+ 'use strict'
2
+
3
+ module.exports = {
4
+ READ_UNCOMMITTED: 0x01,
5
+ READ_COMMITTED: 0x02,
6
+ REPEATABLE_READ: 0x03,
7
+ SERIALIZABLE: 0x04,
8
+ SNAPSHOT: 0x05
9
+ }
@@ -442,12 +442,15 @@ class Request extends BaseRequest {
442
442
  debug('request(%d): query', IDS.get(this), command)
443
443
 
444
444
  const req = new tds.Request(command, err => {
445
- // to make sure we handle no-sql errors as well
446
- if (err && (!errors.length || (errors.length && err.message !== errors[errors.length - 1].message))) {
447
- err = new RequestError(err, 'EREQUEST')
448
- if (this.stream) this.emit('error', err)
449
- errors.push(err)
450
- }
445
+ // tedious v15 has started using AggregateErrors to wrap multiple errors into single error objects
446
+ (err?.errors ? err.errors : [err]).forEach((e, i, { length }) => {
447
+ // to make sure we handle no-sql errors as well
448
+ if (e && (!errors.length || (errors.length && errors.length >= length && e.message !== errors[errors.length - length + i].message))) {
449
+ e = new RequestError(e, 'EREQUEST')
450
+ if (this.stream) this.emit('error', e)
451
+ errors.push(e)
452
+ }
453
+ })
451
454
 
452
455
  // process batch outputs
453
456
  if (batchHasOutput) {
package/lib/utils.js CHANGED
@@ -9,7 +9,7 @@ const INCREMENT = {
9
9
 
10
10
  module.exports = {
11
11
  objectHasProperty: (object, property) => Object.prototype.hasOwnProperty.call(object, property),
12
- INCREMENT: INCREMENT,
12
+ INCREMENT,
13
13
  IDS: {
14
14
  get: IDS.get.bind(IDS),
15
15
  add: (object, type, id) => {
package/package.json CHANGED
@@ -21,21 +21,21 @@
21
21
  "azure",
22
22
  "node-mssql"
23
23
  ],
24
- "version": "8.1.3",
24
+ "version": "9.0.0",
25
25
  "main": "index.js",
26
26
  "repository": "github:tediousjs/node-mssql",
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@tediousjs/connection-string": "^0.3.0",
30
- "commander": "^9.1.0",
29
+ "@tediousjs/connection-string": "^0.4.1",
30
+ "commander": "^9.4.0",
31
31
  "debug": "^4.3.3",
32
32
  "rfdc": "^1.3.0",
33
33
  "tarn": "^3.0.2",
34
- "tedious": "^14.0.0"
34
+ "tedious": "^15.0.1"
35
35
  },
36
36
  "devDependencies": {
37
- "mocha": "^9.1.3",
38
- "standard": "^16.0.4"
37
+ "mocha": "^10.0.0",
38
+ "standard": "^17.0.0"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=10"