From 569679a0be9ba4272cde7c2272d83e4802a11bfe Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 21 Aug 2024 15:34:32 +0100 Subject: [PATCH] PR review udpdates --- packages/wrangler/src/deployment-bundle/node-compat.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/wrangler/src/deployment-bundle/node-compat.ts b/packages/wrangler/src/deployment-bundle/node-compat.ts index 34a088f69685..987e9da59518 100644 --- a/packages/wrangler/src/deployment-bundle/node-compat.ts +++ b/packages/wrangler/src/deployment-bundle/node-compat.ts @@ -78,6 +78,7 @@ export function getNodeCompatMode({ compatibility_flags, node_compat, }: Pick) { + const legacy = node_compat === true; const nodejsCompat = compatibility_flags.includes("nodejs_compat"); const nodejsCompatV2 = compatibility_flags.includes("nodejs_compat_v2"); @@ -86,14 +87,14 @@ export function getNodeCompatMode({ mode = "v2"; } else if (nodejsCompat) { mode = "v1"; - } else if (node_compat) { + } else if (legacy) { mode = "legacy"; } else { mode = null; } return { - legacy: node_compat === true, + legacy, mode, nodejsCompat, nodejsCompatV2,