From 0bdb04b03803872d07ff86900089c745087e4005 Mon Sep 17 00:00:00 2001 From: Link1515 Date: Thu, 26 Dec 2024 16:44:49 +0800 Subject: [PATCH] fix(yaml-viewer): prevent large integers from being converted to exponential notation by enabling inAsBigInt config --- src/tools/yaml-viewer/yaml-models.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/yaml-viewer/yaml-models.ts b/src/tools/yaml-viewer/yaml-models.ts index 54569db8..e07f2817 100644 --- a/src/tools/yaml-viewer/yaml-models.ts +++ b/src/tools/yaml-viewer/yaml-models.ts @@ -13,7 +13,7 @@ function formatYaml({ sortKeys?: MaybeRef indentSize?: MaybeRef }) { - const parsedYaml = yaml.parse(get(rawYaml)); + const parsedYaml = yaml.parse(get(rawYaml), { intAsBigInt: true }); const formattedYAML = yaml.stringify(parsedYaml, { sortMapEntries: get(sortKeys),