diff --git a/.changeset/c3-frameworks-update-5602.md b/.changeset/c3-frameworks-update-5602.md deleted file mode 100644 index 59d127ef80fa..000000000000 --- a/.changeset/c3-frameworks-update-5602.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" package - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------ | ------ | -| gatsby | 5.13.3 | 5.13.4 | diff --git a/.changeset/c3-frameworks-update-5835.md b/.changeset/c3-frameworks-update-5835.md deleted file mode 100644 index c824ad1fb3ee..000000000000 --- a/.changeset/c3-frameworks-update-5835.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" package - -The following dependency versions have been updated: - -| Dependency | From | To | -| --------------- | ------ | ------ | -| @angular/create | 17.2.3 | 17.3.7 | diff --git a/.changeset/c3-frameworks-update-5836.md b/.changeset/c3-frameworks-update-5836.md deleted file mode 100644 index 2129ea6cdc6d..000000000000 --- a/.changeset/c3-frameworks-update-5836.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: update dependencies of "create-cloudflare" package - -The following dependency versions have been updated: - -| Dependency | From | To | -| ----------- | ----- | ----- | -| create-qwik | 1.4.5 | 1.5.4 | diff --git a/.changeset/fluffy-files-brush.md b/.changeset/fluffy-files-brush.md deleted file mode 100644 index 29221c524d69..000000000000 --- a/.changeset/fluffy-files-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": minor ---- - -feature: Improved `d1 execute --file --remote` performance & added support for much larger SQL files within a single transaction. diff --git a/.changeset/lovely-needles-destroy.md b/.changeset/lovely-needles-destroy.md deleted file mode 100644 index 1b9b86073bba..000000000000 --- a/.changeset/lovely-needles-destroy.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"playground-preview-worker": patch -"@cloudflare/vitest-pool-workers": patch -"workers-playground": patch -"wrangler": patch ---- - -fix: update undici to the latest version to avoid a potential vulnerability diff --git a/.changeset/nice-waves-sing.md b/.changeset/nice-waves-sing.md deleted file mode 100644 index bbf1bdd5dd35..000000000000 --- a/.changeset/nice-waves-sing.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"wrangler": minor ---- - -fix: Show feedback on Pages project deployment failure - -Today, if uploading a Pages Function, or deploying a Pages project fails for whatever reason, there’s no feedback shown to the user. Worse yet, the shown message is misleading, saying the deployment was successful, when in fact it was not: - -``` -✨ Deployment complete! -``` - -This commit ensures that we provide users with: - -- the correct feedback with respect to their Pages deployment -- the appropriate messaging depending on the status of their project's deployment status -- the appropriate logs in case of a deployment failure diff --git a/.changeset/ninety-trainers-attack.md b/.changeset/ninety-trainers-attack.md deleted file mode 100644 index bf6ebb2e830c..000000000000 --- a/.changeset/ninety-trainers-attack.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"create-cloudflare": patch ---- - -fix: provide a simple fetch handler to the scheduled template to avoid confusing error messages. - -Fixes #4560 diff --git a/.changeset/quiet-wolves-camp.md b/.changeset/quiet-wolves-camp.md deleted file mode 100644 index de0553cc7390..000000000000 --- a/.changeset/quiet-wolves-camp.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"wrangler": minor ---- - -fix: Display correct global flags in `wrangler pages --help` - -Running `wrangler pages --help` will list, amongst others, the following global flags: - -``` --j, --experimental-json-config --c, --config --e, --env --h, --help --v, --version -``` - -This is not accurate, since flags such as `--config`, `--experimental-json-config`, or `env` are not supported by Pages. - -This commit ensures we display the correct global flags that apply to Pages. diff --git a/.changeset/real-waves-wave.md b/.changeset/real-waves-wave.md deleted file mode 100644 index 04a342879ac7..000000000000 --- a/.changeset/real-waves-wave.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"wrangler": patch ---- - -fix: do not allow non-string values in bulk secret uploads - -Prior to Wrangler 3.4.0 we displayed an error if the user tried to upload a -JSON file that contained non-string secrets, since these are not supported -by the Cloudflare backend. - -This change reintroduces that check to give the user a helpful error message -rather than a cryptic `workers.api.error.invalid_script_config` error code. diff --git a/.changeset/smart-actors-allow.md b/.changeset/smart-actors-allow.md deleted file mode 100644 index 797edab4528b..000000000000 --- a/.changeset/smart-actors-allow.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"wrangler": minor ---- - -chore: Deprecate usage of the deployment object on the unsafe metadata binding in favor of the new version_metadata binding. - -If you're currently using the old binding, please move over to the new version_metadata binding by adding: - -```toml -[version_metadata] -binding = "CF_VERSION_METADATA" -``` - -and updating your usage accordingly. You can find the docs for the new binding here: https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata diff --git a/.changeset/wet-bugs-burn.md b/.changeset/wet-bugs-burn.md deleted file mode 100644 index d7372e046daf..000000000000 --- a/.changeset/wet-bugs-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"create-cloudflare": patch ---- - -chore: bump undici to 5.28.4 diff --git a/packages/create-cloudflare/CHANGELOG.md b/packages/create-cloudflare/CHANGELOG.md index e12e95a5b18e..c6399bcaffb5 100644 --- a/packages/create-cloudflare/CHANGELOG.md +++ b/packages/create-cloudflare/CHANGELOG.md @@ -1,5 +1,39 @@ # create-cloudflare +## 2.21.2 + +### Patch Changes + +- [#5602](https://github.com/cloudflare/workers-sdk/pull/5602) [`93cd7ae`](https://github.com/cloudflare/workers-sdk/commit/93cd7ae5a0c59ecb85df3890e4e49f461bb8563c) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" package + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------ | ------ | + | gatsby | 5.13.3 | 5.13.4 | + +- [#5835](https://github.com/cloudflare/workers-sdk/pull/5835) [`717e13e`](https://github.com/cloudflare/workers-sdk/commit/717e13e12365be01d2b825f6b27a23c8949b4bf7) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" package + + The following dependency versions have been updated: + + | Dependency | From | To | + | --------------- | ------ | ------ | + | @angular/create | 17.2.3 | 17.3.7 | + +- [#5836](https://github.com/cloudflare/workers-sdk/pull/5836) [`b3b4d3a`](https://github.com/cloudflare/workers-sdk/commit/b3b4d3a432878ca334d65f0cc8c7e6d326be80e9) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "create-cloudflare" package + + The following dependency versions have been updated: + + | Dependency | From | To | + | ----------- | ----- | ----- | + | create-qwik | 1.4.5 | 1.5.4 | + +- [#5547](https://github.com/cloudflare/workers-sdk/pull/5547) [`e6ecf8c`](https://github.com/cloudflare/workers-sdk/commit/e6ecf8c86dd4638fe90bc7d92b01af659408fff1) Thanks [@connorads](https://github.com/connorads)! - fix: provide a simple fetch handler to the scheduled template to avoid confusing error messages. + + Fixes #4560 + +- [#5855](https://github.com/cloudflare/workers-sdk/pull/5855) [`3a65060`](https://github.com/cloudflare/workers-sdk/commit/3a65060eb8b044b060186c2c219ac06d52b2d3bc) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - chore: bump undici to 5.28.4 + ## 2.21.1 ### Patch Changes diff --git a/packages/create-cloudflare/package.json b/packages/create-cloudflare/package.json index 882b48424a33..b9e312952d03 100644 --- a/packages/create-cloudflare/package.json +++ b/packages/create-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "create-cloudflare", - "version": "2.21.1", + "version": "2.21.2", "description": "A CLI for creating and deploying new applications to Cloudflare.", "keywords": [ "cloudflare", diff --git a/packages/playground-preview-worker/CHANGELOG.md b/packages/playground-preview-worker/CHANGELOG.md index e1d85bd0192b..94914b0e0207 100644 --- a/packages/playground-preview-worker/CHANGELOG.md +++ b/packages/playground-preview-worker/CHANGELOG.md @@ -1,5 +1,11 @@ # playground-preview-worker +## 0.0.3 + +### Patch Changes + +- [#5838](https://github.com/cloudflare/workers-sdk/pull/5838) [`609debd`](https://github.com/cloudflare/workers-sdk/commit/609debdf744569278a050070846e420ffbfac161) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: update undici to the latest version to avoid a potential vulnerability + ## 0.0.2 ### Patch Changes diff --git a/packages/playground-preview-worker/package.json b/packages/playground-preview-worker/package.json index 7bdfd90187f4..92c2d66cd10a 100644 --- a/packages/playground-preview-worker/package.json +++ b/packages/playground-preview-worker/package.json @@ -1,6 +1,6 @@ { "name": "playground-preview-worker", - "version": "0.0.2", + "version": "0.0.3", "private": true, "scripts": { "build-middleware": "pnpm run build-middleware:common && pnpm run build-middleware:loader", diff --git a/packages/vitest-pool-workers/CHANGELOG.md b/packages/vitest-pool-workers/CHANGELOG.md index 2e423757802c..1c19e8ffd0d2 100644 --- a/packages/vitest-pool-workers/CHANGELOG.md +++ b/packages/vitest-pool-workers/CHANGELOG.md @@ -1,5 +1,14 @@ # @cloudflare/vitest-pool-workers +## 0.2.11 + +### Patch Changes + +- [#5838](https://github.com/cloudflare/workers-sdk/pull/5838) [`609debd`](https://github.com/cloudflare/workers-sdk/commit/609debdf744569278a050070846e420ffbfac161) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: update undici to the latest version to avoid a potential vulnerability + +- Updated dependencies [[`7e97ba8`](https://github.com/cloudflare/workers-sdk/commit/7e97ba8778be3cf1d93d44ed191748853c6661e0), [`609debd`](https://github.com/cloudflare/workers-sdk/commit/609debdf744569278a050070846e420ffbfac161), [`63f7acb`](https://github.com/cloudflare/workers-sdk/commit/63f7acb37e7e7ceb60594ac91baf95cd30037d76), [`2869e03`](https://github.com/cloudflare/workers-sdk/commit/2869e0379667d755d1de5543cb80886cc42c211f), [`86a6e09`](https://github.com/cloudflare/workers-sdk/commit/86a6e09d8a369a3bb8aee8c252174bd01e090c54), [`df2daf2`](https://github.com/cloudflare/workers-sdk/commit/df2daf2c858229fd812bf1fe818b206ef1345a00)]: + - wrangler@3.57.0 + ## 0.2.10 ### Patch Changes @@ -91,16 +100,16 @@ import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; export default defineWorkersConfig({ - test: { - poolOptions: { - workers: { - wrangler: { - configPath: "./wrangler.toml", - environment: "production", - }, - }, - }, - }, + test: { + poolOptions: { + workers: { + wrangler: { + configPath: "./wrangler.toml", + environment: "production", + }, + }, + }, + }, }); ``` diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 44ee7d3b5704..a5771d4ae4b3 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vitest-pool-workers", - "version": "0.2.10", + "version": "0.2.11", "description": "Workers Vitest integration for writing Vitest unit and integration tests that run inside the Workers runtime", "keywords": [ "cloudflare", diff --git a/packages/workers-playground/CHANGELOG.md b/packages/workers-playground/CHANGELOG.md index 2cb6160905d9..264471f80202 100644 --- a/packages/workers-playground/CHANGELOG.md +++ b/packages/workers-playground/CHANGELOG.md @@ -1,5 +1,11 @@ # workers-playground +## 0.0.5 + +### Patch Changes + +- [#5838](https://github.com/cloudflare/workers-sdk/pull/5838) [`609debd`](https://github.com/cloudflare/workers-sdk/commit/609debdf744569278a050070846e420ffbfac161) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: update undici to the latest version to avoid a potential vulnerability + ## 0.0.4 ### Patch Changes diff --git a/packages/workers-playground/package.json b/packages/workers-playground/package.json index eb2f83c8280a..8f38ace4fed9 100644 --- a/packages/workers-playground/package.json +++ b/packages/workers-playground/package.json @@ -1,6 +1,6 @@ { "name": "workers-playground", - "version": "0.0.4", + "version": "0.0.5", "private": true, "type": "module", "scripts": { diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index b257ae859e3f..85fec2096b12 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,65 @@ # wrangler +## 3.57.0 + +### Minor Changes + +- [#5696](https://github.com/cloudflare/workers-sdk/pull/5696) [`7e97ba8`](https://github.com/cloudflare/workers-sdk/commit/7e97ba8778be3cf1d93d44ed191748853c6661e0) Thanks [@geelen](https://github.com/geelen)! - feature: Improved `d1 execute --file --remote` performance & added support for much larger SQL files within a single transaction. + +- [#5819](https://github.com/cloudflare/workers-sdk/pull/5819) [`63f7acb`](https://github.com/cloudflare/workers-sdk/commit/63f7acb37e7e7ceb60594ac91baf95cd30037d76) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix: Show feedback on Pages project deployment failure + + Today, if uploading a Pages Function, or deploying a Pages project fails for whatever reason, there’s no feedback shown to the user. Worse yet, the shown message is misleading, saying the deployment was successful, when in fact it was not: + + ``` + ✨ Deployment complete! + ``` + + This commit ensures that we provide users with: + + - the correct feedback with respect to their Pages deployment + - the appropriate messaging depending on the status of their project's deployment status + - the appropriate logs in case of a deployment failure + +- [#5814](https://github.com/cloudflare/workers-sdk/pull/5814) [`2869e03`](https://github.com/cloudflare/workers-sdk/commit/2869e0379667d755d1de5543cb80886cc42c211f) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix: Display correct global flags in `wrangler pages --help` + + Running `wrangler pages --help` will list, amongst others, the following global flags: + + ``` + -j, --experimental-json-config + -c, --config + -e, --env + -h, --help + -v, --version + ``` + + This is not accurate, since flags such as `--config`, `--experimental-json-config`, or `env` are not supported by Pages. + + This commit ensures we display the correct global flags that apply to Pages. + +- [#5818](https://github.com/cloudflare/workers-sdk/pull/5818) [`df2daf2`](https://github.com/cloudflare/workers-sdk/commit/df2daf2c858229fd812bf1fe818b206ef1345a00) Thanks [@WalshyDev](https://github.com/WalshyDev)! - chore: Deprecate usage of the deployment object on the unsafe metadata binding in favor of the new version_metadata binding. + + If you're currently using the old binding, please move over to the new version_metadata binding by adding: + + ```toml + [version_metadata] + binding = "CF_VERSION_METADATA" + ``` + + and updating your usage accordingly. You can find the docs for the new binding here: https://developers.cloudflare.com/workers/runtime-apis/bindings/version-metadata + +### Patch Changes + +- [#5838](https://github.com/cloudflare/workers-sdk/pull/5838) [`609debd`](https://github.com/cloudflare/workers-sdk/commit/609debdf744569278a050070846e420ffbfac161) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: update undici to the latest version to avoid a potential vulnerability + +- [#5832](https://github.com/cloudflare/workers-sdk/pull/5832) [`86a6e09`](https://github.com/cloudflare/workers-sdk/commit/86a6e09d8a369a3bb8aee8c252174bd01e090c54) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: do not allow non-string values in bulk secret uploads + + Prior to Wrangler 3.4.0 we displayed an error if the user tried to upload a + JSON file that contained non-string secrets, since these are not supported + by the Cloudflare backend. + + This change reintroduces that check to give the user a helpful error message + rather than a cryptic `workers.api.error.invalid_script_config` error code. + ## 3.56.0 ### Minor Changes @@ -59,7 +119,7 @@ ```typescript interface Env { - "some-var": "foobar"; + "some-var": "foobar"; } ``` @@ -81,7 +141,7 @@ ```js const { env } = await getPlatformProxy({ - environment: "production", + environment: "production", }); ``` @@ -258,21 +318,21 @@ import { WorkerEntrypoint } from "cloudflare:workers"; export class EntrypointA extends WorkerEntrypoint { - fetch(request) { - return new Response("Hello from entrypoint A!"); - } + fetch(request) { + return new Response("Hello from entrypoint A!"); + } } export const entrypointB: ExportedHandler = { - fetch(request, env, ctx) { - return new Response("Hello from entrypoint B!"); - } + fetch(request, env, ctx) { + return new Response("Hello from entrypoint B!"); + }, }; export default { - fetch(request, env, ctx) { - return new Response("Hello from the default entrypoint!"); - } + fetch(request, env, ctx) { + return new Response("Hello from the default entrypoint!"); + }, }; ``` @@ -632,12 +692,12 @@ ```ts interface Env { - SEND_EMAIL: SendEmail; - VECTORIZE: VectorizeIndex; - HYPERDRIVE: Hyperdrive; - MTLS: Fetcher; - BROWSER: Fetcher; - AI: Fetcher; + SEND_EMAIL: SendEmail; + VECTORIZE: VectorizeIndex; + HYPERDRIVE: Hyperdrive; + MTLS: Fetcher; + BROWSER: Fetcher; + AI: Fetcher; } ``` @@ -660,7 +720,7 @@ ```js const worker = await unstable_dev("path/to/script.js", { - logLevel: "none", + logLevel: "none", }); ``` @@ -895,11 +955,11 @@ ```ts export function randomBytes(length: number) { - if (navigator.userAgent !== "Cloudflare-Workers") { - return new Uint8Array(require("node:crypto").randomBytes(length)); - } else { - return crypto.getRandomValues(new Uint8Array(length)); - } + if (navigator.userAgent !== "Cloudflare-Workers") { + return new Uint8Array(require("node:crypto").randomBytes(length)); + } else { + return crypto.getRandomValues(new Uint8Array(length)); + } } ``` @@ -1024,17 +1084,17 @@ ```json { - "error": { - "text": "A request to the Cloudflare API (/accounts/xxxx/d1/database/xxxxxxx/query) failed.", - "notes": [ - { - "text": "no such column: asdf at offset 7 [code: 7500]" - } - ], - "kind": "error", - "name": "APIError", - "code": 7500 - } + "error": { + "text": "A request to the Cloudflare API (/accounts/xxxx/d1/database/xxxxxxx/query) failed.", + "notes": [ + { + "text": "no such column: asdf at offset 7 [code: 7500]" + } + ], + "kind": "error", + "name": "APIError", + "code": 7500 + } } ``` @@ -1198,12 +1258,12 @@ const { bindings, dispose } = await getBindingsProxy(); try { - const myKv = bindings.MY_KV; - const kvValue = await myKv.get("my-kv-key"); + const myKv = bindings.MY_KV; + const kvValue = await myKv.get("my-kv-key"); - console.log(`KV Value = ${kvValue}`); + console.log(`KV Value = ${kvValue}`); } finally { - await dispose(); + await dispose(); } ``` @@ -1594,17 +1654,17 @@ ```jsonc { - "configurations": [ - { - "name": "Wrangler", - "type": "node", - "request": "attach", - "port": 9229, - // These can be omitted, but doing so causes silent errors in the runtime - "attachExistingChildren": false, - "autoAttachChildProcesses": false - } - ] + "configurations": [ + { + "name": "Wrangler", + "type": "node", + "request": "attach", + "port": 9229, + // These can be omitted, but doing so causes silent errors in the runtime + "attachExistingChildren": false, + "autoAttachChildProcesses": false, + }, + ], } ``` @@ -1718,7 +1778,7 @@ Wrangler can operate in two modes: the default bundling mode and `--no-bundle` mode. In bundling mode, dynamic imports (e.g. `await import("./large-dep.mjs")`) would be bundled into your entrypoint, making lazy loading less effective. - Additionally, variable dynamic imports (e.g. `` await import(`./lang/${language}.mjs`) ``) would always fail at runtime, + Additionally, variable dynamic imports (e.g. ``await import(`./lang/${language}.mjs`)``) would always fail at runtime, as Wrangler would have no way of knowing which modules to upload. The `--no-bundle` mode sought to address these issues by disabling Wrangler's bundling entirely, and just deploying code as is. Unfortunately, this also disabled Wrangler's code transformations (e.g. TypeScript compilation, `--assets`, `--test-scheduled`, etc). @@ -1862,18 +1922,18 @@ ```json { - "configurations": [ - { - "name": "Wrangler", - "type": "node", - "request": "attach", - "port": 9229, - "cwd": "/", - "resolveSourceMapLocations": null, - "attachExistingChildren": false, - "autoAttachChildProcesses": false - } - ] + "configurations": [ + { + "name": "Wrangler", + "type": "node", + "request": "attach", + "port": 9229, + "cwd": "/", + "resolveSourceMapLocations": null, + "attachExistingChildren": false, + "autoAttachChildProcesses": false + } + ] } ``` @@ -2475,11 +2535,11 @@ ```js export default { - fetch(req) { - const url = new URL(req.url); - const name = url.searchParams.get("name"); - return new Response("Hello, " + name); - }, + fetch(req) { + const url = new URL(req.url); + const name = url.searchParams.get("name"); + return new Response("Hello, " + name); + }, }; ``` @@ -3146,9 +3206,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```js worker = await unstable_dev( - "src/index.js", - {}, - { disableExperimentalWarning: true } + "src/index.js", + {}, + { disableExperimentalWarning: true }, ); ``` @@ -3156,7 +3216,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```js worker = await unstable_dev("src/index.js", { - experimental: { disableExperimentalWarning: true }, + experimental: { disableExperimentalWarning: true }, }); ``` @@ -3429,9 +3489,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```ts export const onRequest = ({ passThroughOnException }) => { - passThroughOnException(); + passThroughOnException(); - x; // Would ordinarily throw an error, but instead, static assets are served. + x; // Would ordinarily throw an error, but instead, static assets are served. }; ``` @@ -3450,8 +3510,8 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```ts declare module "**/*.wasm" { - const value: WebAssembly.Module; - export default value; + const value: WebAssembly.Module; + export default value; } ``` @@ -3459,8 +3519,8 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```ts declare module "**/*.webp" { - const value: ArrayBuffer; - export default value; + const value: ArrayBuffer; + export default value; } ``` @@ -3468,8 +3528,8 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```ts declare module "**/*.text" { - const value: string; - export default value; + const value: string; + export default value; } ``` @@ -3664,7 +3724,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```js await unstable_dev("src/index.ts", { - local: false, + local: false, }); ``` @@ -3776,42 +3836,42 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c import { unstable_dev } from "wrangler"; describe("multi-worker testing", () => { - let childWorker; - let parentWorker; - - beforeAll(async () => { - childWorker = await unstable_dev( - "src/child-worker.js", - { config: "src/child-wrangler.toml" }, - { disableExperimentalWarning: true } - ); - parentWorker = await unstable_dev( - "src/parent-worker.js", - { config: "src/parent-wrangler.toml" }, - { disableExperimentalWarning: true } - ); - }); - - afterAll(async () => { - await childWorker.stop(); - await parentWorker.stop(); - }); - - it("childWorker should return Hello World itself", async () => { - const resp = await childWorker.fetch(); - if (resp) { - const text = await resp.text(); - expect(text).toMatchInlineSnapshot(`"Hello World!"`); - } - }); - - it("parentWorker should return Hello World by invoking the child worker", async () => { - const resp = await parentWorker.fetch(); - if (resp) { - const parsedResp = await resp.text(); - expect(parsedResp).toEqual("Parent worker sees: Hello World!"); - } - }); + let childWorker; + let parentWorker; + + beforeAll(async () => { + childWorker = await unstable_dev( + "src/child-worker.js", + { config: "src/child-wrangler.toml" }, + { disableExperimentalWarning: true }, + ); + parentWorker = await unstable_dev( + "src/parent-worker.js", + { config: "src/parent-wrangler.toml" }, + { disableExperimentalWarning: true }, + ); + }); + + afterAll(async () => { + await childWorker.stop(); + await parentWorker.stop(); + }); + + it("childWorker should return Hello World itself", async () => { + const resp = await childWorker.fetch(); + if (resp) { + const text = await resp.text(); + expect(text).toMatchInlineSnapshot(`"Hello World!"`); + } + }); + + it("parentWorker should return Hello World by invoking the child worker", async () => { + const resp = await parentWorker.fetch(); + if (resp) { + const parsedResp = await resp.text(); + expect(parsedResp).toEqual("Parent worker sees: Hello World!"); + } + }); }); ``` @@ -4300,9 +4360,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```js export default { - fetch(req, env) { - return env.Bee.fetch(req); - }, + fetch(req, env) { + return env.Bee.fetch(req); + }, }; ``` @@ -4316,9 +4376,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ```js export default { - fetch(req, env) { - return new Response("Hello World"); - }, + fetch(req, env) { + return new Response("Hello World"); + }, }; ``` @@ -5297,9 +5357,9 @@ And in your worker, you can call it like so: ```js export default { - fetch(req, env, ctx) { - return env.MYWORKER.fetch(new Request("http://domain/some-path")); - }, + fetch(req, env, ctx) { + return env.MYWORKER.fetch(new Request("http://domain/some-path")); + }, }; ``` diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index 98e212ac27bd..6c6a8cbff71b 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "3.56.0", + "version": "3.57.0", "description": "Command-line interface for all things Cloudflare Workers", "keywords": [ "wrangler", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d51fde9f6529..06f9b15d1819 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7793,10 +7793,12 @@ packages: is-accessor-descriptor@0.1.6: resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} engines: {node: '>=0.10.0'} + deprecated: Please upgrade to v0.1.7 is-accessor-descriptor@1.0.0: resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} engines: {node: '>=0.10.0'} + deprecated: Please upgrade to v1.0.1 is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} @@ -7854,10 +7856,12 @@ packages: is-data-descriptor@0.1.4: resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} engines: {node: '>=0.10.0'} + deprecated: Please upgrade to v0.1.5 is-data-descriptor@1.0.0: resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} engines: {node: '>=0.10.0'} + deprecated: Please upgrade to v1.0.1 is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -11316,6 +11320,7 @@ packages: vite-plugin-rewrite-all@1.0.1: resolution: {integrity: sha512-W0DAchC8ynuQH0lYLIu5/5+JGfYlUTRD8GGNtHFXRJX4FzzB9MajtqHBp26zq/ly9sDt5BqrfdT08rv3RbB0LQ==} engines: {node: '>=12.0.0'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0