Skip to content

Commit 7f88235

Browse files
committed
make auth parameters optional
1 parent c93d57a commit 7f88235

File tree

5 files changed

+38
-35
lines changed

5 files changed

+38
-35
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33

4+
##### 1.6.7 (2018-09-26)
5+
- Polish: make authorization parameters in connection URL optional.
6+
7+
48
##### 1.6.6 (2018-09-26)
59
- Fix: ensure that DeprecationWarning regarding Buffer constructor usage is removed.
610
- Polish: ensure that `client_min_messages` is set before attempting to create tables for each client.

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter {
7373
else {
7474
if (!connection) {
7575
const params = url.parse(options.url, true)
76-
const auth = params.auth.split(':')
76+
const auth = params.auth ? params.auth.split(':') : []
7777
const user = auth[0]
7878
const password = auth[1]
7979
const database = params.pathname.split('/')[1]

package-lock.json

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fortune-postgres",
33
"description": "Postgres adapter for Fortune.",
4-
"version": "1.6.6",
4+
"version": "1.6.7",
55
"license": "MIT",
66
"repository": {
77
"type": "git",
@@ -20,9 +20,9 @@
2020
"pg-native": "^3.0.0"
2121
},
2222
"devDependencies": {
23-
"eslint": "^5.5.0",
23+
"eslint": "^5.6.0",
2424
"eslint-config-boss": "^1.0.6",
25-
"fortune": "^5.4.6",
25+
"fortune": "^5.5.2",
2626
"mkdirp": "^0.5.1",
2727
"rimraf": "^2.6.2",
2828
"tapdance": "^5.1.0"

test/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const adapter = require('../lib')
33

44
testAdapter(adapter, {
55
url: 'postgres://postgres@localhost:5432/fortune_test',
6-
isNative: true,
76
primaryKeyType: 'integer',
87
useForeignKeys: true,
98
// isNative: true,

0 commit comments

Comments
 (0)