From e5a922bb09c4fa4c17997e4195b9f721dbd4ce4d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 13 Mar 2019 12:09:18 -0400 Subject: [PATCH] Update bignumber.js to 6.0.0 --- Changes.md | 1 + lib/protocol/Parser.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changes.md b/Changes.md index 608343a44..2b9673659 100644 --- a/Changes.md +++ b/Changes.md @@ -12,6 +12,7 @@ you spot any mistakes. * Remove special case for handshake in determine packet code * Small performance improvement starting command sequence * Support Node.js 11.x +* Update `bignumber.js` to 6.0.0 ## v2.16.0 (2018-07-17) diff --git a/lib/protocol/Parser.js b/lib/protocol/Parser.js index b941abcc7..e72555f2e 100644 --- a/lib/protocol/Parser.js +++ b/lib/protocol/Parser.js @@ -200,7 +200,7 @@ Parser.prototype.parseLengthCodedNumber = function parseLengthCodedNumber() { var value; if (high >>> 21) { - value = (new BigNumber(low)).plus((new BigNumber(MUL_32BIT)).times(high)).toString(); + value = BigNumber(MUL_32BIT).times(high).plus(low).toString(); if (this._supportBigNumbers) { return value; diff --git a/package.json b/package.json index 7a920d15b..cbe27b202 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ ], "repository": "mysqljs/mysql", "dependencies": { - "bignumber.js": "4.1.0", + "bignumber.js": "6.0.0", "readable-stream": "2.3.6", "safe-buffer": "5.1.2", "sqlstring": "2.3.1"