Skip to content

Commit d9227e9

Browse files
authored
Merge pull request #62 from iway1/bugfix/bigint-responses
now uses json-bigint for stringifying result
2 parents 7eeb913 + 7fb8fc1 commit d9227e9

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

packages/trpc-panel/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@trpc/react-query": "10.2.0",
5454
"@trpc/server": "10.2.0",
5555
"@types/jest": "^29.2.4",
56+
"@types/json-bigint": "^1.0.1",
5657
"@types/react": "^18.0.21",
5758
"@types/react-dom": "^18.0.6",
5859
"ajv": "^8.11.2",
@@ -63,6 +64,7 @@
6364
"gulp-inline-source": "^4.0.0",
6465
"gulp-replace": "^1.1.3",
6566
"jest": "^29.3.1",
67+
"json-bigint": "^1.0.0",
6668
"postcss": "^8.4.19",
6769
"react": "18.2.0",
6870
"react-dom": "18.2.0",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import { Response } from "./Response";
3+
import json from "json-bigint";
34

45
export function RequestResult({ result }: { result: any }) {
5-
return <Response>{`${JSON.stringify(result, null, 2)}`}</Response>;
6+
return <Response>{`${json.stringify(result, null, 2)}`}</Response>;
67
}

yarn.lock

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,11 @@
14161416
expect "^29.0.0"
14171417
pretty-format "^29.0.0"
14181418

1419+
"@types/json-bigint@^1.0.1":
1420+
version "1.0.1"
1421+
resolved "https://registry.yarnpkg.com/@types/json-bigint/-/json-bigint-1.0.1.tgz#201062a6990119a8cc18023cfe1fed12fc2fc8a7"
1422+
integrity sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==
1423+
14191424
"@types/json-schema@*", "@types/json-schema@^7.0.9":
14201425
version "7.0.11"
14211426
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
@@ -2198,6 +2203,11 @@ basic-auth@~2.0.1:
21982203
dependencies:
21992204
safe-buffer "5.1.2"
22002205

2206+
bignumber.js@^9.0.0:
2207+
version "9.1.1"
2208+
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6"
2209+
integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==
2210+
22012211
binary-extensions@^1.0.0:
22022212
version "1.13.1"
22032213
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
@@ -5665,6 +5675,13 @@ jsesc@^2.5.1:
56655675
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
56665676
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
56675677

5678+
json-bigint@^1.0.0:
5679+
version "1.0.0"
5680+
resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1"
5681+
integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==
5682+
dependencies:
5683+
bignumber.js "^9.0.0"
5684+
56685685
json-parse-even-better-errors@^2.3.0:
56695686
version "2.3.1"
56705687
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"

0 commit comments

Comments
 (0)