pg-promise 12.1.0 → 12.1.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 +1 -1
- package/lib/task.js +2 -7
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ pg-promise
|
|
|
3
3
|
|
|
4
4
|
[](https://github.com/vitaly-t/pg-promise/actions/workflows/ci.yml)
|
|
5
5
|
[](https://nodejs.org)
|
|
6
|
-
[](https://www.postgresql.org)
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
package/lib/task.js
CHANGED
|
@@ -116,9 +116,6 @@ function Task(ctx, tag, isTX, config) {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* Consider using <b>async/await</b> syntax instead, or if you must have
|
|
120
|
-
* pre-generated promises, then $[Promise.allSettled].
|
|
121
|
-
*
|
|
122
119
|
* @method Task#batch
|
|
123
120
|
* @description
|
|
124
121
|
* Settles a predefined array of mixed values by redirecting to method $[spex.batch].
|
|
@@ -196,9 +193,7 @@ const callback = (ctx, obj, cb) => {
|
|
|
196
193
|
|
|
197
194
|
try {
|
|
198
195
|
if (cb.constructor.name === 'GeneratorFunction') {
|
|
199
|
-
|
|
200
|
-
// Clients should use the new ES7 async/await syntax.
|
|
201
|
-
throw new TypeError('ES6 generator functions are no longer supported!');
|
|
196
|
+
throw new TypeError('ES6 generator functions are not supported!');
|
|
202
197
|
}
|
|
203
198
|
result = cb.call(obj, obj); // invoking the callback function;
|
|
204
199
|
} catch (err) {
|
|
@@ -209,7 +204,7 @@ const callback = (ctx, obj, cb) => {
|
|
|
209
204
|
});
|
|
210
205
|
return Promise.reject(err); // reject with the error;
|
|
211
206
|
}
|
|
212
|
-
if (result
|
|
207
|
+
if (result instanceof Promise) {
|
|
213
208
|
return result; // result is a valid promise object;
|
|
214
209
|
}
|
|
215
210
|
return Promise.resolve(result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-promise",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.2",
|
|
4
4
|
"description": "PostgreSQL interface for Node.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "typescript/pg-promise.d.ts",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"spelling": "cspell --config=.cspell.json \"**/*.{md,ts,js}\" --no-progress",
|
|
9
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
|
-
"lint": "eslint ./lib ./test/*.js ./test/db
|
|
11
|
+
"lint": "eslint ./lib ./test/*.js ./test/db",
|
|
12
|
+
"lint:fix": "npm run lint -- --fix",
|
|
12
13
|
"test": "jasmine-node --captureExceptions test",
|
|
13
14
|
"test:init": "node test/db/init.js",
|
|
14
|
-
"test:native": "jasmine-node test --config PG_NATIVE true"
|
|
15
|
-
"tslint": "tslint ./typescript/*.ts"
|
|
15
|
+
"test:native": "jasmine-node test --config PG_NATIVE true"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"lib",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"assert-options": "0.8.3",
|
|
45
45
|
"pg": "8.16.3",
|
|
46
46
|
"pg-minify": "1.8.0",
|
|
47
|
-
"spex": "4.0.
|
|
47
|
+
"spex": "4.0.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"pg-query-stream": "4.10.3"
|
|
@@ -53,14 +53,13 @@
|
|
|
53
53
|
"@eslint/js": "9.34.0",
|
|
54
54
|
"@types/node": "24.3.0",
|
|
55
55
|
"coveralls": "3.1.1",
|
|
56
|
-
"cspell": "9.2.
|
|
56
|
+
"cspell": "9.2.1",
|
|
57
57
|
"eslint": "9.34.0",
|
|
58
58
|
"globals": "16.3.0",
|
|
59
59
|
"istanbul": "0.4.5",
|
|
60
60
|
"jasmine-node": "3.0.0",
|
|
61
61
|
"jsdoc": "4.0.4",
|
|
62
62
|
"JSONStream": "1.3.5",
|
|
63
|
-
"tslint": "6.1.3",
|
|
64
63
|
"typescript": "5.9.2"
|
|
65
64
|
}
|
|
66
65
|
}
|