Skip to content

Commit e8080cf

Browse files
committed
Make password property definitions consistent
in formatting and configurability.
1 parent 5912641 commit e8080cf

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

packages/pg-pool/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class Pool extends EventEmitter {
6767
Object.defineProperty(this.options, 'password', {
6868
configurable: true,
6969
enumerable: false,
70-
value: options.password,
71-
writable: true
70+
writable: true,
71+
value: options.password
7272
})
7373
}
7474

packages/pg/lib/client.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ var Client = function (config) {
3333

3434
// "hiding" the password so it doesn't show up in stack traces
3535
// or if the client is console.logged
36-
const password = this.connectionParameters.password
3736
Object.defineProperty(this, 'password', {
37+
configurable: true,
3838
enumerable: false,
39-
configurable: false,
4039
writable: true,
41-
value: password
40+
value: this.connectionParameters.password
4241
})
4342

4443
this.replication = this.connectionParameters.replication

packages/pg/lib/connection-parameters.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ var ConnectionParameters = function (config) {
5757

5858
// "hiding" the password so it doesn't show up in stack traces
5959
// or if the client is console.logged
60-
const password = val('password', config)
6160
Object.defineProperty(this, 'password', {
61+
configurable: true,
6262
enumerable: false,
63-
configurable: false,
6463
writable: true,
65-
value: password
64+
value: val('password', config)
6665
})
6766

6867
this.binary = val('binary', config)

0 commit comments

Comments
 (0)