pg-promise 12.1.1 → 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/lib/task.js +2 -4
- package/package.json +4 -3
package/lib/task.js
CHANGED
|
@@ -193,9 +193,7 @@ const callback = (ctx, obj, cb) => {
|
|
|
193
193
|
|
|
194
194
|
try {
|
|
195
195
|
if (cb.constructor.name === 'GeneratorFunction') {
|
|
196
|
-
|
|
197
|
-
// Clients should use the new ES7 async/await syntax.
|
|
198
|
-
throw new TypeError('ES6 generator functions are no longer supported!');
|
|
196
|
+
throw new TypeError('ES6 generator functions are not supported!');
|
|
199
197
|
}
|
|
200
198
|
result = cb.call(obj, obj); // invoking the callback function;
|
|
201
199
|
} catch (err) {
|
|
@@ -206,7 +204,7 @@ const callback = (ctx, obj, cb) => {
|
|
|
206
204
|
});
|
|
207
205
|
return Promise.reject(err); // reject with the error;
|
|
208
206
|
}
|
|
209
|
-
if (result
|
|
207
|
+
if (result instanceof Promise) {
|
|
210
208
|
return result; // result is a valid promise object;
|
|
211
209
|
}
|
|
212
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",
|
|
@@ -9,6 +9,7 @@
|
|
|
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
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
15
|
"test:native": "jasmine-node test --config PG_NATIVE true"
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"assert-options": "0.8.3",
|
|
44
45
|
"pg": "8.16.3",
|
|
45
46
|
"pg-minify": "1.8.0",
|
|
46
|
-
"spex": "4.0.
|
|
47
|
+
"spex": "4.0.2"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"pg-query-stream": "4.10.3"
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"@eslint/js": "9.34.0",
|
|
53
54
|
"@types/node": "24.3.0",
|
|
54
55
|
"coveralls": "3.1.1",
|
|
55
|
-
"cspell": "9.2.
|
|
56
|
+
"cspell": "9.2.1",
|
|
56
57
|
"eslint": "9.34.0",
|
|
57
58
|
"globals": "16.3.0",
|
|
58
59
|
"istanbul": "0.4.5",
|