diff --git a/.changeset/witty-eggs-reply.md b/.changeset/witty-eggs-reply.md new file mode 100644 index 000000000000..8cd94736fbd0 --- /dev/null +++ b/.changeset/witty-eggs-reply.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +chore: tweaks warning when using node_compat diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index 84776f573daa..3f9306d7274d 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -80,7 +80,7 @@ - [#6714](https://github.com/cloudflare/workers-sdk/pull/6714) [`62082aa`](https://github.com/cloudflare/workers-sdk/commit/62082aa75b767368d0a5c8c59a24a5f91a1b0c73) Thanks [@OilyLime](https://github.com/OilyLime)! - fix: rough edges when creating and updating Hyperdrive over Access configs -- [#6705](https://github.com/cloudflare/workers-sdk/pull/6705) [`ea60a52`](https://github.com/cloudflare/workers-sdk/commit/ea60a52a4e350b6c439d734618e3cd4187f3f2d5) Thanks [@emily-shen](https://github.com/emily-shen)! - fix: include compatability date in static-asset only uploads (experimental feature) +- [#6705](https://github.com/cloudflare/workers-sdk/pull/6705) [`ea60a52`](https://github.com/cloudflare/workers-sdk/commit/ea60a52a4e350b6c439d734618e3cd4187f3f2d5) Thanks [@emily-shen](https://github.com/emily-shen)! - fix: include compatibility date in static-asset only uploads (experimental feature) ## 3.78.3 diff --git a/packages/wrangler/src/__tests__/deploy.test.ts b/packages/wrangler/src/__tests__/deploy.test.ts index 8e37d17cff19..5111188eed90 100644 --- a/packages/wrangler/src/__tests__/deploy.test.ts +++ b/packages/wrangler/src/__tests__/deploy.test.ts @@ -9249,7 +9249,7 @@ export default{ "info": "", "out": "Total Upload: xx KiB / gzip: xx KiB --dry-run: exiting now.", - "warn": "▲ [WARNING] Enabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs. + "warn": "▲ [WARNING] You are using \`node_compat\`, which is a legacy Node.js compatibility option. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information. ", } @@ -9297,7 +9297,7 @@ export default{ "info": "", "out": "Total Upload: xx KiB / gzip: xx KiB --dry-run: exiting now.", - "warn": "▲ [WARNING] Enabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs. + "warn": "▲ [WARNING] You are using \`node_compat\`, which is a legacy Node.js compatibility option. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information. ", } @@ -9790,7 +9790,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. - ▲ [WARNING] Enabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs. + ▲ [WARNING] You are using \`node_compat\`, which is a legacy Node.js compatibility option. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information. " `); @@ -9810,7 +9810,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. - ▲ [WARNING] Enabling Wrangler compile-time Node.js compatibility polyfill mode for builtins and globals. This is experimental and has serious tradeoffs. + ▲ [WARNING] You are using \`node_compat\`, which is a legacy Node.js compatibility option. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information. " `); diff --git a/packages/wrangler/src/deployment-bundle/node-compat.ts b/packages/wrangler/src/deployment-bundle/node-compat.ts index 9d3cffc4a642..d5a0baa04dd8 100644 --- a/packages/wrangler/src/deployment-bundle/node-compat.ts +++ b/packages/wrangler/src/deployment-bundle/node-compat.ts @@ -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 compatibility option. Instead, use the `nodejs_compat` compatibility flag. This includes the functionality from legacy `node_compat` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information." ); } diff --git a/packages/wrangler/src/tail/filters.ts b/packages/wrangler/src/tail/filters.ts index 3416d9e1200f..cbb64f5790f5 100644 --- a/packages/wrangler/src/tail/filters.ts +++ b/packages/wrangler/src/tail/filters.ts @@ -10,7 +10,7 @@ import { UserError } from "../errors"; /** * These are the filters we accept in the CLI. They * were copied directly from Wrangler v1 in order to - * maintain compatability, so they aren't actually the exact + * maintain compatibility, so they aren't actually the exact * filters we need to send up to the tail worker. They generally map 1:1, * but often require some transformation or * renaming to match what it expects. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c7c78755f541..e531481b595e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,12 @@ settings: catalogs: default: + '@vitest/runner': + specifier: ~2.1.1 + version: 2.1.1 + '@vitest/snapshot': + specifier: ~2.1.1 + version: 2.1.1 vitest: specifier: ~2.1.1 version: 2.1.1