pg-promise 11.5.5 → 11.6.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 +2 -2
- package/lib/formatting.js +2 -2
- package/lib/helpers/column.js +2 -2
- package/lib/utils/index.js +1 -1
- package/lib/utils/public.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@ pg-promise
|
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
4
|
[](https://github.com/vitaly-t/pg-promise/actions?query=workflow%3Aci+branch%3Amaster)
|
|
5
|
-
[](https://nodejs.org)
|
|
6
|
+
[](https://www.postgresql.org)
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
package/lib/formatting.js
CHANGED
|
@@ -170,7 +170,7 @@ const formatAs = {
|
|
|
170
170
|
array({query, array, raw, options}) {
|
|
171
171
|
options = options && typeof options === 'object' ? options : {};
|
|
172
172
|
return query.replace(npm.patterns.multipleValues, name => {
|
|
173
|
-
const v = formatAs.stripName(name.
|
|
173
|
+
const v = formatAs.stripName(name.substring(1), raw);
|
|
174
174
|
const idx = v.name - 1;
|
|
175
175
|
if (idx >= maxVariable) {
|
|
176
176
|
throw new RangeError(`Variable $${v.name} exceeds supported maximum of $${maxVariable}`);
|
|
@@ -200,7 +200,7 @@ const formatAs = {
|
|
|
200
200
|
const mod = name.match(npm.patterns.hasValidModifier);
|
|
201
201
|
if (mod) {
|
|
202
202
|
return {
|
|
203
|
-
name: name.
|
|
203
|
+
name: name.substring(0, mod.index),
|
|
204
204
|
fm: fmMap[mod[0]] | (raw ? fmFlags.raw : 0)
|
|
205
205
|
};
|
|
206
206
|
}
|
package/lib/helpers/column.js
CHANGED
|
@@ -266,11 +266,11 @@ function parseColumn(name) {
|
|
|
266
266
|
const res = {};
|
|
267
267
|
if (name[0] === '?') {
|
|
268
268
|
res.cnd = true;
|
|
269
|
-
name = name.
|
|
269
|
+
name = name.substring(1);
|
|
270
270
|
}
|
|
271
271
|
const mod = name.match(npm.patterns.hasValidModifier);
|
|
272
272
|
if (mod) {
|
|
273
|
-
res.name = name.
|
|
273
|
+
res.name = name.substring(0, mod.index);
|
|
274
274
|
res.mod = mod[0];
|
|
275
275
|
} else {
|
|
276
276
|
res.name = name;
|
package/lib/utils/index.js
CHANGED
|
@@ -162,7 +162,7 @@ function addInspection(type, cb) {
|
|
|
162
162
|
// This is for detecting when to skip executing ROLLBACK for a failed transaction.
|
|
163
163
|
function isConnectivityError(err) {
|
|
164
164
|
const code = err && typeof err.code === 'string' && err.code;
|
|
165
|
-
const cls = code && code.
|
|
165
|
+
const cls = code && code.substring(0, 2); // Error Class
|
|
166
166
|
// istanbul ignore next (we cannot test-cover all error cases):
|
|
167
167
|
return code === 'ECONNRESET' || (cls === '08' && code !== '08P01') || (cls === '57' && code !== '57014');
|
|
168
168
|
// Code 'ECONNRESET' - Connectivity issue handled by the driver.
|
package/lib/utils/public.js
CHANGED
|
@@ -39,7 +39,7 @@ const npm = {
|
|
|
39
39
|
*/
|
|
40
40
|
function camelize(text) {
|
|
41
41
|
text = text.replace(/[-_\s.]+(.)?/g, (_, c) => c ? c.toUpperCase() : '');
|
|
42
|
-
return text.
|
|
42
|
+
return text.substring(0, 1).toLowerCase() + text.substring(1);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-promise",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"description": "PostgreSQL interface for Node.js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "typescript/pg-promise.d.ts",
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"assert-options": "0.8.1",
|
|
45
|
-
"pg": "8.11.
|
|
45
|
+
"pg": "8.11.5",
|
|
46
46
|
"pg-minify": "1.6.3",
|
|
47
47
|
"spex": "3.3.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/node": "20.5
|
|
50
|
+
"@types/node": "20.12.5",
|
|
51
51
|
"bluebird": "3.7.2",
|
|
52
52
|
"coveralls": "3.1.1",
|
|
53
|
-
"cspell": "8.6.
|
|
53
|
+
"cspell": "8.6.1",
|
|
54
54
|
"eslint": "8.57.0",
|
|
55
55
|
"istanbul": "0.4.5",
|
|
56
56
|
"jasmine-node": "3.0.0",
|
|
57
57
|
"jsdoc": "4.0.2",
|
|
58
58
|
"JSONStream": "1.3.5",
|
|
59
|
-
"pg-query-stream": "4.5.
|
|
59
|
+
"pg-query-stream": "4.5.5",
|
|
60
60
|
"tslint": "6.1.3",
|
|
61
|
-
"typescript": "5.4.
|
|
61
|
+
"typescript": "5.4.4"
|
|
62
62
|
}
|
|
63
63
|
}
|