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 7.0.2 to 7.1.0

SPONSORS.md

6

CHANGELOG.md

@@ -7,2 +7,8 @@ All major and minor releases are briefly explained below.

### 7.1.0
#### Enhancements
- [You can now supply both a connection string and additional config options to clients.](https://github.com/brianc/node-postgres/pull/1363)
### 7.0.0

@@ -9,0 +15,0 @@

11

lib/connection-parameters.js

@@ -14,2 +14,4 @@ 'use strict'

var parse = require('pg-connection-string').parse // parses a connection string
var val = function (key, config, envVar) {

@@ -29,5 +31,2 @@ if (envVar === undefined) {

// parses a connection string
var parse = require('pg-connection-string').parse
var useSsl = function () {

@@ -48,8 +47,10 @@ switch (process.env.PGSSLMODE) {

// if a string is passed, it is a raw connection string so we parse it into a config
config = typeof config === 'string' ? parse(config) : (config || {})
config = typeof config === 'string' ? parse(config) : config || {}
// if the config has a connectionString defined, parse IT into the config we use
// this will override other default values with what is stored in connectionString
if (config.connectionString) {
config = parse(config.connectionString)
config = Object.assign({}, config, parse(config.connectionString))
}
this.user = val('user', config)

@@ -56,0 +57,0 @@ this.database = val('database', config)

@@ -18,6 +18,3 @@ 'use strict'

var BoundPool = function (options) {
var config = { Client: Client }
for (var key in options) {
config[key] = options[key]
}
var config = Object.assign({ Client: Client }, options)
return new Pool(config)

@@ -24,0 +21,0 @@ }

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

@@ -5,0 +5,0 @@ "keywords": [

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