pg-promise 11.0.0 → 11.0.2

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/lib/query.js CHANGED
@@ -160,8 +160,8 @@ function $query(ctx, query, values, qrm, config) {
160
160
  if (npm.utils.isConnectivityError(err)) {
161
161
  ctx.db.client.$connectionError = err;
162
162
  }
163
- err.query ??= query;
164
- err.params ??= params;
163
+ err.query = err.query || query;
164
+ err.params = err.params || params;
165
165
  error = err;
166
166
  } else {
167
167
  multiResult = Array.isArray(result);
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "pg-promise",
3
- "version": "11.0.0",
3
+ "version": "11.0.2",
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
  },
@@ -46,7 +47,6 @@
46
47
  "spex": "3.2.0"
47
48
  },
48
49
  "devDependencies": {
49
- "@babel/eslint-parser": "7.19.1",
50
50
  "@types/node": "18.11.18",
51
51
  "bluebird": "3.7.2",
52
52
  "coveralls": "3.1.1",