Socket
Socket
Sign inDemoInstall

pg

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg - npm Package Compare versions

Comparing version 8.4.2 to 8.5.0

18

lib/connection.js

@@ -79,8 +79,14 @@ 'use strict'

var tls = require('tls')
const options = Object.assign(
{
socket: self.stream,
},
self.ssl
)
const options = {
socket: self.stream,
}
if (self.ssl !== true) {
Object.assign(options, self.ssl)
if ('key' in self.ssl) {
options.key = self.ssl.key
}
}
if (net.isIP(host) === 0) {

@@ -87,0 +93,0 @@ options.servername = host

@@ -43,5 +43,2 @@ 'use strict'

}
/* eslint-disable no-console */
console.error(err.message)
/* eslint-enable no-console */
}

@@ -48,0 +45,0 @@

@@ -200,18 +200,18 @@ 'use strict'

if (this.values) {
try {
this.values = this.values.map(utils.prepareValue)
} catch (err) {
this.handleError(err, connection)
return
}
// because we're mapping user supplied values to
// postgres wire protocol compatible values it could
// throw an exception, so try/catch this section
try {
connection.bind({
portal: this.portal,
statement: this.name,
values: this.values,
binary: this.binary,
valueMapper: utils.prepareValue,
})
} catch (err) {
this.handleError(err, connection)
return
}
connection.bind({
portal: this.portal,
statement: this.name,
values: this.values,
binary: this.binary,
})
connection.describe({

@@ -218,0 +218,0 @@ type: 'P',

@@ -41,2 +41,6 @@ 'use strict'

var prepareValue = function (val, seen) {
// null and undefined are both null for postgres
if (val == null) {
return null
}
if (val instanceof Buffer) {

@@ -62,5 +66,2 @@ return val

}
if (val === null || typeof val === 'undefined') {
return null
}
if (typeof val === 'object') {

@@ -67,0 +68,0 @@ return prepareObject(val, seen)

{
"name": "pg",
"version": "8.4.2",
"version": "8.5.0",
"description": "PostgreSQL client - pure javascript & libpq with the same API",

@@ -26,3 +26,3 @@ "keywords": [

"pg-pool": "^3.2.2",
"pg-protocol": "^1.3.0",
"pg-protocol": "^1.4.0",
"pg-types": "^2.1.0",

@@ -56,3 +56,3 @@ "pgpass": "1.x"

},
"gitHead": "b6d69d5bc2eb7df4f4e04bc864b133b795c76a7f"
"gitHead": "ec1dcab966ecb03080e75112f6d3623d1360b634"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc