mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 15:33:11 +01:00
🐛 Replace jsonBigint with lossless-json (#2006)
This commit is contained in:
parent
484f6ef0c1
commit
920c490548
15
package-lock.json
generated
15
package-lock.json
generated
@ -19,7 +19,8 @@
|
||||
"packages/bruno-graphql-docs"
|
||||
],
|
||||
"dependencies": {
|
||||
"json-bigint": "^1.0.0"
|
||||
"json-bigint": "^1.0.0",
|
||||
"lossless-json": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@faker-js/faker": "^7.6.0",
|
||||
@ -12471,6 +12472,11 @@
|
||||
"loose-envify": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/lossless-json": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-4.0.1.tgz",
|
||||
"integrity": "sha512-l0L+ppmgPDnb+JGxNLndPtJZGNf6+ZmVaQzoxQm3u6TXmhdnsA+YtdVR8DjzZd/em58686CQhOFDPewfJ4l7MA=="
|
||||
},
|
||||
"node_modules/loupe": {
|
||||
"version": "2.3.7",
|
||||
"license": "MIT",
|
||||
@ -19676,7 +19682,7 @@
|
||||
},
|
||||
"packages/bruno-electron": {
|
||||
"name": "bruno",
|
||||
"version": "v1.11.0",
|
||||
"version": "v1.12.3",
|
||||
"dependencies": {
|
||||
"@aws-sdk/credential-providers": "3.525.0",
|
||||
"@usebruno/common": "0.1.0",
|
||||
@ -30815,6 +30821,11 @@
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
}
|
||||
},
|
||||
"lossless-json": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-4.0.1.tgz",
|
||||
"integrity": "sha512-l0L+ppmgPDnb+JGxNLndPtJZGNf6+ZmVaQzoxQm3u6TXmhdnsA+YtdVR8DjzZd/em58686CQhOFDPewfJ4l7MA=="
|
||||
},
|
||||
"loupe": {
|
||||
"version": "2.3.7",
|
||||
"requires": {
|
||||
|
@ -47,10 +47,12 @@
|
||||
"test:prettier:web": "npm run test:prettier --workspace=packages/bruno-app",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
|
||||
"overrides": {
|
||||
"rollup": "3.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"json-bigint": "^1.0.0"
|
||||
"json-bigint": "^1.0.0",
|
||||
"lossless-json": "^4.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import { humanizeRequestBodyMode } from 'utils/collections';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
import { updateRequestBody } from 'providers/ReduxStore/slices/collections/index';
|
||||
import { toastError } from 'utils/common/error';
|
||||
import jsonBigint from 'json-bigint';
|
||||
import { parse, stringify } from 'lossless-json';
|
||||
|
||||
const RequestBodyMode = ({ item, collection }) => {
|
||||
const dispatch = useDispatch();
|
||||
@ -38,8 +38,8 @@ const RequestBodyMode = ({ item, collection }) => {
|
||||
const onPrettify = () => {
|
||||
if (body?.json && bodyMode === 'json') {
|
||||
try {
|
||||
const bodyJson = jsonBigint.parse(body.json);
|
||||
const prettyBodyJson = jsonBigint.stringify(bodyJson, null, 2);
|
||||
const bodyJson = parse(body.json);
|
||||
const prettyBodyJson = stringify(bodyJson, null, 2);
|
||||
dispatch(
|
||||
updateRequestBody({
|
||||
content: prettyBodyJson,
|
||||
|
Loading…
Reference in New Issue
Block a user