postgrejs 2.22.2 → 2.22.4

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +518 -588
  2. package/cjs/connection/connection.js +9 -4
  3. package/cjs/connection/intl-connection.js +12 -5
  4. package/cjs/connection/portal.js +10 -3
  5. package/cjs/connection/prepared-statement.js +9 -3
  6. package/cjs/constants.js +0 -1
  7. package/cjs/data-type-map.js +15 -3
  8. package/cjs/data-types/bool-type.js +7 -1
  9. package/cjs/data-types/circle-type.js +4 -1
  10. package/cjs/data-types/date-type.js +12 -4
  11. package/cjs/data-types/int2-type.js +1 -1
  12. package/cjs/data-types/int2-vector-type.js +5 -1
  13. package/cjs/data-types/int4-type.js +3 -1
  14. package/cjs/data-types/int8-type.js +7 -2
  15. package/cjs/data-types/json-type.js +4 -2
  16. package/cjs/data-types/jsonb-type.js +4 -2
  17. package/cjs/data-types/lseg-type.js +4 -1
  18. package/cjs/data-types/point-type.js +4 -1
  19. package/cjs/data-types/time-type.js +16 -5
  20. package/cjs/data-types/timestamp-type.js +11 -4
  21. package/cjs/data-types/timestamptz-type.js +4 -2
  22. package/cjs/protocol/backend.js +9 -3
  23. package/cjs/protocol/frontend.js +40 -10
  24. package/cjs/protocol/pg-socket.js +5 -2
  25. package/cjs/protocol/sasl.js +2 -2
  26. package/cjs/protocol/smart-buffer.js +1 -2
  27. package/cjs/safe-event-emitter.js +1 -1
  28. package/cjs/tsconfig-build-cjs.tsbuildinfo +1 -1
  29. package/cjs/util/bigint-methods.js +5 -2
  30. package/cjs/util/connection-config.js +5 -6
  31. package/cjs/util/parse-datetime.js +4 -4
  32. package/cjs/util/parse-row.js +2 -1
  33. package/cjs/util/parse-time.js +3 -2
  34. package/esm/connection/connection.js +9 -4
  35. package/esm/connection/intl-connection.js +12 -5
  36. package/esm/connection/pool.js +1 -1
  37. package/esm/connection/portal.js +10 -3
  38. package/esm/connection/prepared-statement.js +9 -3
  39. package/esm/constants.js +0 -1
  40. package/esm/data-type-map.js +18 -6
  41. package/esm/data-types/bool-type.js +7 -1
  42. package/esm/data-types/circle-type.js +4 -1
  43. package/esm/data-types/date-type.js +12 -4
  44. package/esm/data-types/int2-type.js +1 -1
  45. package/esm/data-types/int2-vector-type.js +5 -1
  46. package/esm/data-types/int4-type.js +3 -1
  47. package/esm/data-types/int8-type.js +7 -2
  48. package/esm/data-types/json-type.js +4 -2
  49. package/esm/data-types/jsonb-type.js +4 -2
  50. package/esm/data-types/lseg-type.js +4 -1
  51. package/esm/data-types/point-type.js +4 -1
  52. package/esm/data-types/time-type.js +16 -5
  53. package/esm/data-types/timestamp-type.js +11 -4
  54. package/esm/data-types/timestamptz-type.js +4 -2
  55. package/esm/protocol/backend.js +9 -3
  56. package/esm/protocol/frontend.js +40 -10
  57. package/esm/protocol/pg-socket.js +5 -2
  58. package/esm/protocol/sasl.js +2 -2
  59. package/esm/protocol/smart-buffer.js +1 -2
  60. package/esm/safe-event-emitter.js +1 -1
  61. package/esm/util/bigint-methods.js +5 -2
  62. package/esm/util/connection-config.js +2 -2
  63. package/esm/util/parse-datetime.js +4 -4
  64. package/esm/util/parse-row.js +2 -1
  65. package/esm/util/parse-time.js +3 -2
  66. package/package.json +8 -5
@@ -6,7 +6,8 @@ export const TimeType = {
6
6
  oid: DataTypeOIDs.time,
7
7
  jsType: 'string',
8
8
  parseBinary(v, options) {
9
- const fetchAsString = options.fetchAsString && options.fetchAsString.includes(DataTypeOIDs.time);
9
+ const fetchAsString = options.fetchAsString &&
10
+ options.fetchAsString.includes(DataTypeOIDs.time);
10
11
  const hi = v.readInt32BE();
11
12
  const lo = v.readUInt32BE(4);
12
13
  let d = new Date((lo + hi * timeMul) / 1000);
@@ -21,7 +22,9 @@ export const TimeType = {
21
22
  if (!(v instanceof Date))
22
23
  v = new Date(v);
23
24
  // Postgresql ignores timezone data so we are
24
- let n = options.utcDates ? v.getTime() : v.getTime() - v.getTimezoneOffset() * 60 * 1000;
25
+ let n = options.utcDates
26
+ ? v.getTime()
27
+ : v.getTime() - v.getTimezoneOffset() * 60 * 1000;
25
28
  n = n * 1000;
26
29
  const hi = Math.floor(n / timeMul);
27
30
  const lo = n - hi * timeMul;
@@ -29,12 +32,16 @@ export const TimeType = {
29
32
  buf.writeUInt32BE(lo);
30
33
  },
31
34
  parseText(v, options) {
32
- if (options.fetchAsString && options.fetchAsString.includes(DataTypeOIDs.time))
35
+ if (options.fetchAsString &&
36
+ options.fetchAsString.includes(DataTypeOIDs.time))
33
37
  return v;
34
38
  return parseTime(v, false, options.utcDates);
35
39
  },
36
40
  isType(v) {
37
- return ((v instanceof Date && v.getFullYear() === 1970 && v.getMonth() === 0 && v.getDate() === 1) ||
41
+ return ((v instanceof Date &&
42
+ v.getFullYear() === 1970 &&
43
+ v.getMonth() === 0 &&
44
+ v.getDate() === 1) ||
38
45
  (typeof v === 'string' && STRICT_TIME_PATTERN.test(v)));
39
46
  },
40
47
  };
@@ -42,7 +49,11 @@ function padZero(v) {
42
49
  return v < 9 ? '0' + v : '' + v;
43
50
  }
44
51
  function dateToTimeString(d) {
45
- return padZero(d.getHours()) + ':' + padZero(d.getMinutes()) + ':' + padZero(d.getSeconds());
52
+ return (padZero(d.getHours()) +
53
+ ':' +
54
+ padZero(d.getMinutes()) +
55
+ ':' +
56
+ padZero(d.getSeconds()));
46
57
  }
47
58
  export const ArrayTimeType = {
48
59
  ...TimeType,
@@ -7,7 +7,8 @@ export const TimestampType = {
7
7
  oid: DataTypeOIDs.timestamp,
8
8
  jsType: 'Date',
9
9
  parseBinary(v, options) {
10
- const fetchAsString = options.fetchAsString && options.fetchAsString.includes(DataTypeOIDs.timestamp);
10
+ const fetchAsString = options.fetchAsString &&
11
+ options.fetchAsString.includes(DataTypeOIDs.timestamp);
11
12
  const hi = v.readInt32BE();
12
13
  const lo = v.readUInt32BE(4);
13
14
  if (lo === 0xffffffff && hi === 0x7fffffff)
@@ -37,7 +38,9 @@ export const TimestampType = {
37
38
  if (!(v instanceof Date))
38
39
  v = new Date(v);
39
40
  // Postgresql ignores timezone data so we are
40
- let n = options.utcDates ? v.getTime() : v.getTime() - v.getTimezoneOffset() * 60 * 1000;
41
+ let n = options.utcDates
42
+ ? v.getTime()
43
+ : v.getTime() - v.getTimezoneOffset() * 60 * 1000;
41
44
  n = (n - timeShift) * 1000;
42
45
  const hi = Math.floor(n / timeMul);
43
46
  const lo = n - hi * timeMul;
@@ -45,14 +48,18 @@ export const TimestampType = {
45
48
  buf.writeUInt32BE(lo);
46
49
  },
47
50
  parseText(v, options) {
48
- if (options.fetchAsString && options.fetchAsString.includes(DataTypeOIDs.timestamp))
51
+ if (options.fetchAsString &&
52
+ options.fetchAsString.includes(DataTypeOIDs.timestamp))
49
53
  return v;
50
54
  return parseDateTime(v, true, false, options.utcDates);
51
55
  },
52
56
  isType(v) {
53
57
  return (v instanceof Date &&
54
58
  !(v.getFullYear() === 1970 && v.getMonth() === 0 && v.getDate() === 1) &&
55
- !(v.getHours() === 0 && v.getMinutes() === 0 && v.getSeconds() === 0 && v.getMilliseconds() === 0));
59
+ !(v.getHours() === 0 &&
60
+ v.getMinutes() === 0 &&
61
+ v.getSeconds() === 0 &&
62
+ v.getMilliseconds() === 0));
56
63
  },
57
64
  };
58
65
  function padZero(v) {
@@ -7,7 +7,8 @@ export const TimestamptzType = {
7
7
  oid: DataTypeOIDs.timestamptz,
8
8
  jsType: 'Date',
9
9
  parseBinary(v, options) {
10
- const fetchAsString = options.fetchAsString && options.fetchAsString.includes(DataTypeOIDs.timestamptz);
10
+ const fetchAsString = options.fetchAsString &&
11
+ options.fetchAsString.includes(DataTypeOIDs.timestamptz);
11
12
  const hi = v.readInt32BE();
12
13
  const lo = v.readUInt32BE(4);
13
14
  if (lo === 0xffffffff && hi === 0x7fffffff)
@@ -45,7 +46,8 @@ export const TimestamptzType = {
45
46
  },
46
47
  parseText(v, options) {
47
48
  const d = parseDateTime(v, true, true, options.utcDates);
48
- if (options.fetchAsString && options.fetchAsString.includes(DataTypeOIDs.timestamptz)) {
49
+ if (options.fetchAsString &&
50
+ options.fetchAsString.includes(DataTypeOIDs.timestamptz)) {
49
51
  if (d instanceof Date)
50
52
  return dateToTimestamptzString(d);
51
53
  if (d === Infinity)
@@ -150,13 +150,17 @@ function parseCopyData(io, code, len) {
150
150
  }
151
151
  function parseCopyResponse(io) {
152
152
  const out = {
153
- overallFormat: io.readUInt8() === 0 ? Protocol.DataFormat.text : Protocol.DataFormat.binary,
153
+ overallFormat: io.readUInt8() === 0
154
+ ? Protocol.DataFormat.text
155
+ : Protocol.DataFormat.binary,
154
156
  columnCount: io.readUInt16BE(),
155
157
  };
156
158
  if (out.columnCount) {
157
159
  out.columnFormats = [];
158
160
  for (let i = 0; i < out.columnCount; i++) {
159
- out.columnFormats.push(io.readUInt16BE() === 0 ? Protocol.DataFormat.text : Protocol.DataFormat.binary);
161
+ out.columnFormats.push(io.readUInt16BE() === 0
162
+ ? Protocol.DataFormat.text
163
+ : Protocol.DataFormat.binary);
160
164
  }
161
165
  }
162
166
  return out;
@@ -244,7 +248,9 @@ function parseRowDescription(io) {
244
248
  dataTypeId: io.readInt32BE(),
245
249
  fixedSize: io.readInt16BE(),
246
250
  modifier: io.readInt32BE(),
247
- format: io.readInt16BE() === 0 ? Protocol.DataFormat.text : Protocol.DataFormat.binary,
251
+ format: io.readInt16BE() === 0
252
+ ? Protocol.DataFormat.text
253
+ : Protocol.DataFormat.binary,
248
254
  };
249
255
  out.fields.push(field);
250
256
  }
@@ -4,9 +4,27 @@ import { stringifyArrayLiteral } from '../util/stringify-arrayliteral.js';
4
4
  import { Protocol } from './protocol.js';
5
5
  import { SmartBuffer } from './smart-buffer.js';
6
6
  const DataFormat = Protocol.DataFormat;
7
- const StaticFlushBuffer = Buffer.from([Protocol.FrontendMessageCode.Flush, 0x00, 0x00, 0x00, 0x04]);
8
- const StaticTerminateBuffer = Buffer.from([Protocol.FrontendMessageCode.Terminate, 0x00, 0x00, 0x00, 0x04]);
9
- const StaticSyncBuffer = Buffer.from([Protocol.FrontendMessageCode.Sync, 0x00, 0x00, 0x00, 0x04]);
7
+ const StaticFlushBuffer = Buffer.from([
8
+ Protocol.FrontendMessageCode.Flush,
9
+ 0x00,
10
+ 0x00,
11
+ 0x00,
12
+ 0x04,
13
+ ]);
14
+ const StaticTerminateBuffer = Buffer.from([
15
+ Protocol.FrontendMessageCode.Terminate,
16
+ 0x00,
17
+ 0x00,
18
+ 0x00,
19
+ 0x04,
20
+ ]);
21
+ const StaticSyncBuffer = Buffer.from([
22
+ Protocol.FrontendMessageCode.Sync,
23
+ 0x00,
24
+ 0x00,
25
+ 0x00,
26
+ 0x04,
27
+ ]);
10
28
  export class Frontend {
11
29
  constructor(options) {
12
30
  this._io = new SmartBuffer(options?.buffer);
@@ -29,7 +47,9 @@ export class Frontend {
29
47
  if (k !== 'client_encoding')
30
48
  io.writeCString(k, 'utf8').writeCString(v, 'utf8');
31
49
  }
32
- io.writeCString('client_encoding', 'utf8').writeCString('UTF8', 'utf8').writeUInt8(0);
50
+ io.writeCString('client_encoding', 'utf8')
51
+ .writeCString('UTF8', 'utf8')
52
+ .writeUInt8(0);
33
53
  return setLengthAndFlush(io, 0);
34
54
  }
35
55
  getPasswordMessage(password) {
@@ -86,7 +106,9 @@ export class Frontend {
86
106
  .writeCString(args.portal || '', 'utf8')
87
107
  .writeCString(args.statement || '', 'utf8');
88
108
  const { params, paramTypes, queryOptions } = args;
89
- const columnFormat = queryOptions.columnFormat != null ? queryOptions.columnFormat : DEFAULT_COLUMN_FORMAT;
109
+ const columnFormat = queryOptions.columnFormat != null
110
+ ? queryOptions.columnFormat
111
+ : DEFAULT_COLUMN_FORMAT;
90
112
  if (params && params.length) {
91
113
  io.writeInt16BE(params.length);
92
114
  const formatOffset = io.offset;
@@ -104,7 +126,8 @@ export class Frontend {
104
126
  const dataTypeOid = paramTypes ? paramTypes[i] : undefined;
105
127
  const dt = dataTypeOid ? args.typeMap.get(dataTypeOid) : undefined;
106
128
  if (dt) {
107
- if (typeof dt.encodeAsNull === 'function' && dt.encodeAsNull(v, queryOptions)) {
129
+ if (typeof dt.encodeAsNull === 'function' &&
130
+ dt.encodeAsNull(v, queryOptions)) {
108
131
  io.writeInt32BE(-1);
109
132
  continue;
110
133
  }
@@ -125,7 +148,9 @@ export class Frontend {
125
148
  io.buffer.writeInt32BE(io.length - dataOffset, dataOffset - 4); // Update length
126
149
  }
127
150
  else if (typeof dt.encodeText === 'function') {
128
- v = dt.elementsOID ? stringifyArrayLiteral(v, queryOptions, dt.encodeText) : dt.encodeText(v, queryOptions);
151
+ v = dt.elementsOID
152
+ ? stringifyArrayLiteral(v, queryOptions, dt.encodeText)
153
+ : dt.encodeText(v, queryOptions);
129
154
  io.writeLString(v, 'utf8');
130
155
  }
131
156
  }
@@ -163,7 +188,9 @@ export class Frontend {
163
188
  }
164
189
  getDescribeMessage(args) {
165
190
  if (args.name && args.name.length > 63) {
166
- throw new Error(args.type === 'P' ? 'Portal' : 'Statement name length must be lower than 63');
191
+ throw new Error(args.type === 'P'
192
+ ? 'Portal'
193
+ : 'Statement name length must be lower than 63');
167
194
  }
168
195
  const io = this._io
169
196
  .start()
@@ -174,7 +201,8 @@ export class Frontend {
174
201
  return setLengthAndFlush(io, 1);
175
202
  }
176
203
  getExecuteMessage(args) {
177
- if (args.fetchCount && (args.fetchCount < 0 || args.fetchCount > 4294967295)) {
204
+ if (args.fetchCount &&
205
+ (args.fetchCount < 0 || args.fetchCount > 4294967295)) {
178
206
  throw new Error('fetchCount can be between 0 and 4294967295');
179
207
  }
180
208
  const io = this._io
@@ -187,7 +215,9 @@ export class Frontend {
187
215
  }
188
216
  getCloseMessage(args) {
189
217
  if (args.name && args.name.length > 63) {
190
- throw new Error(args.type === 'P' ? 'Portal' : 'Statement name length must be lower than 63');
218
+ throw new Error(args.type === 'P'
219
+ ? 'Portal'
220
+ : 'Statement name length must be lower than 63');
191
221
  }
192
222
  const io = this._io
193
223
  .start()
@@ -153,7 +153,8 @@ export class PgSocket extends SafeEventEmitter {
153
153
  this._send(this._frontend.getSyncMessage());
154
154
  }
155
155
  capture(callback) {
156
- if (this._state === ConnectionState.CLOSING || this._state === ConnectionState.CLOSED) {
156
+ if (this._state === ConnectionState.CLOSING ||
157
+ this._state === ConnectionState.CLOSED) {
157
158
  return Promise.reject(new Error('Connection closed'));
158
159
  }
159
160
  if (this._state !== ConnectionState.READY)
@@ -275,7 +276,9 @@ export class PgSocket extends SafeEventEmitter {
275
276
  }
276
277
  _resolvePassword(cb) {
277
278
  (async () => {
278
- const pass = typeof this.options.password === 'function' ? await this.options.password() : this.options.password;
279
+ const pass = typeof this.options.password === 'function'
280
+ ? await this.options.password()
281
+ : this.options.password;
279
282
  cb(pass || '');
280
283
  })().catch(err => this._handleError(err));
281
284
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-bitwise */
2
1
  import crypto from 'crypto';
3
2
  export var SASL;
4
3
  (function (SASL) {
@@ -57,7 +56,8 @@ export var SASL;
57
56
  const serverKey = hmac(saltPass, SERVER_KEY);
58
57
  const serverSignatureBytes = hmac(serverKey, authMessage);
59
58
  session.serverSignature = serverSignatureBytes.toString('base64');
60
- session.clientFinalMessage = clientFinalMessageWithoutProof + ',p=' + clientProof;
59
+ session.clientFinalMessage =
60
+ clientFinalMessageWithoutProof + ',p=' + clientProof;
61
61
  }
62
62
  SASL.continueSession = continueSession;
63
63
  function finalizeSession(session, data) {
@@ -3,8 +3,7 @@ import { writeBigUInt64BE } from '../util/bigint-methods.js';
3
3
  import { BufferReader } from './buffer-reader.js';
4
4
  export class SmartBuffer extends BufferReader {
5
5
  constructor(cfg) {
6
- // @ts-ignore
7
- super(Buffer.allocUnsafe((cfg?.pageSize ? parseInt(cfg.pageSize, 10) : 0) || SmartBuffer.DEFAULT_PAGE_SIZE));
6
+ super(Buffer.allocUnsafe(cfg?.pageSize || SmartBuffer.DEFAULT_PAGE_SIZE));
8
7
  this._lastHouseKeep = 0;
9
8
  this._stMaxPages = 1;
10
9
  this._length = 0;
@@ -6,7 +6,7 @@ export class SafeEventEmitter extends EventEmitter {
6
6
  return false;
7
7
  return super.emit(event, ...args);
8
8
  }
9
- catch (ignored) {
9
+ catch {
10
10
  return false;
11
11
  }
12
12
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-bitwise */
2
1
  const big0 = BigInt(0);
3
2
  const beAnd = BigInt('0xffffffff');
4
3
  const big32 = BigInt(32);
@@ -12,7 +11,11 @@ export function readBigInt64BE(buf, offset = 0) {
12
11
  buf[++offset] * 2 ** 16 +
13
12
  buf[++offset] * 2 ** 8 +
14
13
  buf[++offset];
15
- return ((BigInt(val) << big32) + BigInt(buf[++offset] * 2 ** 24 + buf[++offset] * 2 ** 16 + buf[++offset] * 2 ** 8 + last));
14
+ return ((BigInt(val) << big32) +
15
+ BigInt(buf[++offset] * 2 ** 24 +
16
+ buf[++offset] * 2 ** 16 +
17
+ buf[++offset] * 2 ** 8 +
18
+ last));
16
19
  }
17
20
  export function writeBigUInt64BE(buf, value, offset = 0) {
18
21
  // @ts-ignore
@@ -1,4 +1,4 @@
1
- import merge from 'putil-merge';
1
+ import { merge } from '@jsopen/objects';
2
2
  import { configFromEnv } from './config-from-env.js';
3
3
  export function getConnectionConfig(config) {
4
4
  const cfg = configFromEnv();
@@ -23,7 +23,7 @@ export function parseConnectionString(str) {
23
23
  if (!str.includes('://'))
24
24
  str = 'postgres://' + str;
25
25
  const parsed = new URL(str);
26
- const getFirst = (v) => (typeof v === 'string' ? v : Array.isArray(v) ? v[0] : '');
26
+ const getFirst = (v) => typeof v === 'string' ? v : Array.isArray(v) ? v[0] : '';
27
27
  const cfg = {};
28
28
  cfg.host = decodeURI(parsed.hostname || '');
29
29
  if (parsed.port)
@@ -1,9 +1,7 @@
1
1
  // noinspection RegExpUnnecessaryNonCapturingGroup
2
2
  import { fastParseInt } from './fast-parseint.js';
3
3
  // noinspection RegExpUnnecessaryNonCapturingGroup
4
- const TIMESTAMP_PATTERN =
5
- // eslint-disable-next-line
6
- /^(\d{4})-?(0[1-9]|1[012])?-?([123]0|[012][1-9]|31)?(?:[T ]?([01][0-9]|2[0-3]):?([0-5][0-9]):?([0-5][0-9])?(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?)?$/;
4
+ const TIMESTAMP_PATTERN = /^(\d{4})-?(0[1-9]|1[012])?-?([123]0|[012][1-9]|31)?(?:[T ]?([01][0-9]|2[0-3]):?([0-5][0-9]):?([0-5][0-9])?(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?)?$/;
7
5
  const INFINITY_PATTERN = /^-?infinity$/;
8
6
  export function parseDateTime(str, parseTime, parseTimeZone, utc) {
9
7
  let m = str.match(TIMESTAMP_PATTERN);
@@ -13,7 +11,9 @@ export function parseDateTime(str, parseTime, parseTimeZone, utc) {
13
11
  return Number(str.replace('i', 'I'));
14
12
  return new Date('invalid');
15
13
  }
16
- const args = [1970, 0, 1, 0, 0, 0, 0];
14
+ const args = [
15
+ 1970, 0, 1, 0, 0, 0, 0,
16
+ ];
17
17
  const l = parseTime ? 7 : 3;
18
18
  for (let i = 0; i < l; i++) {
19
19
  const s = m[i + 1];
@@ -2,6 +2,7 @@ export function parseRow(parsers, row, options) {
2
2
  const l = row.length;
3
3
  let i;
4
4
  for (i = 0; i < l; i++) {
5
- row[i] = row[i] == null ? null : parsers[i].call(undefined, row[i], options);
5
+ row[i] =
6
+ row[i] == null ? null : parsers[i].call(undefined, row[i], options);
6
7
  }
7
8
  }
@@ -1,5 +1,4 @@
1
1
  import { fastParseInt } from './fast-parseint.js';
2
- // eslint-disable-next-line
3
2
  // noinspection RegExpUnnecessaryNonCapturingGroup
4
3
  export const STRICT_TIME_PATTERN = /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(?:\.(\d+))?(?:(Z)|(?:([+-])([01]?[0-9]|2[0-3]):?([0-5][0-9])?))?$/;
5
4
  // noinspection RegExpUnnecessaryNonCapturingGroup
@@ -8,7 +7,9 @@ export function parseTime(str, parseTimeZone, utc) {
8
7
  const m = str.match(TIME_PATTERN);
9
8
  if (!m)
10
9
  return new Date('invalid');
11
- const args = [1970, 0, 1, 0, 0, 0, 0];
10
+ const args = [
11
+ 1970, 0, 1, 0, 0, 0, 0,
12
+ ];
12
13
  for (let i = 1; i < 4; i++) {
13
14
  const s = m[i];
14
15
  args[i + 2] = fastParseInt(s) || 0;
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "postgrejs",
3
3
  "description": "Professional PostgreSQL client NodeJS",
4
- "version": "2.22.2",
4
+ "version": "2.22.4",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "doublylinked": "^2.5.4",
9
- "lightning-pool": "^4.10.0",
8
+ "@jsopen/objects": "^1.5.2",
9
+ "doublylinked": "^2.5.6",
10
+ "lightning-pool": "^4.10.1",
10
11
  "postgres-bytea": "^3.0.0",
11
12
  "power-tasks": "^1.11.0",
12
- "putil-merge": "^3.13.0",
13
13
  "putil-promisify": "^1.10.1",
14
14
  "putil-varhelpers": "^1.6.5",
15
15
  "tslib": "^2.8.1"
@@ -66,5 +66,8 @@
66
66
  "typescript",
67
67
  "ts",
68
68
  "esm"
69
- ]
69
+ ],
70
+ "publishConfig": {
71
+ "access": "public"
72
+ }
70
73
  }