Skip to content

Commit

Permalink
PR review udpdates
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Aug 21, 2024
1 parent 4c14643 commit 569679a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/wrangler/src/deployment-bundle/node-compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export function getNodeCompatMode({
compatibility_flags,
node_compat,
}: Pick<Config, "compatibility_flags" | "node_compat">) {
const legacy = node_compat === true;
const nodejsCompat = compatibility_flags.includes("nodejs_compat");
const nodejsCompatV2 = compatibility_flags.includes("nodejs_compat_v2");

Expand All @@ -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,
Expand Down

0 comments on commit 569679a

Please sign in to comment.