pg 8.16.1 → 8.16.3

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/client.js CHANGED
@@ -323,7 +323,7 @@ class Client extends EventEmitter {
323
323
  this._pulseQueryQueue()
324
324
  }
325
325
 
326
- // if we receieve an error event or error message
326
+ // if we receive an error event or error message
327
327
  // during the connection process we handle it here
328
328
  _handleErrorWhileConnecting(err) {
329
329
  if (this._connectionError) {
@@ -19,7 +19,7 @@ const NativeQuery = (module.exports = function (config, values, callback) {
19
19
  // then emit them as they come in
20
20
  // without setting singleRowMode to true
21
21
  // this has almost no meaning because libpq
22
- // reads all rows into memory befor returning any
22
+ // reads all rows into memory before returning any
23
23
  this._emitRowEvents = false
24
24
  this.on(
25
25
  'newListener',
package/lib/query.js CHANGED
@@ -112,7 +112,7 @@ class Query extends EventEmitter {
112
112
  // if a named prepared statement is created with empty query text
113
113
  // the backend will send an emptyQuery message but *not* a command complete message
114
114
  // since we pipeline sync immediately after execute we don't need to do anything here
115
- // unless we have rows specified, in which case we did not pipeline the intial sync call
115
+ // unless we have rows specified, in which case we did not pipeline the initial sync call
116
116
  handleEmptyQuery(connection) {
117
117
  if (this.rows) {
118
118
  connection.sync()
package/lib/result.js CHANGED
@@ -66,7 +66,8 @@ class Result {
66
66
  const rawValue = rowData[i]
67
67
  const field = this.fields[i].name
68
68
  if (rawValue !== null) {
69
- row[field] = this._parsers[i](rawValue)
69
+ const v = this.fields[i].format === 'binary' ? Buffer.from(rawValue) : rawValue
70
+ row[field] = this._parsers[i](v)
70
71
  } else {
71
72
  row[field] = null
72
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg",
3
- "version": "8.16.1",
3
+ "version": "8.16.3",
4
4
  "description": "PostgreSQL client - pure javascript & libpq with the same API",
5
5
  "keywords": [
6
6
  "database",
@@ -28,16 +28,13 @@
28
28
  "./package.json": {
29
29
  "default": "./package.json"
30
30
  },
31
- "./lib/*": {
32
- "import": "./lib/*",
33
- "require": "./lib/*",
34
- "default": "./lib/*"
35
- }
31
+ "./lib/*": "./lib/*.js",
32
+ "./lib/*.js": "./lib/*.js"
36
33
  },
37
34
  "dependencies": {
38
35
  "pg-connection-string": "^2.9.1",
39
36
  "pg-pool": "^3.10.1",
40
- "pg-protocol": "^1.10.1",
37
+ "pg-protocol": "^1.10.3",
41
38
  "pg-types": "2.2.0",
42
39
  "pgpass": "1.0.5"
43
40
  },
@@ -53,7 +50,7 @@
53
50
  "wrangler": "^3.x"
54
51
  },
55
52
  "optionalDependencies": {
56
- "pg-cloudflare": "^1.2.6"
53
+ "pg-cloudflare": "^1.2.7"
57
54
  },
58
55
  "peerDependencies": {
59
56
  "pg-native": ">=3.0.1"
@@ -75,5 +72,5 @@
75
72
  "engines": {
76
73
  "node": ">= 16.0.0"
77
74
  },
78
- "gitHead": "cd877a57612a39335a97b593111710d26126279d"
75
+ "gitHead": "8f8e7315e8f7c1bb01e98fdb41c8c92585510782"
79
76
  }