Skip to content

Commit 800027b

Browse files
BrandonNoaddhensby
authored andcommitted
feat!: remove config object cloning to fix TokenCredential issues
BREAKING CHANGE: Config objects are not longer cloned by the library. The objects are intended to be readonly and that no modification happens to them during the lifetime of the process, changing these values will result in undefined behaviour.
1 parent 25cc5ff commit 800027b

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

lib/base/connection-pool.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const tarn = require('tarn')
77
const { IDS } = require('../utils')
88
const ConnectionError = require('../error/connection-error')
99
const shared = require('../shared')
10-
const clone = require('rfdc/default')
1110
const { MSSQLError } = require('../error')
1211

1312
/**
@@ -53,7 +52,7 @@ class ConnectionPool extends EventEmitter {
5352
throw ex
5453
}
5554
} else {
56-
this.config = clone(config)
55+
this.config = config
5756
}
5857

5958
// set defaults

package-lock.json

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

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"@tediousjs/connection-string": "^0.6.0",
3838
"commander": "^11.0.0",
3939
"debug": "^4.3.3",
40-
"rfdc": "^1.3.0",
4140
"tarn": "^3.0.2",
4241
"tedious": "^19.0.0"
4342
},

0 commit comments

Comments
 (0)