Skip to content

Commit

Permalink
Merge pull request #62 from iway1/bugfix/bigint-responses
Browse files Browse the repository at this point in the history
now uses json-bigint for stringifying result
  • Loading branch information
iway1 authored Apr 7, 2023
2 parents 7eeb913 + 7fb8fc1 commit d9227e9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/trpc-panel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@trpc/react-query": "10.2.0",
"@trpc/server": "10.2.0",
"@types/jest": "^29.2.4",
"@types/json-bigint": "^1.0.1",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"ajv": "^8.11.2",
Expand All @@ -63,6 +64,7 @@
"gulp-inline-source": "^4.0.0",
"gulp-replace": "^1.1.3",
"jest": "^29.3.1",
"json-bigint": "^1.0.0",
"postcss": "^8.4.19",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { Response } from "./Response";
import json from "json-bigint";

export function RequestResult({ result }: { result: any }) {
return <Response>{`${JSON.stringify(result, null, 2)}`}</Response>;
return <Response>{`${json.stringify(result, null, 2)}`}</Response>;
}
17 changes: 17 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,11 @@
expect "^29.0.0"
pretty-format "^29.0.0"

"@types/json-bigint@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@types/json-bigint/-/json-bigint-1.0.1.tgz#201062a6990119a8cc18023cfe1fed12fc2fc8a7"
integrity sha512-zpchZLNsNuzJHi6v64UBoFWAvQlPhch7XAi36FkH6tL1bbbmimIF+cS7vwkzY4u5RaSWMoflQfu+TshMPPw8uw==

"@types/json-schema@*", "@types/json-schema@^7.0.9":
version "7.0.11"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
Expand Down Expand Up @@ -2198,6 +2203,11 @@ basic-auth@~2.0.1:
dependencies:
safe-buffer "5.1.2"

bignumber.js@^9.0.0:
version "9.1.1"
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6"
integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==

binary-extensions@^1.0.0:
version "1.13.1"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
Expand Down Expand Up @@ -5665,6 +5675,13 @@ jsesc@^2.5.1:
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==

json-bigint@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1"
integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==
dependencies:
bignumber.js "^9.0.0"

json-parse-even-better-errors@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
Expand Down

0 comments on commit d9227e9

Please sign in to comment.