Skip to content

Commit 33d74e2

Browse files
committed
Use node:util
1 parent 48b64e1 commit 33d74e2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ui/RealmBrowser/display.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//
1717
////////////////////////////////////////////////////////////////////////////
1818

19-
import util from 'util';
19+
import util from 'node:util';
2020

2121
export const displayObject = (
2222
object: Realm.Object | null,

src/utils/json.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { display as displayDataCell } from '../ui/RealmBrowser/Content/Table/types/DataCell';
2-
import { InspectOptions, inspect } from 'util';
2+
import { InspectOptions, inspect } from 'node:util';
33
// TODO: Investigate better solution.
44
const $REF_MATCHER =
55
/\s*\"\$ref[Id]*\" *: *(\"(.*?)\"(,|\s|)|\s*\{(.*?)\}(,|\s|))/g;
@@ -22,11 +22,11 @@ export const prettifiedInspect = (
2222
// If it is possible to serialize the object to a simpler structure with toJSON, do it.
2323
const simplifiedObject =
2424
// eslint-disable-next-line @typescript-eslint/no-explicit-any
25-
(object as any).toJSON != null ? (object as any).toJSON() : object;
25+
(object as any).toJSON != null ? (object as any) : object;
2626
return inspect(simplifiedObject, {
2727
compact: false,
2828
// TODO: Can potentially support higher depth if one can hide symbols properly.
29-
depth: 0,
29+
depth: 3,
3030
breakLength: 80,
3131
showHidden: false,
3232
...options,

0 commit comments

Comments
 (0)