diff --git a/package-lock.json b/package-lock.json index 2a4c8483..912dc60f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,17 @@ { "name": "vscode-db2i", - "version": "1.8.0", + "version": "1.8.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-db2i", - "version": "1.8.0", + "version": "1.8.3", "dependencies": { "@ibm/mapepire-js": "^0.3.0", "chart.js": "^4.4.2", "csv": "^6.1.3", + "json-bigint": "^1.0.0", "json-to-markdown-table": "^1.0.0", "lru-cache": "^6.0.0", "node-fetch": "^3.3.1", @@ -1967,6 +1968,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/@ibm/mapepire-js/-/mapepire-js-0.3.0.tgz", "integrity": "sha512-okub91ElPMU8A2Sm6lsn+AyWV2RLEp0QQnUjIdLeONHu+ZWBmWrIE4gFESbMma8+qhPTco76DNMdrihpwB5gnQ==", + "license": "Apache-2.0", "dependencies": { "ws": "^8.16.0" }, @@ -4850,6 +4852,15 @@ "node": "*" } }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", @@ -8599,6 +8610,15 @@ } } }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/json-bignum": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/json-bignum/-/json-bignum-0.0.3.tgz", diff --git a/package.json b/package.json index c94b8fc1..d7d3a67f 100644 --- a/package.json +++ b/package.json @@ -1343,6 +1343,7 @@ "@ibm/mapepire-js": "^0.3.0", "chart.js": "^4.4.2", "csv": "^6.1.3", + "json-bigint": "^1.0.0", "json-to-markdown-table": "^1.0.0", "lru-cache": "^6.0.0", "node-fetch": "^3.3.1", diff --git a/src/connection/sqlJob.ts b/src/connection/sqlJob.ts index e8de01f0..c0fcb803 100644 --- a/src/connection/sqlJob.ts +++ b/src/connection/sqlJob.ts @@ -5,6 +5,7 @@ import { SQLJob } from "@ibm/mapepire-js"; import { ConnectionResult, JobStatus, QueryResult, ServerRequest, ServerResponse } from "@ibm/mapepire-js/dist/src/types"; import { JobLogEntry } from "./types"; import Statement from "../database/statement"; +import JSONbig from "json-bigint"; const DB2I_VERSION = (process.env[`DB2I_VERSION`] || ``) + ((process.env.DEV) ? ``:`-dev`); @@ -73,7 +74,7 @@ export class OldSQLJob extends SQLJob { outString = ``; if (this.isTracingChannelData) ServerComponent.writeOutput(thisMsg); try { - let response: ServerResponse = JSON.parse(thisMsg); + let response: ServerResponse = JSONbig.parse(thisMsg); this.responseEmitter.emit(response.id, response); } catch (e: any) { console.log(`Error: ` + e);