mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 15:33:56 +08:00
refactor(doctor): share the runtime check result (#17361)
This commit is contained in:
@@ -226,28 +226,23 @@ export const nodeCheck = ({
|
||||
remediation: `Install ${SUPPORTED_NODE_VERSION_PROSE}.`,
|
||||
classification: "missing_dependency",
|
||||
} as const;
|
||||
if (runtime.id === "node")
|
||||
return {
|
||||
...check(
|
||||
"node",
|
||||
supportsJavaScriptRuntime(runtime),
|
||||
runtime.version,
|
||||
failure,
|
||||
),
|
||||
details: { runtime: "node", version: runtime.version },
|
||||
};
|
||||
const isNode = runtime.id === "node";
|
||||
return {
|
||||
...check(
|
||||
"node",
|
||||
supportsJavaScriptRuntime(runtime),
|
||||
`Bun ${runtime.version} (Node.js ${runtime.nodeCompatibilityVersion} compatibility)`,
|
||||
isNode
|
||||
? runtime.version
|
||||
: `Bun ${runtime.version} (Node.js ${runtime.nodeCompatibilityVersion} compatibility)`,
|
||||
failure,
|
||||
),
|
||||
details: {
|
||||
runtime: "bun",
|
||||
version: runtime.version,
|
||||
node_compatibility_version: runtime.nodeCompatibilityVersion,
|
||||
},
|
||||
details: isNode
|
||||
? { runtime: "node", version: runtime.version }
|
||||
: {
|
||||
runtime: "bun",
|
||||
version: runtime.version,
|
||||
node_compatibility_version: runtime.nodeCompatibilityVersion,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user