pg-promise 11.0.1 → 11.1.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/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  pg-promise
2
2
  ==========
3
3
 
4
+ [![Build Status](https://github.com/vitaly-t/pg-promise/workflows/ci/badge.svg?branch=master)](https://github.com/vitaly-t/pg-promise/actions?query=workflow%3Aci+branch%3Amaster)
5
+ [![Node Version](https://img.shields.io/badge/nodejs-14,_16-green.svg?logo=node.js&style=flat)](https://nodejs.org)
6
+ [![Postgres Version](https://img.shields.io/badge/postgresql-11,_12,_13,_14,_15-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
7
+
8
+ ---
9
+
4
10
  PostgreSQL interface for Node.js
5
11
 
6
12
  ---
@@ -99,7 +99,7 @@ const errorMessages = [
99
99
  *
100
100
  * // pg-promise initialization options...
101
101
  *
102
- * error: (err, e) => {
102
+ * error(err, e) {
103
103
  * if (err instanceof QueryResultError) {
104
104
  * // A query returned unexpected number of records, and thus rejected;
105
105
  *
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "pg-promise",
3
- "version": "11.0.1",
3
+ "version": "11.1.0",
4
4
  "description": "PostgreSQL interface for Node.js",
5
5
  "main": "lib/index.js",
6
6
  "typings": "typescript/pg-promise.d.ts",
7
7
  "scripts": {
8
8
  "spelling": "cspell --config=.cspell.json \"**/*.{md,ts,js}\" --no-progress",
9
- "coverage": "istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test",
9
+ "coverage": "istanbul cover ./node_modules/jasmine-node/bin/jasmine-node --captureExceptions test",
10
10
  "doc": "jsdoc -c ./jsdoc/jsdoc.js ./jsdoc/README.md -t ./jsdoc/templates/custom",
11
11
  "lint": "eslint ./lib ./test/*.js ./test/db --fix",
12
12
  "test": "jasmine-node --captureExceptions test",
13
+ "test:init": "node test/db/init.js",
13
14
  "test:native": "jasmine-node test --config PG_NATIVE true",
14
15
  "tslint": "tslint ./typescript/*.ts"
15
16
  },
@@ -41,7 +42,7 @@
41
42
  },
42
43
  "dependencies": {
43
44
  "assert-options": "0.8.0",
44
- "pg": "8.8.0",
45
+ "pg": "8.9.0",
45
46
  "pg-minify": "1.6.2",
46
47
  "spex": "3.2.0"
47
48
  },
@@ -49,13 +50,13 @@
49
50
  "@types/node": "18.11.18",
50
51
  "bluebird": "3.7.2",
51
52
  "coveralls": "3.1.1",
52
- "cspell": "6.18.1",
53
- "eslint": "8.30.0",
53
+ "cspell": "6.19.2",
54
+ "eslint": "8.32.0",
54
55
  "istanbul": "0.4.5",
55
56
  "jasmine-node": "3.0.0",
56
57
  "jsdoc": "4.0.0",
57
58
  "JSONStream": "1.3.5",
58
- "pg-query-stream": "4.2.4",
59
+ "pg-query-stream": "4.3.0",
59
60
  "tslint": "6.1.3",
60
61
  "typescript": "4.9.4"
61
62
  }
@@ -13,13 +13,14 @@
13
13
  // Calling it 'pg-subset' to avoid a conflict in case the application also
14
14
  // includes the official 'pg' typings.
15
15
  //
16
- // Supported version of pg: 8.7.1 and later.
16
+ // Supported version of pg: 8.9.0 and later.
17
17
  //
18
18
  // pg: https://github.com/brianc/node-postgres
19
19
  //////////////////////////////////////////////////////////////////////////////
20
20
 
21
21
  import {EventEmitter} from 'events';
22
22
  import {checkServerIdentity} from 'tls';
23
+ import {Stream} from 'stream';
23
24
 
24
25
  declare namespace pg {
25
26
 
@@ -102,6 +103,7 @@ declare namespace pg {
102
103
  keepAlive?: boolean
103
104
  keepalives?: number
104
105
  keepalives_idle?: number
106
+ stream?: Stream | ((cn: IConnectionParameters) => Stream)
105
107
  Client?: new(config: string | IConnectionParameters) => C
106
108
  Promise?: any
107
109
  types?: ITypeOverrides