chore(deps): upgrade typescript, vitest, and MCP SDK to latest (#633)
typescript 5.9.3 to 7.0.2, vitest 4.1.10 to 5.0.3 (plus @vitest/coverage-v8 and @fast-check/vitest 0.5.0 for peer compat), @Modelcontextprotocol/client and server 2.0.0 to 2.3.1. Migrate the removed describe.sequential to concurrent:false and regenerate package metadata and product catalog. Also restore byte-faithful reads in parseCliJsonInput: the safeJson migration dropped the fatal UTF-8 check from #613. Vitest 5 requires Node 22/24/26+, so verify on Node 24 (repo-pinned toolchain).
This commit is contained in:
+6
-4
@@ -17,10 +17,12 @@ export const parseCliJsonInput = async (
|
||||
if (["{", "["].includes(value.trimStart()[0] ?? ""))
|
||||
return { ok: false, error: inputError(operation) };
|
||||
try {
|
||||
const decoded = safeParseJson(await readFile(value, "utf8"));
|
||||
return decoded.ok
|
||||
? { ok: true, value: decoded.value }
|
||||
: jsonFileError(value, operation, "invalid-json");
|
||||
// Read raw bytes so invalid UTF-8 is rejected by parseJson instead of
|
||||
// being silently replaced by lossy "utf8" decoding.
|
||||
const parsed = parseJson(await readFile(value));
|
||||
return parsed === undefined
|
||||
? jsonFileError(value, operation, "invalid-json")
|
||||
: { ok: true, value: parsed };
|
||||
} catch (cause: unknown) {
|
||||
return jsonFileError(value, operation, "read-failed", cause);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user