Skip to content

Commit

Permalink
Improve node_compat warning for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenomitch committed Sep 19, 2024
1 parent fd68f6b commit 59888eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/wrangler/src/__tests__/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9157,7 +9157,7 @@ export default{
"info": "",
"out": "Total Upload: xx KiB / gzip: xx KiB
--dry-run: exiting now.",
"warn": "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mEnabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs.[0m
"warn": "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mYou are using `node_compat`, which is a legacy Node.js compatability option. Instead, use the `nodejs_compat` compatibility flag. This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs.[0m
",
}
Expand Down Expand Up @@ -9205,7 +9205,7 @@ export default{
"info": "",
"out": "Total Upload: xx KiB / gzip: xx KiB
--dry-run: exiting now.",
"warn": "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mEnabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs.[0m
"warn": "[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mYou are using `node_compat`, which is a legacy Node.js compatability option. Instead, use the `nodejs_compat` compatibility flag. This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs.[0m
",
}
Expand Down Expand Up @@ -9698,7 +9698,7 @@ export default{
"▲ [WARNING] \`--node-compat\` and \`--no-bundle\` can't be used together. If you want to polyfill Node.js built-ins and disable Wrangler's bundling, please polyfill as part of your own bundling process.
[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mEnabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs.[0m
[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mYou are using `node_compat`, which is a legacy Node.js compatability option. Instead, use the `nodejs_compat` compatibility flag. This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs.[0m
"
`);
Expand All @@ -9718,7 +9718,7 @@ export default{
"▲ [WARNING] \`--node-compat\` and \`--no-bundle\` can't be used together. If you want to polyfill Node.js built-ins and disable Wrangler's bundling, please polyfill as part of your own bundling process.
[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mEnabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs.[0m
[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mYou are using `node_compat`, which is a legacy Node.js compatability option. Instead, use the `nodejs_compat` compatibility flag. This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs.[0m
"
`);
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/deployment-bundle/node-compat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function getNodeCompatMode(

if (mode === "legacy") {
logger.warn(
"Enabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs."
"You are using `node_compat`, which is a legacy Node.js compatability option. Instead, use the `nodejs_compat` compatibility flag. This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs."
);
}

Expand Down

0 comments on commit 59888eb

Please sign in to comment.