












@@ -12,10 +12,10 @@
12121313import fs from "node:fs";
1414import path from "node:path";
15-import JSON5 from "json5";
1615import { canUseRootFileOpen, openRootFileSync } from "../infra/boundary-file-read.js";
1716import { isPathInside } from "../security/scan-paths.js";
1817import { isPlainObject } from "../utils.js";
18+import { parseJsonWithJson5Fallback } from "../utils/parse-json-compat.js";
1919import { isBlockedObjectKey } from "./prototype-keys.js";
20202121export const INCLUDE_KEY = "$include";
@@ -421,7 +421,7 @@ const defaultResolver: IncludeResolver = {
421421readFile: (p) => fs.readFileSync(p, "utf-8"),
422422readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) =>
423423readConfigIncludeFileWithGuards({ includePath, resolvedPath, rootRealDir }),
424-parseJson: (raw) => JSON5.parse(raw),
424+parseJson: parseJsonWithJson5Fallback,
425425};
426426427427/**
此內容由慣性聚合(RSS閱讀器)自動聚合整理,僅供閱讀參考。 原文來自 — 版權歸原作者所有。