Skip to content

Commit

Permalink
Merge pull request #1359 from dhensby/pulls/rm-deprecated-props
Browse files Browse the repository at this point in the history
Remove deprecated pool properties
  • Loading branch information
dhensby authored Jan 30, 2022
2 parents beea78a + 8227434 commit 567c2de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ v8.0.0 (2022-??-??)
[change] Duplicate column names will now be presented as an array even if the values are empty ((#1240)[https://github.com/tediousjs/node-mssql/pull/1240])
[change] Update tarn pool dependency ((#1344)[https://github.com/tediousjs/node-mssql/pull/1344])
[removed] Remove connection string parser helpers ((#1342)[https://github.com/tediousjs/node-mssql/pull/1342])
[removed] Remove deprecated pool properties ((#1359)[https://github.com/tediousjs/node-mssql/pull/1359])

v7.2.1 (2021-08-19)
-------------------
Expand Down
35 changes: 0 additions & 35 deletions lib/base/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,41 +388,6 @@ class ConnectionPool extends EventEmitter {
propagateCreateError: true
}, this.config.pool)
)
const self = this
Object.defineProperties(this.pool, {
size: {
get: () => {
const message = 'the `size` property on pool is deprecated, access it directly on the `ConnectionPool`'
self.emit('debug', message)
process.emitWarning(message)
return self.size
}
},
available: {
get: () => {
const message = 'the `available` property on pool is deprecated, access it directly on the `ConnectionPool`'
self.emit('debug', message)
process.emitWarning(message)
return self.available
}
},
pending: {
get: () => {
const message = 'the `pending` property on pool is deprecate, access it directly on the `ConnectionPool`'
self.emit('debug', message)
process.emitWarning(message)
return self.pending
}
},
borrowed: {
get: () => {
const message = 'the `borrowed` property on pool is deprecated, access it directly on the `ConnectionPool`'
self.emit('debug', message)
process.emitWarning(message)
return self.borrowed
}
}
})

this._connecting = false
this._connected = true
Expand Down

0 comments on commit 567c2de

Please sign in to comment.