Skip to content

Commit

Permalink
Make password property definitions consistent
Browse files Browse the repository at this point in the history
in formatting and configurability.
  • Loading branch information
charmander committed Jan 13, 2020
1 parent 410b89b commit 6df7511
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/pg-pool/index.js
Expand Up @@ -67,8 +67,8 @@ class Pool extends EventEmitter {
Object.defineProperty(this.options, 'password', {
configurable: true,
enumerable: false,
value: options.password,
writable: true
writable: true,
value: options.password
})
}

Expand Down
5 changes: 2 additions & 3 deletions packages/pg/lib/client.js
Expand Up @@ -33,12 +33,11 @@ var Client = function (config) {

// "hiding" the password so it doesn't show up in stack traces
// or if the client is console.logged
const password = this.connectionParameters.password
Object.defineProperty(this, 'password', {
configurable: true,
enumerable: false,
configurable: false,
writable: true,
value: password
value: this.connectionParameters.password
})

this.replication = this.connectionParameters.replication
Expand Down
5 changes: 2 additions & 3 deletions packages/pg/lib/connection-parameters.js
Expand Up @@ -57,12 +57,11 @@ var ConnectionParameters = function (config) {

// "hiding" the password so it doesn't show up in stack traces
// or if the client is console.logged
const password = val('password', config)
Object.defineProperty(this, 'password', {
configurable: true,
enumerable: false,
configurable: false,
writable: true,
value: password
value: val('password', config)
})

this.binary = val('binary', config)
Expand Down

0 comments on commit 6df7511

Please sign in to comment.