diff --git a/.changeset/config.json b/.changeset/config.json index 90edbf72ae3c..c54a7aa4df9c 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,7 +2,7 @@ "$schema": "https://unpkg.com/@changesets/config@1.6.2/schema.json", "changelog": [ "@changesets/changelog-github", - { "repo": "cloudflare/wrangler2" } + { "repo": "cloudflare/workers-sdk" } ], "commit": false, "linked": [], diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 06853caf1cdb..6cf788252898 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Wrangler is built and run on the Node.js JavaScript runtime. Any contributions you make will be via [Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) on [GitHub](https://github.com/) developed in a local git repository and pushed to your own fork of the repository. - Ensure you have [created an account](https://docs.github.com/en/get-started/onboarding/getting-started-with-your-github-account) on GitHub. -- [Create your own fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of [this repository](https://github.com/cloudflare/wrangler2). +- [Create your own fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of [this repository](https://github.com/cloudflare/workers-sdk). - Clone your fork to your local machine ```sh > git clone https://github.com//wrangler2 @@ -35,18 +35,18 @@ Any contributions you make will be via [Pull Requests](https://docs.github.com/e ``` - Add `cloudflare/wrangler2` as the `upstream` remote repository. ```sh - > git remote add upstream https://github.com/cloudflare/wrangler2 + > git remote add upstream https://github.com/cloudflare/workers-sdk > git remote -v origin https://github.com//wrangler2 (fetch) origin https://github.com//wrangler2 (push) - upstream https://github.com/cloudflare/wrangler2 (fetch) - upstream https://github.com/cloudflare/wrangler2 (push) + upstream https://github.com/cloudflare/workers-sdk (fetch) + upstream https://github.com/cloudflare/workers-sdk (push) ``` - You should regularly pull from the `main` branch of the `upstream` repository to keep up to date with the latest changes to the project. ```sh > git switch main > git pull upstream main - From https://github.com/cloudflare/wrangler2 + From https://github.com/cloudflare/workers-sdk * branch main -> FETCH_HEAD Already up to date. ``` @@ -63,7 +63,7 @@ When working on Wrangler, you'll need to satisfy [`workerd`](https://github.com/ The Node.js dependencies of the project are managed by the [`npm`](https://www.npmjs.com/) tool. -This repository is setup as a [mono-repo](https://docs.npmjs.com/cli/v7/using-npm/workspaces) of workspaces. The workspaces are stored in the [`packages`](https://github.com/cloudflare/wrangler2/tree/main/packages) directory. +This repository is setup as a [mono-repo](https://docs.npmjs.com/cli/v7/using-npm/workspaces) of workspaces. The workspaces are stored in the [`packages`](https://github.com/cloudflare/workers-sdk/tree/main/packages) directory. While each workspace has its own dependencies, you install the dependencies using `npm` at the root of the project. diff --git a/ISSUE_TRIAGE.md b/ISSUE_TRIAGE.md index a1f8df98c4bc..25346d0c749e 100644 --- a/ISSUE_TRIAGE.md +++ b/ISSUE_TRIAGE.md @@ -10,7 +10,7 @@ If an issue or PR obviously relates to a release regression, we must assign an a Anyone can triage issues as they arrive in the repository. -New untriaged issues can be found by filtering the issues list for those [not in a project](https://github.com/cloudflare/wrangler2/issues?q=is%3Aopen+is%3Aissue+-project%3Acloudflare%2F1+-project%3Acloudflare%2F2+). +New untriaged issues can be found by filtering the issues list for those [not in a project](https://github.com/cloudflare/workers-sdk/issues?q=is%3Aopen+is%3Aissue+-project%3Acloudflare%2F1+-project%3Acloudflare%2F2+). Follow these steps to triage an issue. @@ -29,7 +29,7 @@ This typically includes the version of Wrangler being used and steps to reproduc - If the issue does not provide clear steps to reproduce the problem then add the `needs reproduction` label. These labels can be revisited if the author can provide further clarification. -You can see a list of issues that need revisiting by filtering on ["needs reproduction" and "needs clarification"](https://github.com/cloudflare/wrangler2/issues?q=is%3Aopen+is%3Aissue+project%3Acloudflare%2F1+label%3A%22needs+clarification%22). +You can see a list of issues that need revisiting by filtering on ["needs reproduction" and "needs clarification"](https://github.com/cloudflare/workers-sdk/issues?q=is%3Aopen+is%3Aissue+project%3Acloudflare%2F1+label%3A%22needs+clarification%22). If the issue does have enough information, move on to step 2. diff --git a/README.md b/README.md index 9ca12181ca75..a786a55e37c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## ⛅️ wrangler -> This package is for wrangler v2.x, released first in May 2022. If you're looking for v1.x of the `@cloudflare/wrangler` package, visit https://www.npmjs.com/package/@cloudflare/wrangler / https://github.com/cloudflare/wrangler. v1 vs v2 comparison is at [our docs site](https://developers.cloudflare.com/workers/wrangler/compare-v1-v2/) +> This package is for wrangler v2.x, released first in May 2022. If you're looking for v1.x of the `@cloudflare/wrangler` package, visit https://www.npmjs.com/package/@cloudflare/wrangler / https://github.com/cloudflare/wrangler-legacy. v1 vs v2 comparison is at [our docs site](https://developers.cloudflare.com/workers/wrangler/compare-v1-v2/) `wrangler` is a command line tool for building [Cloudflare Workers](https://workers.cloudflare.com/). diff --git a/fixtures/local-mode-tests/src/nodeBuiltinPackage.ts b/fixtures/local-mode-tests/src/nodeBuiltinPackage.ts index 309a96b5b940..f28a3edd9fc7 100644 --- a/fixtures/local-mode-tests/src/nodeBuiltinPackage.ts +++ b/fixtures/local-mode-tests/src/nodeBuiltinPackage.ts @@ -1,6 +1,6 @@ // Because we have the `buffer` npm package installed, this shouldn't fail, // as esbuild can resolve that instead: -// https://github.com/cloudflare/wrangler2/issues/2038 +// https://github.com/cloudflare/workers-sdk/issues/2038 import { Buffer } from "buffer"; export default { diff --git a/fixtures/local-mode-tests/tests/unstableDev.test.ts b/fixtures/local-mode-tests/tests/unstableDev.test.ts index 4ecb49940f77..8fd06c1a34a8 100644 --- a/fixtures/local-mode-tests/tests/unstableDev.test.ts +++ b/fixtures/local-mode-tests/tests/unstableDev.test.ts @@ -4,7 +4,7 @@ import type { UnstableDevWorker } from "wrangler"; // TODO: add test for `experimentalLocal: true` once issue with dynamic // `import()` and `npx-import` resolved: -// https://github.com/cloudflare/wrangler2/pull/1940#issuecomment-1261166695 +// https://github.com/cloudflare/workers-sdk/pull/1940#issuecomment-1261166695 describe("worker in local mode", () => { let worker: UnstableDevWorker; let resolveReadyPromise: (value: unknown) => void; diff --git a/fixtures/pages-functions-with-routes-app/CHANGELOG.md b/fixtures/pages-functions-with-routes-app/CHANGELOG.md index a8a9a393d7ab..d1b5a88bac8b 100644 --- a/fixtures/pages-functions-with-routes-app/CHANGELOG.md +++ b/fixtures/pages-functions-with-routes-app/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- [#2065](https://github.com/cloudflare/wrangler2/pull/2065) [`14c44588`](https://github.com/cloudflare/wrangler2/commit/14c44588c9d22e9c9f2ad2740df57809d0cbcfbc) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix(pages): `wrangler pages dev` matches routing rules in `_routes.json` too loosely +- [#2065](https://github.com/cloudflare/workers-sdk/pull/2065) [`14c44588`](https://github.com/cloudflare/workers-sdk/commit/14c44588c9d22e9c9f2ad2740df57809d0cbcfbc) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix(pages): `wrangler pages dev` matches routing rules in `_routes.json` too loosely Currently, the logic by which we transform routing rules in `_routes.json` to regular expressions, so we can perform `pathname` matching & routing when we diff --git a/fixtures/pages-workerjs-and-functions-app/CHANGELOG.md b/fixtures/pages-workerjs-and-functions-app/CHANGELOG.md index eab62ff2dcfa..c8aec369df7f 100644 --- a/fixtures/pages-workerjs-and-functions-app/CHANGELOG.md +++ b/fixtures/pages-workerjs-and-functions-app/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- [#1950](https://github.com/cloudflare/wrangler2/pull/1950) [`daf73fbe`](https://github.com/cloudflare/wrangler2/commit/daf73fbe03b55631383cdc86a05eac12d2775875) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - `wrangler pages dev` should prioritize `_worker.js` +- [#1950](https://github.com/cloudflare/workers-sdk/pull/1950) [`daf73fbe`](https://github.com/cloudflare/workers-sdk/commit/daf73fbe03b55631383cdc86a05eac12d2775875) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - `wrangler pages dev` should prioritize `_worker.js` When using a `_worker.js` file, the entire `/functions` directory should be ignored – this includes its routing and middleware characteristics. Currently `wrangler pages dev` does the reverse, by prioritizing `/functions` over `_worker.js`. These changes fix the current behaviour. diff --git a/fixtures/pages-workerjs-with-routes-app/CHANGELOG.md b/fixtures/pages-workerjs-with-routes-app/CHANGELOG.md index 2dec37ae3bff..e04ac0262a99 100644 --- a/fixtures/pages-workerjs-with-routes-app/CHANGELOG.md +++ b/fixtures/pages-workerjs-with-routes-app/CHANGELOG.md @@ -4,7 +4,7 @@ ### Patch Changes -- [#2065](https://github.com/cloudflare/wrangler2/pull/2065) [`14c44588`](https://github.com/cloudflare/wrangler2/commit/14c44588c9d22e9c9f2ad2740df57809d0cbcfbc) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix(pages): `wrangler pages dev` matches routing rules in `_routes.json` too loosely +- [#2065](https://github.com/cloudflare/workers-sdk/pull/2065) [`14c44588`](https://github.com/cloudflare/workers-sdk/commit/14c44588c9d22e9c9f2ad2740df57809d0cbcfbc) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix(pages): `wrangler pages dev` matches routing rules in `_routes.json` too loosely Currently, the logic by which we transform routing rules in `_routes.json` to regular expressions, so we can perform `pathname` matching & routing when we diff --git a/node-types.d.ts b/node-types.d.ts index 3c755dbf4ecd..4cf5e466a88a 100644 --- a/node-types.d.ts +++ b/node-types.d.ts @@ -1,4 +1,4 @@ -// https://github.com/cloudflare/wrangler2/pull/2496#discussion_r1062516883 +// https://github.com/cloudflare/workers-sdk/pull/2496#discussion_r1062516883 import { Event as WorkerEvent, diff --git a/package.json b/package.json index e7272096f4cd..984f6b49608b 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.0.0", "private": true, "description": "Monorepo for wrangler and associated packages", - "homepage": "https://github.com/cloudflare/wrangler2#readme", + "homepage": "https://github.com/cloudflare/workers-sdk#readme", "bugs": { - "url": "https://github.com/cloudflare/wrangler2/issues" + "url": "https://github.com/cloudflare/workers-sdk/issues" }, "license": "MIT OR Apache-2.0", "author": "wrangler@cloudflare.com", diff --git a/packages/pages-shared/CHANGELOG.md b/packages/pages-shared/CHANGELOG.md index 35397d1c6441..b1707b60564f 100644 --- a/packages/pages-shared/CHANGELOG.md +++ b/packages/pages-shared/CHANGELOG.md @@ -4,13 +4,13 @@ ### Patch Changes -- [#2502](https://github.com/cloudflare/wrangler2/pull/2502) [`6b7ebc8d`](https://github.com/cloudflare/wrangler2/commit/6b7ebc8dd0dee5521bce49a6dfff997d308e900e) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.11.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.11.0) +- [#2502](https://github.com/cloudflare/workers-sdk/pull/2502) [`6b7ebc8d`](https://github.com/cloudflare/workers-sdk/commit/6b7ebc8dd0dee5521bce49a6dfff997d308e900e) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.11.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.11.0) ## 0.0.12 ### Patch Changes -- [#2339](https://github.com/cloudflare/wrangler2/pull/2339) [`f6821189`](https://github.com/cloudflare/wrangler2/commit/f6821189110e5b6301fe77509a6bb9a8652bbc1b) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: `wrangler dev --local` now correctly lazy-imports `@miniflare/tre` +- [#2339](https://github.com/cloudflare/workers-sdk/pull/2339) [`f6821189`](https://github.com/cloudflare/workers-sdk/commit/f6821189110e5b6301fe77509a6bb9a8652bbc1b) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: `wrangler dev --local` now correctly lazy-imports `@miniflare/tre` Previously, we introduced a bug where we were incorrectly requiring `@miniflare/tre`, even when not using the `workerd`/`--experimental-local` mode. @@ -18,10 +18,10 @@ ### Patch Changes -- [#2303](https://github.com/cloudflare/wrangler2/pull/2303) [`1a1f1dc7`](https://github.com/cloudflare/wrangler2/commit/1a1f1dc7fc8cad06030d3feac1258e2fb3118d8c) Thanks [@jrf0110](https://github.com/jrf0110)! - fix: Pages asset-server duplicating the hash component +- [#2303](https://github.com/cloudflare/workers-sdk/pull/2303) [`1a1f1dc7`](https://github.com/cloudflare/workers-sdk/commit/1a1f1dc7fc8cad06030d3feac1258e2fb3118d8c) Thanks [@jrf0110](https://github.com/jrf0110)! - fix: Pages asset-server duplicating the hash component fix: Pages metadata missing line numbers. This could have resulted in redirects precedence ordering not being respected. -* [#2268](https://github.com/cloudflare/wrangler2/pull/2268) [`3be1c2cf`](https://github.com/cloudflare/wrangler2/commit/3be1c2cf99fdaef1e612937ccc487a5196c5df67) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add support for `--experimental-local` to `wrangler pages dev` which will use the `workerd` runtime. +* [#2268](https://github.com/cloudflare/workers-sdk/pull/2268) [`3be1c2cf`](https://github.com/cloudflare/workers-sdk/commit/3be1c2cf99fdaef1e612937ccc487a5196c5df67) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add support for `--experimental-local` to `wrangler pages dev` which will use the `workerd` runtime. Add `@miniflare/tre` environment polyfill to `@cloudflare/pages-shared`. @@ -29,16 +29,16 @@ ### Patch Changes -- [#2146](https://github.com/cloudflare/wrangler2/pull/2146) [`c987fceb`](https://github.com/cloudflare/wrangler2/commit/c987fcebfe8ebd61fd762371a108f28eaae4c71e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add a `failOpen` prop to the deployment metadata. +- [#2146](https://github.com/cloudflare/workers-sdk/pull/2146) [`c987fceb`](https://github.com/cloudflare/workers-sdk/commit/c987fcebfe8ebd61fd762371a108f28eaae4c71e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add a `failOpen` prop to the deployment metadata. ## 0.0.9 ### Patch Changes -- [#2004](https://github.com/cloudflare/wrangler2/pull/2004) [`f2d5728f`](https://github.com/cloudflare/wrangler2/commit/f2d5728fc10f1ef8298b777ffb586ff315f00a35) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Slightly relax the selectors for generating `Link` headers from `` elements in Pages Early Hints feature +- [#2004](https://github.com/cloudflare/workers-sdk/pull/2004) [`f2d5728f`](https://github.com/cloudflare/workers-sdk/commit/f2d5728fc10f1ef8298b777ffb586ff315f00a35) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Slightly relax the selectors for generating `Link` headers from `` elements in Pages Early Hints feature Previously, we'd only generate `Link` headers if the `rel="preload"` or `rel="preconnect"` matched exactly. Now, this change will generate `Link` headers if `preload` or `preconnect` appears as a whitespace-separated value in the `rel` attribute. For example, `rel="stylesheet preconnect"` is now valid. For more info, check out [this GitHub issue on the Cloudflare Developer Docs repo](https://github.com/cloudflare/cloudflare-docs/pull/6183#issuecomment-1272007522). -* [#2003](https://github.com/cloudflare/wrangler2/pull/2003) [`3ed06b40`](https://github.com/cloudflare/wrangler2/commit/3ed06b4096d3ea9ed601ae05d77442e5b0217678) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Bump miniflare@2.10.0 +* [#2003](https://github.com/cloudflare/workers-sdk/pull/2003) [`3ed06b40`](https://github.com/cloudflare/workers-sdk/commit/3ed06b4096d3ea9ed601ae05d77442e5b0217678) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Bump miniflare@2.10.0 diff --git a/packages/pages-shared/package.json b/packages/pages-shared/package.json index 3c06d9f4ccfc..e54a6d3afe4b 100644 --- a/packages/pages-shared/package.json +++ b/packages/pages-shared/package.json @@ -3,7 +3,7 @@ "version": "0.0.13", "repository": { "type": "git", - "url": "https://github.com/cloudflare/wrangler2.git", + "url": "https://github.com/cloudflare/workers-sdk.git", "directory": "packages/pages-shared" }, "files": [ diff --git a/packages/prerelease-registry/functions/routes/prs/[[path]].ts b/packages/prerelease-registry/functions/routes/prs/[[path]].ts index 183faa1361fb..fb0e9b2732df 100644 --- a/packages/prerelease-registry/functions/routes/prs/[[path]].ts +++ b/packages/prerelease-registry/functions/routes/prs/[[path]].ts @@ -32,7 +32,7 @@ export const onRequestGet: PagesFunction< try { const pullRequestsResponse = await gitHubFetch( - `https://api.github.com/repos/cloudflare/wrangler2/pulls/${pullRequestID}`, + `https://api.github.com/repos/cloudflare/workers-sdk/pulls/${pullRequestID}`, { headers: { Accept: "application/vnd.github.v3+json", @@ -52,7 +52,7 @@ export const onRequestGet: PagesFunction< } = (await pullRequestsResponse.json()) as PullRequest; const workflowRunsResponse = await gitHubFetch( - `https://api.github.com/repos/cloudflare/wrangler2/actions/runs?branch=${branch}&per_page=100&event=pull_request`, + `https://api.github.com/repos/cloudflare/workers-sdk/actions/runs?branch=${branch}&per_page=100&event=pull_request`, { headers: { Accept: "application/vnd.github.v3+json", diff --git a/packages/prerelease-registry/functions/utils/getArtifactForWorkflowRun.ts b/packages/prerelease-registry/functions/utils/getArtifactForWorkflowRun.ts index 62a7889262a1..7e43b3f83620 100644 --- a/packages/prerelease-registry/functions/utils/getArtifactForWorkflowRun.ts +++ b/packages/prerelease-registry/functions/utils/getArtifactForWorkflowRun.ts @@ -27,7 +27,7 @@ export const getArtifactForWorkflowRun = async ({ try { const artifactsResponse = await gitHubFetch( - `https://api.github.com/repos/cloudflare/wrangler2/actions/runs/${runID}/artifacts`, + `https://api.github.com/repos/cloudflare/workers-sdk/actions/runs/${runID}/artifacts`, { headers: { Accept: "application/vnd.github.v3+json", diff --git a/packages/prerelease-registry/functions/utils/gitHubFetch.ts b/packages/prerelease-registry/functions/utils/gitHubFetch.ts index 4f35c35b0972..cd8d4bd729a2 100644 --- a/packages/prerelease-registry/functions/utils/gitHubFetch.ts +++ b/packages/prerelease-registry/functions/utils/gitHubFetch.ts @@ -15,7 +15,7 @@ export const generateGitHubFetch = ({ ); gitHubRequest.headers.set( "User-Agent", - "@cloudflare/wrangler2/packages/prerelease-registry" + "@cloudflare/workers-sdk/packages/prerelease-registry" ); return fetch(gitHubRequest); diff --git a/packages/wrangler-devtools/package.json b/packages/wrangler-devtools/package.json index 056213fab5ac..01422d720c12 100644 --- a/packages/wrangler-devtools/package.json +++ b/packages/wrangler-devtools/package.json @@ -3,9 +3,9 @@ "version": "0.0.0", "private": "true", "description": "Chrome Devtools hosted for easy use with Wrangler", - "homepage": "https://github.com/cloudflare/wrangler2#readme", + "homepage": "https://github.com/cloudflare/workers-sdk#readme", "bugs": { - "url": "https://github.com/cloudflare/wrangler2/issues" + "url": "https://github.com/cloudflare/workers-sdk/issues" }, "license": "BSD-3-Clause", "author": "workers-devprod@cloudflare.com", diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index 8528ef898f31..27770939c868 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -14,7 +14,7 @@ ### Minor Changes -- [#2629](https://github.com/cloudflare/wrangler2/pull/2629) [`151733e5`](https://github.com/cloudflare/wrangler2/commit/151733e5d98e95f363b548f9959c2baf418eb7b5) Thanks [@mrbbot](https://github.com/mrbbot)! - Prefer the `workerd` `exports` condition when bundling. +- [#2629](https://github.com/cloudflare/workers-sdk/pull/2629) [`151733e5`](https://github.com/cloudflare/workers-sdk/commit/151733e5d98e95f363b548f9959c2baf418eb7b5) Thanks [@mrbbot](https://github.com/mrbbot)! - Prefer the `workerd` `exports` condition when bundling. This can be used to build isomorphic libraries that have different implementations depending on the JavaScript runtime they're running in. When bundling, Wrangler will try to load the [`workerd` key](https://runtime-keys.proposal.wintercg.org/#workerd). @@ -23,20 +23,20 @@ ### Patch Changes -- [#2409](https://github.com/cloudflare/wrangler2/pull/2409) [`89d78c0a`](https://github.com/cloudflare/wrangler2/commit/89d78c0ac444885298ac052b0b3de23b69fb029b) Thanks [@penalosa](https://github.com/penalosa)! - Wrangler now supports an `--experimental-json-config` flag which will read your configuration from a `wrangler.json` file, rather than `wrangler.toml`. The format of this file is exactly the same as the `wrangler.toml` configuration file, except that the syntax is `JSONC` (JSON with comments) rather than `TOML`. This is experimental, and is not recommended for production use. +- [#2409](https://github.com/cloudflare/workers-sdk/pull/2409) [`89d78c0a`](https://github.com/cloudflare/workers-sdk/commit/89d78c0ac444885298ac052b0b3de23b69fb029b) Thanks [@penalosa](https://github.com/penalosa)! - Wrangler now supports an `--experimental-json-config` flag which will read your configuration from a `wrangler.json` file, rather than `wrangler.toml`. The format of this file is exactly the same as the `wrangler.toml` configuration file, except that the syntax is `JSONC` (JSON with comments) rather than `TOML`. This is experimental, and is not recommended for production use. -* [#2623](https://github.com/cloudflare/wrangler2/pull/2623) [`04d8a312`](https://github.com/cloudflare/wrangler2/commit/04d8a3124fbcf20049b39a96654d7f3c850c032b) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - fix d1 directory not being created when running the `wrangler d1 execute` command with the `--yes`/`-y` flag +* [#2623](https://github.com/cloudflare/workers-sdk/pull/2623) [`04d8a312`](https://github.com/cloudflare/workers-sdk/commit/04d8a3124fbcf20049b39a96654d7f3c850c032b) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - fix d1 directory not being created when running the `wrangler d1 execute` command with the `--yes`/`-y` flag -- [#2608](https://github.com/cloudflare/wrangler2/pull/2608) [`70daffeb`](https://github.com/cloudflare/wrangler2/commit/70daffebab4788322769350ab714959e3254c3b4) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - fix: Add support for D1 databases when bundling an `_worker.js` on `wrangler pages publish` +- [#2608](https://github.com/cloudflare/workers-sdk/pull/2608) [`70daffeb`](https://github.com/cloudflare/workers-sdk/commit/70daffebab4788322769350ab714959e3254c3b4) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - fix: Add support for D1 databases when bundling an `_worker.js` on `wrangler pages publish` -* [#2597](https://github.com/cloudflare/wrangler2/pull/2597) [`416babf0`](https://github.com/cloudflare/wrangler2/commit/416babf050ed3608e0fd747111561a4c7207185e) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: do not crash in wrangler dev when passing a request object to fetch +* [#2597](https://github.com/cloudflare/workers-sdk/pull/2597) [`416babf0`](https://github.com/cloudflare/workers-sdk/commit/416babf050ed3608e0fd747111561a4c7207185e) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: do not crash in wrangler dev when passing a request object to fetch - This reverts and fixes the changes in https://github.com/cloudflare/wrangler2/pull/1769 + This reverts and fixes the changes in https://github.com/cloudflare/workers-sdk/pull/1769 which does not support creating requests from requests whose bodies have already been consumed. Fixes #2562 -- [#2622](https://github.com/cloudflare/wrangler2/pull/2622) [`9778b33e`](https://github.com/cloudflare/wrangler2/commit/9778b33eb27f721fb743a970fb1520782ab0d573) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: implement `d1 list --json` with clean output for piping into other commands +- [#2622](https://github.com/cloudflare/workers-sdk/pull/2622) [`9778b33e`](https://github.com/cloudflare/workers-sdk/commit/9778b33eb27f721fb743a970fb1520782ab0d573) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: implement `d1 list --json` with clean output for piping into other commands Before: @@ -44,7 +44,7 @@ rozenmd@cflaptop test % npx wrangler d1 list -------------------- 🚧 D1 is currently in open alpha and is not recommended for production data and traffic - 🚧 Please report any bugs to https://github.com/cloudflare/wrangler2/issues/new/choose + 🚧 Please report any bugs to https://github.com/cloudflare/workers-sdk/issues/new/choose 🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 🚧 To give feedback, visit https://discord.gg/cloudflaredev -------------------- @@ -80,9 +80,9 @@ ] ``` -* [#2631](https://github.com/cloudflare/wrangler2/pull/2631) [`6b3fe5ef`](https://github.com/cloudflare/wrangler2/commit/6b3fe5efc68c7a7afcd6666158a24d45033dd3db) Thanks [@thibmeu](https://github.com/thibmeu)! - Fix `wrangler publish --dry-run` to not require authentication when using Queues +* [#2631](https://github.com/cloudflare/workers-sdk/pull/2631) [`6b3fe5ef`](https://github.com/cloudflare/workers-sdk/commit/6b3fe5efc68c7a7afcd6666158a24d45033dd3db) Thanks [@thibmeu](https://github.com/thibmeu)! - Fix `wrangler publish --dry-run` to not require authentication when using Queues -- [#2627](https://github.com/cloudflare/wrangler2/pull/2627) [`6f0f2ba6`](https://github.com/cloudflare/wrangler2/commit/6f0f2ba65731a1f6a0b1978e5fc3a5da9a50df0f) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: implement `d1 execute --json` with clean output for piping into other commands +- [#2627](https://github.com/cloudflare/workers-sdk/pull/2627) [`6f0f2ba6`](https://github.com/cloudflare/workers-sdk/commit/6f0f2ba65731a1f6a0b1978e5fc3a5da9a50df0f) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: implement `d1 execute --json` with clean output for piping into other commands **Before:** @@ -91,84 +91,81 @@ ▲ [WARNING] Processing wrangler.toml configuration: - D1 Bindings are currently in alpha to allow the API to evolve before general availability. - Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose + Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose Note: Run this command with the environment variable NO_D1_WARNING=true to hide this message For example: `export NO_D1_WARNING=true && wrangler ` - ``` + + -------------------- + 🚧 D1 is currently in open alpha and is not recommended for production data and traffic + 🚧 Please report any bugs to https://github.com/cloudflare/workers-sdk/issues/new/choose + 🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 + 🚧 To give feedback, visit https://discord.gg/cloudflaredev + -------------------- ---- - -🚧 D1 is currently in open alpha and is not recommended for production data and traffic -🚧 Please report any bugs to https://github.com/cloudflare/wrangler2/issues/new/choose -🚧 To request features, visit https://community.cloudflare.com/c/developers/d1 -🚧 To give feedback, visit https://discord.gg/cloudflaredev - ---- - -🌀 Mapping SQL input into an array of statements -🌀 Parsing 1 statements -🌀 Executing on test (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx): -🚣 Executed 1 command in 11.846710999961942ms -┌────────────┬─────────────────────┬───────────────────┐ -│ CustomerID │ CompanyName │ ContactName │ -├────────────┼─────────────────────┼───────────────────┤ -│ 1 │ Alfreds Futterkiste │ Maria Anders │ -├────────────┼─────────────────────┼───────────────────┤ -│ 4 │ Around the Horn │ Thomas Hardy │ -├────────────┼─────────────────────┼───────────────────┤ -│ 11 │ Bs Beverages │ Victoria Ashworth │ -├────────────┼─────────────────────┼───────────────────┤ -│ 13 │ Bs Beverages │ Random Name │ -└────────────┴─────────────────────┴───────────────────┘ + 🌀 Mapping SQL input into an array of statements + 🌀 Parsing 1 statements + 🌀 Executing on test (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx): + 🚣 Executed 1 command in 11.846710999961942ms + ┌────────────┬─────────────────────┬───────────────────┐ + │ CustomerID │ CompanyName │ ContactName │ + ├────────────┼─────────────────────┼───────────────────┤ + │ 1 │ Alfreds Futterkiste │ Maria Anders │ + ├────────────┼─────────────────────┼───────────────────┤ + │ 4 │ Around the Horn │ Thomas Hardy │ + ├────────────┼─────────────────────┼───────────────────┤ + │ 11 │ Bs Beverages │ Victoria Ashworth │ + ├────────────┼─────────────────────┼───────────────────┤ + │ 13 │ Bs Beverages │ Random Name │ + └────────────┴─────────────────────┴───────────────────┘ + ``` -```` -**After:** + **After:** -```bash -rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" --json -[ - { - "results": [ - { - "CustomerID": 1, - "CompanyName": "Alfreds Futterkiste", - "ContactName": "Maria Anders" - }, - { - "CustomerID": 4, - "CompanyName": "Around the Horn", - "ContactName": "Thomas Hardy" - }, - { - "CustomerID": 11, - "CompanyName": "Bs Beverages", - "ContactName": "Victoria Ashworth" - }, - { - "CustomerID": 13, - "CompanyName": "Bs Beverages", - "ContactName": "Random Name" + ```bash + rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from customers" --json + [ + { + "results": [ + { + "CustomerID": 1, + "CompanyName": "Alfreds Futterkiste", + "ContactName": "Maria Anders" + }, + { + "CustomerID": 4, + "CompanyName": "Around the Horn", + "ContactName": "Thomas Hardy" + }, + { + "CustomerID": 11, + "CompanyName": "Bs Beverages", + "ContactName": "Victoria Ashworth" + }, + { + "CustomerID": 13, + "CompanyName": "Bs Beverages", + "ContactName": "Random Name" + } + ], + "success": true, + "meta": { + "duration": 1.662519000004977, + "last_row_id": null, + "changes": null, + "served_by": "primary-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.db3", + "internal_stats": null } - ], - "success": true, - "meta": { - "duration": 1.662519000004977, - "last_row_id": null, - "changes": null, - "served_by": "primary-xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.db3", - "internal_stats": null } - } -] -```` + ] + ``` ## 2.8.1 ### Patch Changes -- [#2501](https://github.com/cloudflare/wrangler2/pull/2501) [`a0e5a491`](https://github.com/cloudflare/wrangler2/commit/a0e5a4913621cffe757b2d14b6f3f466831f3d7f) Thanks [@geelen](https://github.com/geelen)! - fix: make it possible to query d1 databases from durable objects +- [#2501](https://github.com/cloudflare/workers-sdk/pull/2501) [`a0e5a491`](https://github.com/cloudflare/workers-sdk/commit/a0e5a4913621cffe757b2d14b6f3f466831f3d7f) Thanks [@geelen](https://github.com/geelen)! - fix: make it possible to query d1 databases from durable objects This PR makes it possible to access D1 from Durable Objects. @@ -186,13 +183,13 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c You'll be able to access your D1 database via `env.DB` in your Durable Object. -* [#2280](https://github.com/cloudflare/wrangler2/pull/2280) [`ef110923`](https://github.com/cloudflare/wrangler2/commit/ef1109235fb81200f32b953e9d448f9684d0363c) Thanks [@penalosa](https://github.com/penalosa)! - Support `queue` and `trace` events in module middleware. This means that `queue` and `trace` events should work properly with the `--test-scheduled` flag +* [#2280](https://github.com/cloudflare/workers-sdk/pull/2280) [`ef110923`](https://github.com/cloudflare/workers-sdk/commit/ef1109235fb81200f32b953e9d448f9684d0363c) Thanks [@penalosa](https://github.com/penalosa)! - Support `queue` and `trace` events in module middleware. This means that `queue` and `trace` events should work properly with the `--test-scheduled` flag -- [#2526](https://github.com/cloudflare/wrangler2/pull/2526) [`69d379a4`](https://github.com/cloudflare/wrangler2/commit/69d379a48dd49c9c1812c89b2c7f1680e2196c0f) Thanks [@jrf0110](https://github.com/jrf0110)! - Adds unstable_pages module to JS API +- [#2526](https://github.com/cloudflare/workers-sdk/pull/2526) [`69d379a4`](https://github.com/cloudflare/workers-sdk/commit/69d379a48dd49c9c1812c89b2c7f1680e2196c0f) Thanks [@jrf0110](https://github.com/jrf0110)! - Adds unstable_pages module to JS API -* [#2558](https://github.com/cloudflare/wrangler2/pull/2558) [`b910f644`](https://github.com/cloudflare/wrangler2/commit/b910f644c7440ad034ffcaab288fcbb64deaa83b) Thanks [@caass](https://github.com/caass)! - Add metrics for deployments +* [#2558](https://github.com/cloudflare/workers-sdk/pull/2558) [`b910f644`](https://github.com/cloudflare/workers-sdk/commit/b910f644c7440ad034ffcaab288fcbb64deaa83b) Thanks [@caass](https://github.com/caass)! - Add metrics for deployments -- [#2554](https://github.com/cloudflare/wrangler2/pull/2554) [`fbeaf609`](https://github.com/cloudflare/wrangler2/commit/fbeaf6090e5eca4730358caa1838d0866d7b6006) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - feat: Add support for wasm module imports in `wrangler pages dev` +- [#2554](https://github.com/cloudflare/workers-sdk/pull/2554) [`fbeaf609`](https://github.com/cloudflare/workers-sdk/commit/fbeaf6090e5eca4730358caa1838d0866d7b6006) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - feat: Add support for wasm module imports in `wrangler pages dev` Currently it is not possible to import `wasm` modules in either Pages Functions or Pages Advanced Mode projects. @@ -212,7 +209,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c } ``` -* [#2563](https://github.com/cloudflare/wrangler2/pull/2563) [`5ba39569`](https://github.com/cloudflare/wrangler2/commit/5ba39569e7ca6e341635b9beb8edebc60ad17dcd) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix: Copy module imports related files to outdir +* [#2563](https://github.com/cloudflare/workers-sdk/pull/2563) [`5ba39569`](https://github.com/cloudflare/workers-sdk/commit/5ba39569e7ca6e341635b9beb8edebc60ad17dcd) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix: Copy module imports related files to outdir When we bundle a Worker `esbuild` takes care of writing the results to the output directory. However, if the Worker contains @@ -233,9 +230,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Minor Changes -- [#2538](https://github.com/cloudflare/wrangler2/pull/2538) [`af4f27c5`](https://github.com/cloudflare/wrangler2/commit/af4f27c5966f52e605ab7c16ff9746b7802d3479) Thanks [@edevil](https://github.com/edevil)! - feat: support EmailEvent event type in `wrangler tail`. +- [#2538](https://github.com/cloudflare/workers-sdk/pull/2538) [`af4f27c5`](https://github.com/cloudflare/workers-sdk/commit/af4f27c5966f52e605ab7c16ff9746b7802d3479) Thanks [@edevil](https://github.com/edevil)! - feat: support EmailEvent event type in `wrangler tail`. -* [#2404](https://github.com/cloudflare/wrangler2/pull/2404) [`3f824347`](https://github.com/cloudflare/wrangler2/commit/3f824347c624a2cedf4af2b6bbd781b8581b08b5) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: support bundling the raw Pages `_worker.js` before deploying +* [#2404](https://github.com/cloudflare/workers-sdk/pull/2404) [`3f824347`](https://github.com/cloudflare/workers-sdk/commit/3f824347c624a2cedf4af2b6bbd781b8581b08b5) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: support bundling the raw Pages `_worker.js` before deploying Previously, if you provided a `_worker.js` file, then Pages would simply check the file for disallowed imports and then deploy the file as-is. @@ -254,36 +251,36 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2525](https://github.com/cloudflare/wrangler2/pull/2525) [`fe8c6917`](https://github.com/cloudflare/wrangler2/commit/fe8c69173821cfa5b0277e018df3a6207234b213) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: send `wrangler docs d1` to the right place +- [#2525](https://github.com/cloudflare/workers-sdk/pull/2525) [`fe8c6917`](https://github.com/cloudflare/workers-sdk/commit/fe8c69173821cfa5b0277e018df3a6207234b213) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: send `wrangler docs d1` to the right place -* [#2542](https://github.com/cloudflare/wrangler2/pull/2542) [`b44e1a75`](https://github.com/cloudflare/wrangler2/commit/b44e1a7525248a4482248695742f3020347e3502) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Rename `--bundle` to `--no-bundle` in Pages commands to make similar to Workers +* [#2542](https://github.com/cloudflare/workers-sdk/pull/2542) [`b44e1a75`](https://github.com/cloudflare/workers-sdk/commit/b44e1a7525248a4482248695742f3020347e3502) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Rename `--bundle` to `--no-bundle` in Pages commands to make similar to Workers -- [#2551](https://github.com/cloudflare/wrangler2/pull/2551) [`bfffe595`](https://github.com/cloudflare/wrangler2/commit/bfffe59558675a3c943fc24bb8b4e29066ae0581) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: wrangler init --from-dash incorrectly expects index.ts while writing index.js +- [#2551](https://github.com/cloudflare/workers-sdk/pull/2551) [`bfffe595`](https://github.com/cloudflare/workers-sdk/commit/bfffe59558675a3c943fc24bb8b4e29066ae0581) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: wrangler init --from-dash incorrectly expects index.ts while writing index.js This PR fixes a bug where Wrangler would write a `wrangler.toml` expecting an index.ts file, while writing an index.js file. -* [#2529](https://github.com/cloudflare/wrangler2/pull/2529) [`2270507c`](https://github.com/cloudflare/wrangler2/commit/2270507c7e7c7f0be4c39a9ee283147c0fe245cd) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Remove "experimental \_routes.json" warnings +* [#2529](https://github.com/cloudflare/workers-sdk/pull/2529) [`2270507c`](https://github.com/cloudflare/workers-sdk/commit/2270507c7e7c7f0be4c39a9ee283147c0fe245cd) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Remove "experimental \_routes.json" warnings `_routes.json` is no longer considered an experimental feature, so let's remove all warnings we have in place for that. -- [#2548](https://github.com/cloudflare/wrangler2/pull/2548) [`4db768fa`](https://github.com/cloudflare/wrangler2/commit/4db768fa5e05e4351b08113a20525c700324d502) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: path should be optional for wrangler d1 backup download +- [#2548](https://github.com/cloudflare/workers-sdk/pull/2548) [`4db768fa`](https://github.com/cloudflare/workers-sdk/commit/4db768fa5e05e4351b08113a20525c700324d502) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: path should be optional for wrangler d1 backup download This PR fixes a bug that forces folks to provide a `--output` flag to `wrangler d1 backup download`. -* [#2528](https://github.com/cloudflare/wrangler2/pull/2528) [`18208091`](https://github.com/cloudflare/wrangler2/commit/18208091335e6fa60e736cdeed46462c4be42a38) Thanks [@caass](https://github.com/caass)! - Add some guidance when folks encounter a 10021 error. +* [#2528](https://github.com/cloudflare/workers-sdk/pull/2528) [`18208091`](https://github.com/cloudflare/workers-sdk/commit/18208091335e6fa60e736cdeed46462c4be42a38) Thanks [@caass](https://github.com/caass)! - Add some guidance when folks encounter a 10021 error. Error code 10021 can occur when your worker doesn't pass startup validation. This error message will make it a little easier to reason about what happened and what to do next. Closes #2519 -- [#1769](https://github.com/cloudflare/wrangler2/pull/1769) [`6a67efe9`](https://github.com/cloudflare/wrangler2/commit/6a67efe9ae1da27fb95ffb030959465781bc74b6) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - allow `fetch()` calls locally to accept URL Objects +- [#1769](https://github.com/cloudflare/workers-sdk/pull/1769) [`6a67efe9`](https://github.com/cloudflare/workers-sdk/commit/6a67efe9ae1da27fb95ffb030959465781bc74b6) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - allow `fetch()` calls locally to accept URL Objects ## 2.7.1 ### Patch Changes -- [#2523](https://github.com/cloudflare/wrangler2/pull/2523) [`a5e9958c`](https://github.com/cloudflare/wrangler2/commit/a5e9958c7e37dd38c00ac6b713a21441491777fd) Thanks [@jahands](https://github.com/jahands)! - fix: unstable_dev() experimental options incorrectly applying defaults +- [#2523](https://github.com/cloudflare/workers-sdk/pull/2523) [`a5e9958c`](https://github.com/cloudflare/workers-sdk/commit/a5e9958c7e37dd38c00ac6b713a21441491777fd) Thanks [@jahands](https://github.com/jahands)! - fix: unstable_dev() experimental options incorrectly applying defaults A subtle difference when removing object-spreading of experimental unstable_dev() options caused `wrangler pages dev` interactivity to stop working. This switches back to object-spreading the passed in options on top of the defaults, fixing the issue. @@ -291,24 +288,24 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Minor Changes -- [#2465](https://github.com/cloudflare/wrangler2/pull/2465) [`e1c2f5b9`](https://github.com/cloudflare/wrangler2/commit/e1c2f5b9653ecc183bbc8a33531babd26e10d241) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - After this PR, `wrangler init --yes` will generate a test for your new Worker project, using Vitest with TypeScript. +- [#2465](https://github.com/cloudflare/workers-sdk/pull/2465) [`e1c2f5b9`](https://github.com/cloudflare/workers-sdk/commit/e1c2f5b9653ecc183bbc8a33531babd26e10d241) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - After this PR, `wrangler init --yes` will generate a test for your new Worker project, using Vitest with TypeScript. When using `wrangler init`, and choosing to create a Typescript project, you will now be asked if Wrangler should write tests for you, using Vitest. This resolves issue #2436. -* [#2333](https://github.com/cloudflare/wrangler2/pull/2333) [`71691421`](https://github.com/cloudflare/wrangler2/commit/7169142171b1c9b4ff2f19b8b46871932ef7d10a) Thanks [@markjmiller](https://github.com/markjmiller)! - Remove the experimental binding warning from Dispatch Namespace since [it is GA](https://blog.cloudflare.com/workers-for-platforms-ga/). +* [#2333](https://github.com/cloudflare/workers-sdk/pull/2333) [`71691421`](https://github.com/cloudflare/workers-sdk/commit/7169142171b1c9b4ff2f19b8b46871932ef7d10a) Thanks [@markjmiller](https://github.com/markjmiller)! - Remove the experimental binding warning from Dispatch Namespace since [it is GA](https://blog.cloudflare.com/workers-for-platforms-ga/). ### Patch Changes -- [#2460](https://github.com/cloudflare/wrangler2/pull/2460) [`c2b2dfb8`](https://github.com/cloudflare/wrangler2/commit/c2b2dfb8e5b44ee73418a01682e65d0ca1320797) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: resolve unstable_dev flakiness in tests by awaiting the dev registry +- [#2460](https://github.com/cloudflare/workers-sdk/pull/2460) [`c2b2dfb8`](https://github.com/cloudflare/workers-sdk/commit/c2b2dfb8e5b44ee73418a01682e65d0ca1320797) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: resolve unstable_dev flakiness in tests by awaiting the dev registry -* [#2439](https://github.com/cloudflare/wrangler2/pull/2439) [`616f8739`](https://github.com/cloudflare/wrangler2/commit/616f8739253381e8d691084961159d1a0073d81f) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix(wrangler): do not login or read wrangler.toml when applying D1 migrations in local mode. +* [#2439](https://github.com/cloudflare/workers-sdk/pull/2439) [`616f8739`](https://github.com/cloudflare/workers-sdk/commit/616f8739253381e8d691084961159d1a0073d81f) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix(wrangler): do not login or read wrangler.toml when applying D1 migrations in local mode. When applying D1 migrations to a deployed database, it is important that we are logged in and that we have the database ID from the wrangler.toml. This is not needed for `--local` mode where we are just writing to a local SQLite file. -- [#1869](https://github.com/cloudflare/wrangler2/pull/1869) [`917b07b0`](https://github.com/cloudflare/wrangler2/commit/917b07b0d7ee6cdfae2edfa21fe3056a4475dd44) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: enable Wrangler to target the staging API by setting WRANGLER_API_ENVIRONMENT=staging +- [#1869](https://github.com/cloudflare/workers-sdk/pull/1869) [`917b07b0`](https://github.com/cloudflare/workers-sdk/commit/917b07b0d7ee6cdfae2edfa21fe3056a4475dd44) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: enable Wrangler to target the staging API by setting WRANGLER_API_ENVIRONMENT=staging If you are developing Wrangler, or an internal Cloudflare feature, and during testing, need Wrangler to target the staging API rather than production, it is now possible by @@ -318,17 +315,17 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c also (if necessary) acquire an Access token for to get through the firewall to the staging URLs. -* [#2377](https://github.com/cloudflare/wrangler2/pull/2377) [`32686e42`](https://github.com/cloudflare/wrangler2/commit/32686e42b055c786f9821bbd66dd33960ab8f4d1) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix `ReferenceError` when using `wrangler dev --experimental-local` in Node 16 +* [#2377](https://github.com/cloudflare/workers-sdk/pull/2377) [`32686e42`](https://github.com/cloudflare/workers-sdk/commit/32686e42b055c786f9821bbd66dd33960ab8f4d1) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix `ReferenceError` when using `wrangler dev --experimental-local` in Node 16 -- [#2393](https://github.com/cloudflare/wrangler2/pull/2393) [`a6d24732`](https://github.com/cloudflare/wrangler2/commit/a6d24732e2553e220222cba7b70d9f1607602203) Thanks [@mrbbot](https://github.com/mrbbot)! - Remove login requirement from `wrangler dev --experimental-local` +- [#2393](https://github.com/cloudflare/workers-sdk/pull/2393) [`a6d24732`](https://github.com/cloudflare/workers-sdk/commit/a6d24732e2553e220222cba7b70d9f1607602203) Thanks [@mrbbot](https://github.com/mrbbot)! - Remove login requirement from `wrangler dev --experimental-local` -* [#2502](https://github.com/cloudflare/wrangler2/pull/2502) [`6b7ebc8d`](https://github.com/cloudflare/wrangler2/commit/6b7ebc8dd0dee5521bce49a6dfff997d308e900e) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.11.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.11.0) +* [#2502](https://github.com/cloudflare/workers-sdk/pull/2502) [`6b7ebc8d`](https://github.com/cloudflare/workers-sdk/commit/6b7ebc8dd0dee5521bce49a6dfff997d308e900e) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.11.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.11.0) -- [#2485](https://github.com/cloudflare/wrangler2/pull/2485) [`4c0e2309`](https://github.com/cloudflare/wrangler2/commit/4c0e230950e9ef3dcb37d5b222b642cb0b0d8c9e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Pages Plugin routing when mounted at the root of a project +- [#2485](https://github.com/cloudflare/workers-sdk/pull/2485) [`4c0e2309`](https://github.com/cloudflare/workers-sdk/commit/4c0e230950e9ef3dcb37d5b222b642cb0b0d8c9e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Pages Plugin routing when mounted at the root of a project Previously, there was a bug which meant that Plugins mounted at the root of a Pages project were not correctly matching incoming requests. This change fixes that bug so Plugins mounted at the root should now correctly work. -* [#2479](https://github.com/cloudflare/wrangler2/pull/2479) [`7b479b91`](https://github.com/cloudflare/wrangler2/commit/7b479b9104266c83dda3b4e4a89ab9b919b743f0) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: bump d1js +* [#2479](https://github.com/cloudflare/workers-sdk/pull/2479) [`7b479b91`](https://github.com/cloudflare/workers-sdk/commit/7b479b9104266c83dda3b4e4a89ab9b919b743f0) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: bump d1js This PR bumps d1js, adding the following functionality to the d1 alpha shim: @@ -336,18 +333,18 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c - converts ArrayBuffer to array - converts typedArray to array -- [#2392](https://github.com/cloudflare/wrangler2/pull/2392) [`7785591c`](https://github.com/cloudflare/wrangler2/commit/7785591c95281a85ffb61eb514b850144970c4b2) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: improve `wrangler init --from-dash` help text and error handling +- [#2392](https://github.com/cloudflare/workers-sdk/pull/2392) [`7785591c`](https://github.com/cloudflare/workers-sdk/commit/7785591c95281a85ffb61eb514b850144970c4b2) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: improve `wrangler init --from-dash` help text and error handling -* [#2391](https://github.com/cloudflare/wrangler2/pull/2391) [`19525a4b`](https://github.com/cloudflare/wrangler2/commit/19525a4b9ca8d26022510fef463d0169f704896e) Thanks [@mrbbot](https://github.com/mrbbot)! - Always log when delegating to local `wrangler` install. +* [#2391](https://github.com/cloudflare/workers-sdk/pull/2391) [`19525a4b`](https://github.com/cloudflare/workers-sdk/commit/19525a4b9ca8d26022510fef463d0169f704896e) Thanks [@mrbbot](https://github.com/mrbbot)! - Always log when delegating to local `wrangler` install. When a global `wrangler` command is executed in a package directory with `wrangler` installed locally, the command is redirected to the local `wrangler` install. We now always log a message when this happens, so you know what's going on. -- [#2468](https://github.com/cloudflare/wrangler2/pull/2468) [`97282459`](https://github.com/cloudflare/wrangler2/commit/972824598438cc40c6179ea9d2d0229cbd9f3684) Thanks [@rozenmd](https://github.com/rozenmd)! - BREAKING CHANGE: move experimental options under the experimental object for unstable_dev +- [#2468](https://github.com/cloudflare/workers-sdk/pull/2468) [`97282459`](https://github.com/cloudflare/workers-sdk/commit/972824598438cc40c6179ea9d2d0229cbd9f3684) Thanks [@rozenmd](https://github.com/rozenmd)! - BREAKING CHANGE: move experimental options under the experimental object for unstable_dev -* [#2477](https://github.com/cloudflare/wrangler2/pull/2477) [`3bd1b676`](https://github.com/cloudflare/wrangler2/commit/3bd1b6765729d39f0a5d2adef06cffeac7766b51) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: update NO_D1_WARNING to make it clear how to turn it off +* [#2477](https://github.com/cloudflare/workers-sdk/pull/2477) [`3bd1b676`](https://github.com/cloudflare/workers-sdk/commit/3bd1b6765729d39f0a5d2adef06cffeac7766b51) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: update NO_D1_WARNING to make it clear how to turn it off -- [#2495](https://github.com/cloudflare/wrangler2/pull/2495) [`e93063e9`](https://github.com/cloudflare/wrangler2/commit/e93063e9854059ab4cc9a71fd22362b4ca01d3e9) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix(d1): ensure that migrations support compound statements +- [#2495](https://github.com/cloudflare/workers-sdk/pull/2495) [`e93063e9`](https://github.com/cloudflare/workers-sdk/commit/e93063e9854059ab4cc9a71fd22362b4ca01d3e9) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix(d1): ensure that migrations support compound statements This fix updates the SQL statement splitting so that it does not split in the middle of compound statements. Previously we were using a third party splitting library, but this needed fixing and was actually unnecessary for our purposes. @@ -356,18 +353,18 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Fixes #2463 -* [#2400](https://github.com/cloudflare/wrangler2/pull/2400) [`08a0b22e`](https://github.com/cloudflare/wrangler2/commit/08a0b22e3f7e5ed536b7537ee5e93c39544bcfa0) Thanks [@mrbbot](https://github.com/mrbbot)! - Cleanly exit `wrangler dev --experimental-local` when pressing `x`/`q`/`CTRL-C` +* [#2400](https://github.com/cloudflare/workers-sdk/pull/2400) [`08a0b22e`](https://github.com/cloudflare/workers-sdk/commit/08a0b22e3f7e5ed536b7537ee5e93c39544bcfa0) Thanks [@mrbbot](https://github.com/mrbbot)! - Cleanly exit `wrangler dev --experimental-local` when pressing `x`/`q`/`CTRL-C` -- [#2374](https://github.com/cloudflare/wrangler2/pull/2374) [`ecba1ede`](https://github.com/cloudflare/wrangler2/commit/ecba1edea298b89cdffa4b68c924d879f0f0d13b) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make --from-dash error output clearer +- [#2374](https://github.com/cloudflare/workers-sdk/pull/2374) [`ecba1ede`](https://github.com/cloudflare/workers-sdk/commit/ecba1edea298b89cdffa4b68c924d879f0f0d13b) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make --from-dash error output clearer This PR makes it clearer what --from-dash wants from you. closes #2373 closes #2375 -* [#2377](https://github.com/cloudflare/wrangler2/pull/2377) [`32686e42`](https://github.com/cloudflare/wrangler2/commit/32686e42b055c786f9821bbd66dd33960ab8f4d1) Thanks [@mrbbot](https://github.com/mrbbot)! - Respect `FORCE_COLOR=0` environment variable to disable colored output when using `wrangler dev --local` +* [#2377](https://github.com/cloudflare/workers-sdk/pull/2377) [`32686e42`](https://github.com/cloudflare/workers-sdk/commit/32686e42b055c786f9821bbd66dd33960ab8f4d1) Thanks [@mrbbot](https://github.com/mrbbot)! - Respect `FORCE_COLOR=0` environment variable to disable colored output when using `wrangler dev --local` -- [#2455](https://github.com/cloudflare/wrangler2/pull/2455) [`d9c1d273`](https://github.com/cloudflare/wrangler2/commit/d9c1d2739c8335b0d7ba386e27a370aff1eca7b7) Thanks [@rozenmd](https://github.com/rozenmd)! - BREAKING CHANGE: refactor unstable_dev to use an experimental object, instead of a second options object +- [#2455](https://github.com/cloudflare/workers-sdk/pull/2455) [`d9c1d273`](https://github.com/cloudflare/workers-sdk/commit/d9c1d2739c8335b0d7ba386e27a370aff1eca7b7) Thanks [@rozenmd](https://github.com/rozenmd)! - BREAKING CHANGE: refactor unstable_dev to use an experimental object, instead of a second options object Before, if you wanted to disable the experimental warning, you would run: @@ -391,17 +388,17 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2355](https://github.com/cloudflare/wrangler2/pull/2355) [`df6fea02`](https://github.com/cloudflare/wrangler2/commit/df6fea02b53066e54c12770cdb439e2dbb3208ea) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: don't ask for preview_database_id in --local +- [#2355](https://github.com/cloudflare/workers-sdk/pull/2355) [`df6fea02`](https://github.com/cloudflare/workers-sdk/commit/df6fea02b53066e54c12770cdb439e2dbb3208ea) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: don't ask for preview_database_id in --local -* [#2349](https://github.com/cloudflare/wrangler2/pull/2349) [`8173bcca`](https://github.com/cloudflare/wrangler2/commit/8173bcca09fde15ffdde72bd125fb6968f4a9272) Thanks [@jspspike](https://github.com/jspspike)! - Initially check that worker exists when using --from-dash +* [#2349](https://github.com/cloudflare/workers-sdk/pull/2349) [`8173bcca`](https://github.com/cloudflare/workers-sdk/commit/8173bcca09fde15ffdde72bd125fb6968f4a9272) Thanks [@jspspike](https://github.com/jspspike)! - Initially check that worker exists when using --from-dash -- [#2356](https://github.com/cloudflare/wrangler2/pull/2356) [`228781ee`](https://github.com/cloudflare/wrangler2/commit/228781eeb4b2d22275312876d07191017b6d8a06) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: add wrangler docs command +- [#2356](https://github.com/cloudflare/workers-sdk/pull/2356) [`228781ee`](https://github.com/cloudflare/workers-sdk/commit/228781eeb4b2d22275312876d07191017b6d8a06) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: add wrangler docs command -* [#2364](https://github.com/cloudflare/wrangler2/pull/2364) [`4bdb1f6d`](https://github.com/cloudflare/wrangler2/commit/4bdb1f6d0d3fbc4603542a743d25376574e0cdfc) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: implement `wrangler docs ` +* [#2364](https://github.com/cloudflare/workers-sdk/pull/2364) [`4bdb1f6d`](https://github.com/cloudflare/workers-sdk/commit/4bdb1f6d0d3fbc4603542a743d25376574e0cdfc) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: implement `wrangler docs ` closes #2359 -- [#2341](https://github.com/cloudflare/wrangler2/pull/2341) [`5afa13ec`](https://github.com/cloudflare/wrangler2/commit/5afa13ec8026bcfe4e09f4b523733236ccec0814) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: d1 - don't backup prod db when applying migrations locally +- [#2341](https://github.com/cloudflare/workers-sdk/pull/2341) [`5afa13ec`](https://github.com/cloudflare/workers-sdk/commit/5afa13ec8026bcfe4e09f4b523733236ccec0814) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: d1 - don't backup prod db when applying migrations locally Closes #2336 @@ -409,7 +406,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2339](https://github.com/cloudflare/wrangler2/pull/2339) [`f6821189`](https://github.com/cloudflare/wrangler2/commit/f6821189110e5b6301fe77509a6bb9a8652bbc1b) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: `wrangler dev --local` now correctly lazy-imports `@miniflare/tre` +- [#2339](https://github.com/cloudflare/workers-sdk/pull/2339) [`f6821189`](https://github.com/cloudflare/workers-sdk/commit/f6821189110e5b6301fe77509a6bb9a8652bbc1b) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: `wrangler dev --local` now correctly lazy-imports `@miniflare/tre` Previously, we introduced a bug where we were incorrectly requiring `@miniflare/tre`, even when not using the `workerd`/`--experimental-local` mode. @@ -417,11 +414,11 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Minor Changes -- [#2268](https://github.com/cloudflare/wrangler2/pull/2268) [`3be1c2cf`](https://github.com/cloudflare/wrangler2/commit/3be1c2cf99fdaef1e612937ccc487a5196c5df67) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add support for `--experimental-local` to `wrangler pages dev` which will use the `workerd` runtime. +- [#2268](https://github.com/cloudflare/workers-sdk/pull/2268) [`3be1c2cf`](https://github.com/cloudflare/workers-sdk/commit/3be1c2cf99fdaef1e612937ccc487a5196c5df67) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add support for `--experimental-local` to `wrangler pages dev` which will use the `workerd` runtime. Add `@miniflare/tre` environment polyfill to `@cloudflare/pages-shared`. -* [#2163](https://github.com/cloudflare/wrangler2/pull/2163) [`d73a34be`](https://github.com/cloudflare/wrangler2/commit/d73a34be07c0bd14dc2eabc8cb0474f0d4a64c53) Thanks [@jimhawkridge](https://github.com/jimhawkridge)! - feat: Add support for Analytics Engine bindings. +* [#2163](https://github.com/cloudflare/workers-sdk/pull/2163) [`d73a34be`](https://github.com/cloudflare/workers-sdk/commit/d73a34be07c0bd14dc2eabc8cb0474f0d4a64c53) Thanks [@jimhawkridge](https://github.com/jimhawkridge)! - feat: Add support for Analytics Engine bindings. For example: @@ -433,19 +430,19 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2177](https://github.com/cloudflare/wrangler2/pull/2177) [`e98613f8`](https://github.com/cloudflare/wrangler2/commit/e98613f8e2f417f996f351a67cdff54c05f0d194) Thanks [@caass](https://github.com/caass)! - Trigger login flow if a user runs `wrangler dev` while logged out +- [#2177](https://github.com/cloudflare/workers-sdk/pull/2177) [`e98613f8`](https://github.com/cloudflare/workers-sdk/commit/e98613f8e2f417f996f351a67cdff54c05f0d194) Thanks [@caass](https://github.com/caass)! - Trigger login flow if a user runs `wrangler dev` while logged out Previously, we would just error if a user logged out and then ran `wrangler dev`. Now, we kick them to the OAuth flow and suggest running `wrangler dev --local` if the login fails. - Closes [#2147](https://github.com/cloudflare/wrangler2/issues/2147) + Closes [#2147](https://github.com/cloudflare/workers-sdk/issues/2147) -* [#2298](https://github.com/cloudflare/wrangler2/pull/2298) [`bb5e4f91`](https://github.com/cloudflare/wrangler2/commit/bb5e4f91512d9e12e7a90a9db3ee426b5e535934) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: d1 not using the preview database when using `wrangler dev` +* [#2298](https://github.com/cloudflare/workers-sdk/pull/2298) [`bb5e4f91`](https://github.com/cloudflare/workers-sdk/commit/bb5e4f91512d9e12e7a90a9db3ee426b5e535934) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: d1 not using the preview database when using `wrangler dev` After this fix, wrangler will correctly connect to the preview database, rather than the prod database when using `wrangler dev` -- [#2176](https://github.com/cloudflare/wrangler2/pull/2176) [`d48ee112`](https://github.com/cloudflare/wrangler2/commit/d48ee1124a4a7a8834e228ccdaafbc3fc71b9357) Thanks [@caass](https://github.com/caass)! - Use the user's preferred default branch name if set in .gitconfig. +- [#2176](https://github.com/cloudflare/workers-sdk/pull/2176) [`d48ee112`](https://github.com/cloudflare/workers-sdk/commit/d48ee1124a4a7a8834e228ccdaafbc3fc71b9357) Thanks [@caass](https://github.com/caass)! - Use the user's preferred default branch name if set in .gitconfig. Previously, we would initialize new workers with `main` as the name of the default branch. Now, we see if the user has a custom setting in .gitconfig for `init.defaultBranch`, and use @@ -453,81 +450,81 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #2112 -* [#2275](https://github.com/cloudflare/wrangler2/pull/2275) [`bbfb6a96`](https://github.com/cloudflare/wrangler2/commit/bbfb6a960e1f57a1b3214497f05f1d55b8dfb5c0) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix script reloads, and allow clean exits, when using `--experimental-local` on Linux +* [#2275](https://github.com/cloudflare/workers-sdk/pull/2275) [`bbfb6a96`](https://github.com/cloudflare/workers-sdk/commit/bbfb6a960e1f57a1b3214497f05f1d55b8dfb5c0) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix script reloads, and allow clean exits, when using `--experimental-local` on Linux -- [#2275](https://github.com/cloudflare/wrangler2/pull/2275) [`bbfb6a96`](https://github.com/cloudflare/wrangler2/commit/bbfb6a960e1f57a1b3214497f05f1d55b8dfb5c0) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix DevTools inspector support when using `--(experimental-)local` +- [#2275](https://github.com/cloudflare/workers-sdk/pull/2275) [`bbfb6a96`](https://github.com/cloudflare/workers-sdk/commit/bbfb6a960e1f57a1b3214497f05f1d55b8dfb5c0) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix DevTools inspector support when using `--(experimental-)local` ## 2.5.0 ### Minor Changes -- [#2212](https://github.com/cloudflare/wrangler2/pull/2212) [`b24c2b2d`](https://github.com/cloudflare/wrangler2/commit/b24c2b2dc639a3b3ff528591d1758753cb64fc3c) Thanks [@dalbitresb12](https://github.com/dalbitresb12)! - feat: Allow pages dev to proxy websocket requests +- [#2212](https://github.com/cloudflare/workers-sdk/pull/2212) [`b24c2b2d`](https://github.com/cloudflare/workers-sdk/commit/b24c2b2dc639a3b3ff528591d1758753cb64fc3c) Thanks [@dalbitresb12](https://github.com/dalbitresb12)! - feat: Allow pages dev to proxy websocket requests ### Patch Changes -- [#2296](https://github.com/cloudflare/wrangler2/pull/2296) [`7da8f0e6`](https://github.com/cloudflare/wrangler2/commit/7da8f0e69932d2ac849ecb06ab280c1d8756619f) Thanks [@Skye-31](https://github.com/Skye-31)! - Fix: check response status of `d1 backup download` command before writing contents to file +- [#2296](https://github.com/cloudflare/workers-sdk/pull/2296) [`7da8f0e6`](https://github.com/cloudflare/workers-sdk/commit/7da8f0e69932d2ac849ecb06ab280c1d8756619f) Thanks [@Skye-31](https://github.com/Skye-31)! - Fix: check response status of `d1 backup download` command before writing contents to file -* [#2260](https://github.com/cloudflare/wrangler2/pull/2260) [`c2940160`](https://github.com/cloudflare/wrangler2/commit/c29401604640940a5382a206f7bac900a3aad7b2) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make it possible to use a local db for d1 migrations +* [#2260](https://github.com/cloudflare/workers-sdk/pull/2260) [`c2940160`](https://github.com/cloudflare/workers-sdk/commit/c29401604640940a5382a206f7bac900a3aad7b2) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make it possible to use a local db for d1 migrations As of this change, wrangler's d1 migrations commands now accept `local` and `persist-to` as flags, so migrations can run against the local d1 db. -- [#1883](https://github.com/cloudflare/wrangler2/pull/1883) [`60d31c01`](https://github.com/cloudflare/wrangler2/commit/60d31c010656d10e0093921259019f67f15554ec) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Fix `--port=0` option to report the actually used port. +- [#1883](https://github.com/cloudflare/workers-sdk/pull/1883) [`60d31c01`](https://github.com/cloudflare/workers-sdk/commit/60d31c010656d10e0093921259019f67f15554ec) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Fix `--port=0` option to report the actually used port. ## 2.4.4 ### Patch Changes -- [#2265](https://github.com/cloudflare/wrangler2/pull/2265) [`42d88e3f`](https://github.com/cloudflare/wrangler2/commit/42d88e3f8dda5b40d17bd684cfc5475ab1505a18) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Fix D1 bindings in `wrangler pages dev` +- [#2265](https://github.com/cloudflare/workers-sdk/pull/2265) [`42d88e3f`](https://github.com/cloudflare/workers-sdk/commit/42d88e3f8dda5b40d17bd684cfc5475ab1505a18) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Fix D1 bindings in `wrangler pages dev` ## 2.4.3 ### Patch Changes -- [#2249](https://github.com/cloudflare/wrangler2/pull/2249) [`e41c7e41`](https://github.com/cloudflare/wrangler2/commit/e41c7e41c3ee36d852daad859cd8cbb31641f95f) Thanks [@mrbbot](https://github.com/mrbbot)! - Enable pretty source-mapped error pages when using `--experimental-local` +- [#2249](https://github.com/cloudflare/workers-sdk/pull/2249) [`e41c7e41`](https://github.com/cloudflare/workers-sdk/commit/e41c7e41c3ee36d852daad859cd8cbb31641f95f) Thanks [@mrbbot](https://github.com/mrbbot)! - Enable pretty source-mapped error pages when using `--experimental-local` -* [#2208](https://github.com/cloudflare/wrangler2/pull/2208) [`5bd04296`](https://github.com/cloudflare/wrangler2/commit/5bd04296ea15a72fbd8c3ac395d129d0dcfb9179) Thanks [@OilyLime](https://github.com/OilyLime)! - Add link to Queues tab in dashboard when unauthorized to use Queues +* [#2208](https://github.com/cloudflare/workers-sdk/pull/2208) [`5bd04296`](https://github.com/cloudflare/workers-sdk/commit/5bd04296ea15a72fbd8c3ac395d129d0dcfb9179) Thanks [@OilyLime](https://github.com/OilyLime)! - Add link to Queues tab in dashboard when unauthorized to use Queues -- [#2248](https://github.com/cloudflare/wrangler2/pull/2248) [`effc2215`](https://github.com/cloudflare/wrangler2/commit/effc2215dd3b4a5be539d22795a59b02ca5164ff) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: remove d1 local hardcoding +- [#2248](https://github.com/cloudflare/workers-sdk/pull/2248) [`effc2215`](https://github.com/cloudflare/workers-sdk/commit/effc2215dd3b4a5be539d22795a59b02ca5164ff) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: remove d1 local hardcoding Prior to this change wrangler would only ever use local mode when testing d1. After this change d1 tests can access both local and remote Workers. -* [#2254](https://github.com/cloudflare/wrangler2/pull/2254) [`9e296a4d`](https://github.com/cloudflare/wrangler2/commit/9e296a4d0e71e7453e4b6722e7e12042040590ab) Thanks [@penalosa](https://github.com/penalosa)! - Add an option to customise whether `wrangler login` opens a browser automatically. Use `wrangler login --no-browser` to prevent a browser being open—the link will be printed to the console so it can be manually opened. +* [#2254](https://github.com/cloudflare/workers-sdk/pull/2254) [`9e296a4d`](https://github.com/cloudflare/workers-sdk/commit/9e296a4d0e71e7453e4b6722e7e12042040590ab) Thanks [@penalosa](https://github.com/penalosa)! - Add an option to customise whether `wrangler login` opens a browser automatically. Use `wrangler login --no-browser` to prevent a browser being open—the link will be printed to the console so it can be manually opened. ## 2.4.2 ### Patch Changes -- [#2232](https://github.com/cloudflare/wrangler2/pull/2232) [`5241925a`](https://github.com/cloudflare/wrangler2/commit/5241925aba4dd8566b0fa2ce69ea665a56581397) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix `wrangler types` generation for service-worker type Workers` +- [#2232](https://github.com/cloudflare/workers-sdk/pull/2232) [`5241925a`](https://github.com/cloudflare/workers-sdk/commit/5241925aba4dd8566b0fa2ce69ea665a56581397) Thanks [@mrbbot](https://github.com/mrbbot)! - Fix `wrangler types` generation for service-worker type Workers` ## 2.4.1 ### Patch Changes -- [#2229](https://github.com/cloudflare/wrangler2/pull/2229) [`8eb53b1a`](https://github.com/cloudflare/wrangler2/commit/8eb53b1a225ba947a6da4303e4cabc4660974288) Thanks [@mrbbot](https://github.com/mrbbot)! - Unhide `--live-reload` option for local mode development +- [#2229](https://github.com/cloudflare/workers-sdk/pull/2229) [`8eb53b1a`](https://github.com/cloudflare/workers-sdk/commit/8eb53b1a225ba947a6da4303e4cabc4660974288) Thanks [@mrbbot](https://github.com/mrbbot)! - Unhide `--live-reload` option for local mode development -* [#2209](https://github.com/cloudflare/wrangler2/pull/2209) [`d0f237d9`](https://github.com/cloudflare/wrangler2/commit/d0f237d9965f782ae8415fe9ff02e83e6e86b9af) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - This change makes the metrics directory XDG compliant +* [#2209](https://github.com/cloudflare/workers-sdk/pull/2209) [`d0f237d9`](https://github.com/cloudflare/workers-sdk/commit/d0f237d9965f782ae8415fe9ff02e83e6e86b9af) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - This change makes the metrics directory XDG compliant resolves #2075 -- [#2213](https://github.com/cloudflare/wrangler2/pull/2213) [`afdb7e49`](https://github.com/cloudflare/wrangler2/commit/afdb7e49828b5854742750dcc13bb2866f790492) Thanks [@mrbbot](https://github.com/mrbbot)! - Enable the Cache API when using `--experimental-local` +- [#2213](https://github.com/cloudflare/workers-sdk/pull/2213) [`afdb7e49`](https://github.com/cloudflare/workers-sdk/commit/afdb7e49828b5854742750dcc13bb2866f790492) Thanks [@mrbbot](https://github.com/mrbbot)! - Enable the Cache API when using `--experimental-local` ## 2.4.0 ### Minor Changes -- [#2193](https://github.com/cloudflare/wrangler2/pull/2193) [`0047ad30`](https://github.com/cloudflare/wrangler2/commit/0047ad304fd28f7c7f012549bfbc05d3477c7ef9) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Local Mode Console Support +- [#2193](https://github.com/cloudflare/workers-sdk/pull/2193) [`0047ad30`](https://github.com/cloudflare/workers-sdk/commit/0047ad304fd28f7c7f012549bfbc05d3477c7ef9) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Local Mode Console Support Added support for detailed `console.log` capability when using `--experimental-local` resolves #2122 ### Patch Changes -- [#2192](https://github.com/cloudflare/wrangler2/pull/2192) [`add4278a`](https://github.com/cloudflare/wrangler2/commit/add4278a2e576e4e13691a4108613c642de3005d) Thanks [@mrbbot](https://github.com/mrbbot)! - Add a `--experimental-local-remote-kv` flag to enable reading/writing from/to real KV namespaces. +- [#2192](https://github.com/cloudflare/workers-sdk/pull/2192) [`add4278a`](https://github.com/cloudflare/workers-sdk/commit/add4278a2e576e4e13691a4108613c642de3005d) Thanks [@mrbbot](https://github.com/mrbbot)! - Add a `--experimental-local-remote-kv` flag to enable reading/writing from/to real KV namespaces. Note this flag requires `--experimental-local` to be enabled. -* [#2204](https://github.com/cloudflare/wrangler2/pull/2204) [`c725ce01`](https://github.com/cloudflare/wrangler2/commit/c725ce011f5e57147dc8a2c714926edd7e2a4bfb) Thanks [@jahands](https://github.com/jahands)! - fix: Upload filepath-routing configuration in wrangler pages publish +* [#2204](https://github.com/cloudflare/workers-sdk/pull/2204) [`c725ce01`](https://github.com/cloudflare/workers-sdk/commit/c725ce011f5e57147dc8a2c714926edd7e2a4bfb) Thanks [@jahands](https://github.com/jahands)! - fix: Upload filepath-routing configuration in wrangler pages publish Publishing Pages projects containing a functions directory incorrectly did not upload the filepath-routing config so that the user can view it in Dash. This fixes that, making the generated routes viewable under `Routing configuration` in the `Functions` tab of a deployment. @@ -535,23 +532,23 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2197](https://github.com/cloudflare/wrangler2/pull/2197) [`a3533024`](https://github.com/cloudflare/wrangler2/commit/a3533024ee63c7c7b1092b661ea40b789874cf9f) Thanks [@geelen](https://github.com/geelen)! - fix: truncate lines longer than 70 chars when executing d1 sql +- [#2197](https://github.com/cloudflare/workers-sdk/pull/2197) [`a3533024`](https://github.com/cloudflare/workers-sdk/commit/a3533024ee63c7c7b1092b661ea40b789874cf9f) Thanks [@geelen](https://github.com/geelen)! - fix: truncate lines longer than 70 chars when executing d1 sql ## 2.3.1 ### Patch Changes -- [#2194](https://github.com/cloudflare/wrangler2/pull/2194) [`3dccedf1`](https://github.com/cloudflare/wrangler2/commit/3dccedf1d1f346c7a686c5c83783c0488cb72f87) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make it possible to use d1 in scheduled and queue workers +- [#2194](https://github.com/cloudflare/workers-sdk/pull/2194) [`3dccedf1`](https://github.com/cloudflare/workers-sdk/commit/3dccedf1d1f346c7a686c5c83783c0488cb72f87) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make it possible to use d1 in scheduled and queue workers ## 2.3.0 ### Minor Changes -- [#2077](https://github.com/cloudflare/wrangler2/pull/2077) [`c9b564dc`](https://github.com/cloudflare/wrangler2/commit/c9b564dc23b298dc5efc08510fbf5b9d03992dc0) Thanks [@jrf0110](https://github.com/jrf0110)! - Adds tailing for Pages Functions +- [#2077](https://github.com/cloudflare/workers-sdk/pull/2077) [`c9b564dc`](https://github.com/cloudflare/workers-sdk/commit/c9b564dc23b298dc5efc08510fbf5b9d03992dc0) Thanks [@jrf0110](https://github.com/jrf0110)! - Adds tailing for Pages Functions ### Patch Changes -- [#2178](https://github.com/cloudflare/wrangler2/pull/2178) [`d165b741`](https://github.com/cloudflare/wrangler2/commit/d165b74191e396489b0d7052bc09d911a1b73bfe) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - [feat] Queues generated type: +- [#2178](https://github.com/cloudflare/workers-sdk/pull/2178) [`d165b741`](https://github.com/cloudflare/workers-sdk/commit/d165b74191e396489b0d7052bc09d911a1b73bfe) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - [feat] Queues generated type: Added the ability to generate manual types for Queues from Wrangler configuration. @@ -559,44 +556,44 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2182](https://github.com/cloudflare/wrangler2/pull/2182) [`7d8d53a7`](https://github.com/cloudflare/wrangler2/commit/7d8d53a7272059633e0928f8b2e039fc2390acb9) Thanks [@geelen](https://github.com/geelen)! - Wrangler D1 now supports the alpha release of migrations. +- [#2182](https://github.com/cloudflare/workers-sdk/pull/2182) [`7d8d53a7`](https://github.com/cloudflare/workers-sdk/commit/7d8d53a7272059633e0928f8b2e039fc2390acb9) Thanks [@geelen](https://github.com/geelen)! - Wrangler D1 now supports the alpha release of migrations. -* [#2138](https://github.com/cloudflare/wrangler2/pull/2138) [`2be9d642`](https://github.com/cloudflare/wrangler2/commit/2be9d64257ea5e4a957906bf6992fc97dc46e1f2) Thanks [@mrbbot](https://github.com/mrbbot)! - Reduce script reload times when using `wrangler dev --experimental-local` +* [#2138](https://github.com/cloudflare/workers-sdk/pull/2138) [`2be9d642`](https://github.com/cloudflare/workers-sdk/commit/2be9d64257ea5e4a957906bf6992fc97dc46e1f2) Thanks [@mrbbot](https://github.com/mrbbot)! - Reduce script reload times when using `wrangler dev --experimental-local` ## 2.2.2 ### Patch Changes -- [#2172](https://github.com/cloudflare/wrangler2/pull/2172) [`47a142af`](https://github.com/cloudflare/wrangler2/commit/47a142af42dd7f587d40d4436731af09514c1c71) Thanks [@KianNH](https://github.com/KianNH)! - Validate object size for wrangler r2 put +- [#2172](https://github.com/cloudflare/workers-sdk/pull/2172) [`47a142af`](https://github.com/cloudflare/workers-sdk/commit/47a142af42dd7f587d40d4436731af09514c1c71) Thanks [@KianNH](https://github.com/KianNH)! - Validate object size for wrangler r2 put -* [#2161](https://github.com/cloudflare/wrangler2/pull/2161) [`dff756f3`](https://github.com/cloudflare/wrangler2/commit/dff756f3250240ec18a1d8564ac2cf0572b8d82e) Thanks [@jbw1991](https://github.com/jbw1991)! - Check for the correct API error code when attempting to detect missing Queues. +* [#2161](https://github.com/cloudflare/workers-sdk/pull/2161) [`dff756f3`](https://github.com/cloudflare/workers-sdk/commit/dff756f3250240ec18a1d8564ac2cf0572b8d82e) Thanks [@jbw1991](https://github.com/jbw1991)! - Check for the correct API error code when attempting to detect missing Queues. -- [#2165](https://github.com/cloudflare/wrangler2/pull/2165) [`a26f74ba`](https://github.com/cloudflare/wrangler2/commit/a26f74ba4269b42ed9a3cc119b7fc6e40697f639) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Fix Var string type: +- [#2165](https://github.com/cloudflare/workers-sdk/pull/2165) [`a26f74ba`](https://github.com/cloudflare/workers-sdk/commit/a26f74ba4269b42ed9a3cc119b7fc6e40697f639) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Fix Var string type: The type was not being coerced to a string, so TypeScript considered it a unresolved type. ## 2.2.1 ### Patch Changes -- [#2067](https://github.com/cloudflare/wrangler2/pull/2067) [`758419ed`](https://github.com/cloudflare/wrangler2/commit/758419ed05b430664f5c680b06f60b403cd00854) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: Accurately determine when using imports in \_worker.js for Advanced Mode Pages Functions +- [#2067](https://github.com/cloudflare/workers-sdk/pull/2067) [`758419ed`](https://github.com/cloudflare/workers-sdk/commit/758419ed05b430664f5c680b06f60b403cd00854) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: Accurately determine when using imports in \_worker.js for Advanced Mode Pages Functions -* [#2159](https://github.com/cloudflare/wrangler2/pull/2159) [`c5a7557f`](https://github.com/cloudflare/wrangler2/commit/c5a7557fb9adc54aa96e86812906420afc5accb1) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: silence the 10023 error that throws when deployments isn't fully rolled out +* [#2159](https://github.com/cloudflare/workers-sdk/pull/2159) [`c5a7557f`](https://github.com/cloudflare/workers-sdk/commit/c5a7557fb9adc54aa96e86812906420afc5accb1) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: silence the 10023 error that throws when deployments isn't fully rolled out -- [#2067](https://github.com/cloudflare/wrangler2/pull/2067) [`758419ed`](https://github.com/cloudflare/wrangler2/commit/758419ed05b430664f5c680b06f60b403cd00854) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: D1 support for Pages Functions +- [#2067](https://github.com/cloudflare/workers-sdk/pull/2067) [`758419ed`](https://github.com/cloudflare/workers-sdk/commit/758419ed05b430664f5c680b06f60b403cd00854) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: D1 support for Pages Functions -* [#2067](https://github.com/cloudflare/wrangler2/pull/2067) [`758419ed`](https://github.com/cloudflare/wrangler2/commit/758419ed05b430664f5c680b06f60b403cd00854) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: Refactor Pages Functions bundling +* [#2067](https://github.com/cloudflare/workers-sdk/pull/2067) [`758419ed`](https://github.com/cloudflare/workers-sdk/commit/758419ed05b430664f5c680b06f60b403cd00854) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: Refactor Pages Functions bundling ## 2.2.0 ### Minor Changes -- [#2107](https://github.com/cloudflare/wrangler2/pull/2107) [`511943e9`](https://github.com/cloudflare/wrangler2/commit/511943e9226f787aa997a325d39dc2caac05a73c) Thanks [@celso](https://github.com/celso)! - fix: D1 execute and backup commands improvements +- [#2107](https://github.com/cloudflare/workers-sdk/pull/2107) [`511943e9`](https://github.com/cloudflare/workers-sdk/commit/511943e9226f787aa997a325d39dc2caac05a73c) Thanks [@celso](https://github.com/celso)! - fix: D1 execute and backup commands improvements - Better and faster handling when importing big SQL files using execute --file - Increased visibility during imports, sends output with each batch API call - Backups are now downloaded to the directory where wrangler was initiated from -* [#2130](https://github.com/cloudflare/wrangler2/pull/2130) [`68f4fa6f`](https://github.com/cloudflare/wrangler2/commit/68f4fa6ff7d537c602c3b2ba99e9ce3afdbf2242) Thanks [@matthewdavidrodgers](https://github.com/matthewdavidrodgers)! - feature: Add warnings around bundle sizes for large scripts +* [#2130](https://github.com/cloudflare/workers-sdk/pull/2130) [`68f4fa6f`](https://github.com/cloudflare/workers-sdk/commit/68f4fa6ff7d537c602c3b2ba99e9ce3afdbf2242) Thanks [@matthewdavidrodgers](https://github.com/matthewdavidrodgers)! - feature: Add warnings around bundle sizes for large scripts Prints a warning for scripts > 1MB compressed, encouraging smaller script sizes. This warning can be silenced by setting the @@ -607,27 +604,27 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c dependencies in your bundle. This is accomplished by using the esbuild generated metafile. -- [#2064](https://github.com/cloudflare/wrangler2/pull/2064) [`49b6a484`](https://github.com/cloudflare/wrangler2/commit/49b6a484508defb88a01b7a2d48119ec82bd5d86) Thanks [@jbw1991](https://github.com/jbw1991)! - Adds support for Cloudflare Queues. Adds new CLI commands to configure Queues. Queue producers and consumers can be defined in wrangler.toml. +- [#2064](https://github.com/cloudflare/workers-sdk/pull/2064) [`49b6a484`](https://github.com/cloudflare/workers-sdk/commit/49b6a484508defb88a01b7a2d48119ec82bd5d86) Thanks [@jbw1991](https://github.com/jbw1991)! - Adds support for Cloudflare Queues. Adds new CLI commands to configure Queues. Queue producers and consumers can be defined in wrangler.toml. -* [#1982](https://github.com/cloudflare/wrangler2/pull/1982) [`5640fe88`](https://github.com/cloudflare/wrangler2/commit/5640fe8889da6d14cc14b56b6c0470980de7bd66) Thanks [@penalosa](https://github.com/penalosa)! - Enable support for `wrangler dev` on Workers behind Cloudflare Access, utilising `cloudflared`. If you don't have `cloudflared` installed, Wrangler will prompt you to install it. If you _do_, then the first time you start developing using `wrangler dev` your default browser will open with a Cloudflare Access prompt. +* [#1982](https://github.com/cloudflare/workers-sdk/pull/1982) [`5640fe88`](https://github.com/cloudflare/workers-sdk/commit/5640fe8889da6d14cc14b56b6c0470980de7bd66) Thanks [@penalosa](https://github.com/penalosa)! - Enable support for `wrangler dev` on Workers behind Cloudflare Access, utilising `cloudflared`. If you don't have `cloudflared` installed, Wrangler will prompt you to install it. If you _do_, then the first time you start developing using `wrangler dev` your default browser will open with a Cloudflare Access prompt. ### Patch Changes -- [#2134](https://github.com/cloudflare/wrangler2/pull/2134) [`b164e2d6`](https://github.com/cloudflare/wrangler2/commit/b164e2d6faff3a9a18f447ff47fe98e8cee24c86) Thanks [@jspspike](https://github.com/jspspike)! - Added current version to publish output +- [#2134](https://github.com/cloudflare/workers-sdk/pull/2134) [`b164e2d6`](https://github.com/cloudflare/workers-sdk/commit/b164e2d6faff3a9a18f447ff47fe98e8cee24c86) Thanks [@jspspike](https://github.com/jspspike)! - Added current version to publish output -* [#2127](https://github.com/cloudflare/wrangler2/pull/2127) [`0e561e83`](https://github.com/cloudflare/wrangler2/commit/0e561e8385bc8437dece78d3b805dad43bda830c) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Fix: Missing Worker name using `--from-dash` +* [#2127](https://github.com/cloudflare/workers-sdk/pull/2127) [`0e561e83`](https://github.com/cloudflare/workers-sdk/commit/0e561e8385bc8437dece78d3b805dad43bda830c) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Fix: Missing Worker name using `--from-dash` Added the `--from-dash` name as a fallback when no name is provided in the `wrangler init` command. Additionally added a checks to the `std.out` to ensure that the name is provided. resolves #1853 -- [#2073](https://github.com/cloudflare/wrangler2/pull/2073) [`1987a79d`](https://github.com/cloudflare/wrangler2/commit/1987a79d43158ebc6eeb54b2102214060266b6d7) Thanks [@mrbbot](https://github.com/mrbbot)! - If `--env ` is specified, we'll now check `.env.`/`.dev.vars.` first. +- [#2073](https://github.com/cloudflare/workers-sdk/pull/2073) [`1987a79d`](https://github.com/cloudflare/workers-sdk/commit/1987a79d43158ebc6eeb54b2102214060266b6d7) Thanks [@mrbbot](https://github.com/mrbbot)! - If `--env ` is specified, we'll now check `.env.`/`.dev.vars.` first. If they don't exist, we'll fallback to `.env`/`.dev.vars`. -* [#2072](https://github.com/cloudflare/wrangler2/pull/2072) [`06aa6121`](https://github.com/cloudflare/wrangler2/commit/06aa61214bc71077ff55fecbe1581af9b5ad68ff) Thanks [@mrbbot](https://github.com/mrbbot)! - Fixed importing installed npm packages with the same name as Node built-in +* [#2072](https://github.com/cloudflare/workers-sdk/pull/2072) [`06aa6121`](https://github.com/cloudflare/workers-sdk/commit/06aa61214bc71077ff55fecbe1581af9b5ad68ff) Thanks [@mrbbot](https://github.com/mrbbot)! - Fixed importing installed npm packages with the same name as Node built-in modules if `node_compat` is disabled. -- [#2124](https://github.com/cloudflare/wrangler2/pull/2124) [`02ca556c`](https://github.com/cloudflare/wrangler2/commit/02ca556c3e84d45cb3eaa5787a4a0ed5254c3815) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Computing the name from binding response +- [#2124](https://github.com/cloudflare/workers-sdk/pull/2124) [`02ca556c`](https://github.com/cloudflare/workers-sdk/commit/02ca556c3e84d45cb3eaa5787a4a0ed5254c3815) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Computing the name from binding response Now the `vars` will be computed, example: `[var.binding.name]: var.binding.text` @@ -640,13 +637,13 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2103](https://github.com/cloudflare/wrangler2/pull/2103) [`f1fd62a1`](https://github.com/cloudflare/wrangler2/commit/f1fd62a11642de45eb87ebacb044fe8fcf2beea2) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Don't upload `functions/` directory as part of `wrangler pages publish` +- [#2103](https://github.com/cloudflare/workers-sdk/pull/2103) [`f1fd62a1`](https://github.com/cloudflare/workers-sdk/commit/f1fd62a11642de45eb87ebacb044fe8fcf2beea2) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Don't upload `functions/` directory as part of `wrangler pages publish` If the root directory of a project was the same as the build output directory, we were previously uploading the `functions/` directory as static assets. This PR now ensures that the `functions/` files are only used to create Pages Functions and are no longer uploaded as static assets. Additionally, we also now _do_ upload `_worker.js`, `_headers`, `_redirects` and `_routes.json` if they aren't immediate children of the build output directory. Previously, we'd ignore all files with this name regardless of location. For example, if you have a `public/blog/how-to-use-pages/_headers` file (where `public` is your build output directory), we will now upload the `_headers` file as a static asset. -* [#2111](https://github.com/cloudflare/wrangler2/pull/2111) [`ab52f771`](https://github.com/cloudflare/wrangler2/commit/ab52f7717ffd5411886d1e30aee98f821237ddad) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add a `passThroughOnException()` handler in Pages Functions +* [#2111](https://github.com/cloudflare/workers-sdk/pull/2111) [`ab52f771`](https://github.com/cloudflare/workers-sdk/commit/ab52f7717ffd5411886d1e30aee98f821237ddad) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add a `passThroughOnException()` handler in Pages Functions This `passThroughOnException()` handler is not as good as the built-in for Workers. We're just adding it now as a stop-gap until we can do the behind-the-scenes plumbing required to make the built-in function work properly. @@ -662,13 +659,13 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c }; ``` -- [#2117](https://github.com/cloudflare/wrangler2/pull/2117) [`aa08ff7c`](https://github.com/cloudflare/wrangler2/commit/aa08ff7cc76913f010cf0a98e7e0e97b5641d2c8) Thanks [@nprogers](https://github.com/nprogers)! - Added error logging for pages upload +- [#2117](https://github.com/cloudflare/workers-sdk/pull/2117) [`aa08ff7c`](https://github.com/cloudflare/workers-sdk/commit/aa08ff7cc76913f010cf0a98e7e0e97b5641d2c8) Thanks [@nprogers](https://github.com/nprogers)! - Added error logging for pages upload ## 2.1.14 ### Patch Changes -- [#2074](https://github.com/cloudflare/wrangler2/pull/2074) [`b08ab1e5`](https://github.com/cloudflare/wrangler2/commit/b08ab1e507a740f6f120b66a5435f4bd0a9cd42c) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - The type command aggregates bindings and [custom module rules](https://developers.cloudflare.com/workers/wrangler/configuration/#bundling) from config, then generates a DTS file for both service workers' `declare global { ... }` or module workers' `interface Env { ... }` +- [#2074](https://github.com/cloudflare/workers-sdk/pull/2074) [`b08ab1e5`](https://github.com/cloudflare/workers-sdk/commit/b08ab1e507a740f6f120b66a5435f4bd0a9cd42c) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - The type command aggregates bindings and [custom module rules](https://developers.cloudflare.com/workers/wrangler/configuration/#bundling) from config, then generates a DTS file for both service workers' `declare global { ... }` or module workers' `interface Env { ... }` Custom module rules generate `declare module`s based on the module type (`Text`, `Data` or `CompiledWasm`). Module Example Outputs: @@ -703,7 +700,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c resolves #2034 resolves #2033 -* [#2065](https://github.com/cloudflare/wrangler2/pull/2065) [`14c44588`](https://github.com/cloudflare/wrangler2/commit/14c44588c9d22e9c9f2ad2740df57809d0cbcfbc) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix(pages): `wrangler pages dev` matches routing rules in `_routes.json` too loosely +* [#2065](https://github.com/cloudflare/workers-sdk/pull/2065) [`14c44588`](https://github.com/cloudflare/workers-sdk/commit/14c44588c9d22e9c9f2ad2740df57809d0cbcfbc) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - fix(pages): `wrangler pages dev` matches routing rules in `_routes.json` too loosely Currently, the logic by which we transform routing rules in `_routes.json` to regular expressions, so we can perform `pathname` matching & routing when we @@ -716,11 +713,11 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c This commit fixes our routing rule to pathname matching logic and brings `wrangler pages dev` on par with routing in deployed Pages projects. -- [#2098](https://github.com/cloudflare/wrangler2/pull/2098) [`2a81caee`](https://github.com/cloudflare/wrangler2/commit/2a81caeeb785d0aa6ee242297c87ba62dfba48e7) Thanks [@threepointone](https://github.com/threepointone)! - feat: delete site/assets namespace when a worker is deleted +- [#2098](https://github.com/cloudflare/workers-sdk/pull/2098) [`2a81caee`](https://github.com/cloudflare/workers-sdk/commit/2a81caeeb785d0aa6ee242297c87ba62dfba48e7) Thanks [@threepointone](https://github.com/threepointone)! - feat: delete site/assets namespace when a worker is deleted This patch deletes any site/asset kv namespaces associated with a worker when `wrangler delete` is used. It finds the namespace associated with a worker by using the names it would have otherwise used, and deletes it. It also does the same for the preview namespace that's used with `wrangler dev`. -* [#2091](https://github.com/cloudflare/wrangler2/pull/2091) [`9491d86f`](https://github.com/cloudflare/wrangler2/commit/9491d86fef30759033a4435514560cba72c2c046) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Wrangler deployments command +* [#2091](https://github.com/cloudflare/workers-sdk/pull/2091) [`9491d86f`](https://github.com/cloudflare/workers-sdk/commit/9491d86fef30759033a4435514560cba72c2c046) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - Wrangler deployments command Added support for the deployments command, which allows you to list the last ten deployments for a given script. The information will include: @@ -733,7 +730,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c resolves #2089 -- [#2068](https://github.com/cloudflare/wrangler2/pull/2068) [`2c1fd9d2`](https://github.com/cloudflare/wrangler2/commit/2c1fd9d2772f9b2109e3c3aa7dec759138823c8d) Thanks [@mrbbot](https://github.com/mrbbot)! - Fixed issue where information and warning messages from Miniflare were being +- [#2068](https://github.com/cloudflare/workers-sdk/pull/2068) [`2c1fd9d2`](https://github.com/cloudflare/workers-sdk/commit/2c1fd9d2772f9b2109e3c3aa7dec759138823c8d) Thanks [@mrbbot](https://github.com/mrbbot)! - Fixed issue where information and warning messages from Miniflare were being discarded when using `wrangler dev --local`. Logs from Miniflare will now be coloured too, if the terminal supports this. @@ -741,18 +738,18 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2049](https://github.com/cloudflare/wrangler2/pull/2049) [`903b55d1`](https://github.com/cloudflare/wrangler2/commit/903b55d13d83f80a2893d7763f5bc220b0df2c3c) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: add missing `local` argument to unstable_dev's DevOptions +- [#2049](https://github.com/cloudflare/workers-sdk/pull/2049) [`903b55d1`](https://github.com/cloudflare/workers-sdk/commit/903b55d13d83f80a2893d7763f5bc220b0df2c3c) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: add missing `local` argument to unstable_dev's DevOptions -* [#2026](https://github.com/cloudflare/wrangler2/pull/2026) [`7d987ee2`](https://github.com/cloudflare/wrangler2/commit/7d987ee270b53105b2794e8d6bced785b4b0925d) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Default to today's compatibility date in `wrangler pages dev` +* [#2026](https://github.com/cloudflare/workers-sdk/pull/2026) [`7d987ee2`](https://github.com/cloudflare/workers-sdk/commit/7d987ee270b53105b2794e8d6bced785b4b0925d) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Default to today's compatibility date in `wrangler pages dev` Like `wrangler dev` proper, `wrangler pages dev` now defaults to using today's compatibility date. It can be overriden with `--compatibility-date=YYYY-MM-DD`. https://developers.cloudflare.com/workers/platform/compatibility-dates/ -- [#2035](https://github.com/cloudflare/wrangler2/pull/2035) [`76a66fc2`](https://github.com/cloudflare/wrangler2/commit/76a66fc2b6148c1764ac55a4ad79c42fcef9cf22) Thanks [@penalosa](https://github.com/penalosa)! - Warn when opening a tail on workers for which a restart could be disruptive (i.e. Workers which use Durable Objects in conjunction with WebSockets) +- [#2035](https://github.com/cloudflare/workers-sdk/pull/2035) [`76a66fc2`](https://github.com/cloudflare/workers-sdk/commit/76a66fc2b6148c1764ac55a4ad79c42fcef9cf22) Thanks [@penalosa](https://github.com/penalosa)! - Warn when opening a tail on workers for which a restart could be disruptive (i.e. Workers which use Durable Objects in conjunction with WebSockets) -* [#2045](https://github.com/cloudflare/wrangler2/pull/2045) [`c2d3286f`](https://github.com/cloudflare/wrangler2/commit/c2d3286fab527042eca76fd3626d1be0f79612cf) Thanks [@threepointone](https://github.com/threepointone)! - feat: implement a basic `wrangler delete` +* [#2045](https://github.com/cloudflare/workers-sdk/pull/2045) [`c2d3286f`](https://github.com/cloudflare/workers-sdk/commit/c2d3286fab527042eca76fd3626d1be0f79612cf) Thanks [@threepointone](https://github.com/threepointone)! - feat: implement a basic `wrangler delete` This PR adds a simple (but useful!) implementation for `wrangler delete`. Of note, it'll delete a given service, including all it's bindings. It uses the same api as the dashboard. @@ -760,7 +757,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#2023](https://github.com/cloudflare/wrangler2/pull/2023) [`d6660ce3`](https://github.com/cloudflare/wrangler2/commit/d6660ce3e26d44b4db39b149868cb850e47763f0) Thanks [@caass](https://github.com/caass)! - Display a more helpful error when trying to publish to a route in use by another worker. +- [#2023](https://github.com/cloudflare/workers-sdk/pull/2023) [`d6660ce3`](https://github.com/cloudflare/workers-sdk/commit/d6660ce3e26d44b4db39b149868cb850e47763f0) Thanks [@caass](https://github.com/caass)! - Display a more helpful error when trying to publish to a route in use by another worker. Previously, when trying to publish a worker to a route that was in use by another worker, there would be a really unhelpful message about a failed API call. Now, there's a much @@ -785,13 +782,13 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #1849 -* [#2013](https://github.com/cloudflare/wrangler2/pull/2013) [`c63ca0a5`](https://github.com/cloudflare/wrangler2/commit/c63ca0a550a4c3801665161d6d6ce5d2d3bff0a5) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make d1 help print if a command is incomplete +* [#2013](https://github.com/cloudflare/workers-sdk/pull/2013) [`c63ca0a5`](https://github.com/cloudflare/workers-sdk/commit/c63ca0a550a4c3801665161d6d6ce5d2d3bff0a5) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make d1 help print if a command is incomplete Prior to this change, d1's commands would return silently if wrangler wasn't supplied enough arguments to run the command. This change resolves this issue, and ensures help is always printed if the command couldn't run. -- [#2016](https://github.com/cloudflare/wrangler2/pull/2016) [`932fecc0`](https://github.com/cloudflare/wrangler2/commit/932fecc0857dfdf8401b2293f71c34836a5bbb9d) Thanks [@caass](https://github.com/caass)! - Offer to create a workers.dev subdomain if a user needs one +- [#2016](https://github.com/cloudflare/workers-sdk/pull/2016) [`932fecc0`](https://github.com/cloudflare/workers-sdk/commit/932fecc0857dfdf8401b2293f71c34836a5bbb9d) Thanks [@caass](https://github.com/caass)! - Offer to create a workers.dev subdomain if a user needs one Previously, when a user wanted to publish a worker to https://workers.dev by setting `workers_dev = true` in their `wrangler.toml`, but their account didn't have a subdomain registered, we would error out. @@ -799,15 +796,15 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Now, we offer to create one for them. It's not implemented for `wrangler dev`, which also expects you to have registered a workers.dev subdomain, but we now error correctly and tell them what the problem is. -* [#2003](https://github.com/cloudflare/wrangler2/pull/2003) [`3ed06b40`](https://github.com/cloudflare/wrangler2/commit/3ed06b4096d3ea9ed601ae05d77442e5b0217678) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Bump miniflare@2.10.0 +* [#2003](https://github.com/cloudflare/workers-sdk/pull/2003) [`3ed06b40`](https://github.com/cloudflare/workers-sdk/commit/3ed06b4096d3ea9ed601ae05d77442e5b0217678) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Bump miniflare@2.10.0 -- [#2024](https://github.com/cloudflare/wrangler2/pull/2024) [`4ad48e4d`](https://github.com/cloudflare/wrangler2/commit/4ad48e4d9b617dd322c6d4b9c0853588a1521a71) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make it possible for values in vars and defines to have colons (:) +- [#2024](https://github.com/cloudflare/workers-sdk/pull/2024) [`4ad48e4d`](https://github.com/cloudflare/workers-sdk/commit/4ad48e4d9b617dd322c6d4b9c0853588a1521a71) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: make it possible for values in vars and defines to have colons (:) Prior to this change, passing --define someKey:https://some-value.com would result in an incomplete value being passed to the Worker. This change correctly handles colons for var and define in `wrangler dev` and `wrangler publish`. -* [#2032](https://github.com/cloudflare/wrangler2/pull/2032) [`f33805d2`](https://github.com/cloudflare/wrangler2/commit/f33805d28b23b613f03169726b91ac3b1b3428d5) Thanks [@caass](https://github.com/caass)! - Catch unsupported terminal errors and provide a nicer error message. +* [#2032](https://github.com/cloudflare/workers-sdk/pull/2032) [`f33805d2`](https://github.com/cloudflare/workers-sdk/commit/f33805d28b23b613f03169726b91ac3b1b3428d5) Thanks [@caass](https://github.com/caass)! - Catch unsupported terminal errors and provide a nicer error message. Wrangler depends on terminals supporting [raw mode](https://en.wikipedia.org/wiki/Terminal_mode). Previously, attempting to run wrangler from a terminal that didn't support raw mode would result in an Ink error, which was both an exposure of an internal implementation detail to the user and also not actionable: @@ -832,39 +829,39 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #1992 -- [#1946](https://github.com/cloudflare/wrangler2/pull/1946) [`7716c3b9`](https://github.com/cloudflare/wrangler2/commit/7716c3b9dfed540d7ddfec90f042e870a262be78) Thanks [@penalosa](https://github.com/penalosa)! - Support subdomains with wrangler dev for routes defined with `zone_name` (instead of just for routes defined with `zone_id`) +- [#1946](https://github.com/cloudflare/workers-sdk/pull/1946) [`7716c3b9`](https://github.com/cloudflare/workers-sdk/commit/7716c3b9dfed540d7ddfec90f042e870a262be78) Thanks [@penalosa](https://github.com/penalosa)! - Support subdomains with wrangler dev for routes defined with `zone_name` (instead of just for routes defined with `zone_id`) ## 2.1.11 ### Patch Changes -- [#1957](https://github.com/cloudflare/wrangler2/pull/1957) [`b579c2b5`](https://github.com/cloudflare/wrangler2/commit/b579c2b5ad8dc1d19e1b4bf7ff11f56d0c8d4e1f) Thanks [@caass](https://github.com/caass)! - Remove dependency on create-cloudflare. +- [#1957](https://github.com/cloudflare/workers-sdk/pull/1957) [`b579c2b5`](https://github.com/cloudflare/workers-sdk/commit/b579c2b5ad8dc1d19e1b4bf7ff11f56d0c8d4e1f) Thanks [@caass](https://github.com/caass)! - Remove dependency on create-cloudflare. Previously, `wrangler generate` was a thin wrapper around [`create-cloudflare`](https://github.com/cloudflare/templates/tree/main/packages/create-cloudflare). Now, we've moved over the logic from that package directly into `wrangler`. -* [#1985](https://github.com/cloudflare/wrangler2/pull/1985) [`51385e57`](https://github.com/cloudflare/wrangler2/commit/51385e5740c189ec4854c76307cb9ed821e3712f) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: hide deprecated flags from --help menu +* [#1985](https://github.com/cloudflare/workers-sdk/pull/1985) [`51385e57`](https://github.com/cloudflare/workers-sdk/commit/51385e5740c189ec4854c76307cb9ed821e3712f) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: hide deprecated flags from --help menu -- [#1944](https://github.com/cloudflare/wrangler2/pull/1944) [`ea54623c`](https://github.com/cloudflare/wrangler2/commit/ea54623ce2f2f5bc5ac5c48a58730bb3f75afd9c) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - `wrangler pages publish` should prioritize `_worker.js` over `/functions` if both exist +- [#1944](https://github.com/cloudflare/workers-sdk/pull/1944) [`ea54623c`](https://github.com/cloudflare/workers-sdk/commit/ea54623ce2f2f5bc5ac5c48a58730bb3f75afd9c) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - `wrangler pages publish` should prioritize `_worker.js` over `/functions` if both exist -* [#1950](https://github.com/cloudflare/wrangler2/pull/1950) [`daf73fbe`](https://github.com/cloudflare/wrangler2/commit/daf73fbe03b55631383cdc86a05eac12d2775875) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - `wrangler pages dev` should prioritize `_worker.js` +* [#1950](https://github.com/cloudflare/workers-sdk/pull/1950) [`daf73fbe`](https://github.com/cloudflare/workers-sdk/commit/daf73fbe03b55631383cdc86a05eac12d2775875) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - `wrangler pages dev` should prioritize `_worker.js` When using a `_worker.js` file, the entire `/functions` directory should be ignored – this includes its routing and middleware characteristics. Currently `wrangler pages dev` does the reverse, by prioritizing `/functions` over `_worker.js`. These changes fix the current behaviour. -- [#1928](https://github.com/cloudflare/wrangler2/pull/1928) [`c1722170`](https://github.com/cloudflare/wrangler2/commit/c1722170e93101a292a3c14110b131457f7164d6) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Allow unsetting of automatically generated `Link` headers using `_headers` and the `! Link` operator +- [#1928](https://github.com/cloudflare/workers-sdk/pull/1928) [`c1722170`](https://github.com/cloudflare/workers-sdk/commit/c1722170e93101a292a3c14110b131457f7164d6) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Allow unsetting of automatically generated `Link` headers using `_headers` and the `! Link` operator -* [#1928](https://github.com/cloudflare/wrangler2/pull/1928) [`c1722170`](https://github.com/cloudflare/wrangler2/commit/c1722170e93101a292a3c14110b131457f7164d6) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Only generate `Link` headers from simple `` elements. +* [#1928](https://github.com/cloudflare/workers-sdk/pull/1928) [`c1722170`](https://github.com/cloudflare/workers-sdk/commit/c1722170e93101a292a3c14110b131457f7164d6) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Only generate `Link` headers from simple `` elements. Specifically, only those with the `rel`, `href` and possibly `as` attributes. Any element with additional attributes will not be used to generate headers. -- [#1974](https://github.com/cloudflare/wrangler2/pull/1974) [`a96f2585`](https://github.com/cloudflare/wrangler2/commit/a96f25856615befef5d03adffd3808a393bf145e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Bump @cloudflare/pages-shared@0.0.7 and use TS directly +- [#1974](https://github.com/cloudflare/workers-sdk/pull/1974) [`a96f2585`](https://github.com/cloudflare/workers-sdk/commit/a96f25856615befef5d03adffd3808a393bf145e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Bump @cloudflare/pages-shared@0.0.7 and use TS directly -* [#1965](https://github.com/cloudflare/wrangler2/pull/1965) [`9709d3a3`](https://github.com/cloudflare/wrangler2/commit/9709d3a31d4fc192c257d0347f111dec465fd20c) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - chore: remove hidden on --from-dash +* [#1965](https://github.com/cloudflare/workers-sdk/pull/1965) [`9709d3a3`](https://github.com/cloudflare/workers-sdk/commit/9709d3a31d4fc192c257d0347f111dec465fd20c) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - chore: remove hidden on --from-dash The --from-dash can now be used with the dashboard features to support moving Worker developmment to a local machine. resolves #1783 -- [#1978](https://github.com/cloudflare/wrangler2/pull/1978) [`6006ae50`](https://github.com/cloudflare/wrangler2/commit/6006ae5010ab32bbd81b002b26cd450cdf58b1a5) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - chore: Undici 5.11.0 multipart/form-data support +- [#1978](https://github.com/cloudflare/workers-sdk/pull/1978) [`6006ae50`](https://github.com/cloudflare/workers-sdk/commit/6006ae5010ab32bbd81b002b26cd450cdf58b1a5) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - chore: Undici 5.11.0 multipart/form-data support The 5.11.0 version of Undici now supports multipart/form-data previously needed a ponyfill we can now handle the multipart/form-data without any custom code. @@ -874,14 +871,14 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1955](https://github.com/cloudflare/wrangler2/pull/1955) [`b6dd07a1`](https://github.com/cloudflare/wrangler2/commit/b6dd07a1ba823c45244de18c2ebbe1e3b56c1ed7) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: error if d1 bindings used with `no-bundle` +- [#1955](https://github.com/cloudflare/workers-sdk/pull/1955) [`b6dd07a1`](https://github.com/cloudflare/workers-sdk/commit/b6dd07a1ba823c45244de18c2ebbe1e3b56c1ed7) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: error if d1 bindings used with `no-bundle` While in beta, you cannot use D1 bindings without bundling your worker as these are added in through a facade which gets bypassed when using the `no-bundle` option. -* [#1964](https://github.com/cloudflare/wrangler2/pull/1964) [`1f50578e`](https://github.com/cloudflare/wrangler2/commit/1f50578ee8f8a007464b7bd4061a5df74488dbc0) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - chore: Emoji space in help description +* [#1964](https://github.com/cloudflare/workers-sdk/pull/1964) [`1f50578e`](https://github.com/cloudflare/workers-sdk/commit/1f50578ee8f8a007464b7bd4061a5df74488dbc0) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - chore: Emoji space in help description Added a space between the Emoji and description for the secret:bulk command. -- [#1967](https://github.com/cloudflare/wrangler2/pull/1967) [`02261f27`](https://github.com/cloudflare/wrangler2/commit/02261f27d9d3a6b83087d12b8e653d0039176a83) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: implement remote mode for unstable_dev +- [#1967](https://github.com/cloudflare/workers-sdk/pull/1967) [`02261f27`](https://github.com/cloudflare/workers-sdk/commit/02261f27d9d3a6b83087d12b8e653d0039176a83) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: implement remote mode for unstable_dev With this change, `unstable_dev` can now perform end-to-end (e2e) tests against your workers as you dev. @@ -899,24 +896,24 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1937](https://github.com/cloudflare/wrangler2/pull/1937) [`905fce4f`](https://github.com/cloudflare/wrangler2/commit/905fce4feb0ac34200b597ff5e8c325aaf65b491) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: fails to publish due to empty migrations +- [#1937](https://github.com/cloudflare/workers-sdk/pull/1937) [`905fce4f`](https://github.com/cloudflare/workers-sdk/commit/905fce4feb0ac34200b597ff5e8c325aaf65b491) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: fails to publish due to empty migrations After this change, `wrangler init --from-dash` will not attempt to add durable object migrations to `wrangler.toml` for Workers that don't have durable objects. fixes #1854 -* [#1943](https://github.com/cloudflare/wrangler2/pull/1943) [`58a430f2`](https://github.com/cloudflare/wrangler2/commit/58a430f27fb683f422e552f7c26338f950f39c2b) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: add `env` and `ctx` params to `fetch` in javascript example template +* [#1943](https://github.com/cloudflare/workers-sdk/pull/1943) [`58a430f2`](https://github.com/cloudflare/workers-sdk/commit/58a430f27fb683f422e552f7c26338f950f39c2b) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: add `env` and `ctx` params to `fetch` in javascript example template Just like in the typescript templates, and the javascript template for scheduled workers, we include `env` and `ctx` as parameters to the `fetch` export. This makes it clearer where environment variables live. -- [#1934](https://github.com/cloudflare/wrangler2/pull/1934) [`7ebaec1a`](https://github.com/cloudflare/wrangler2/commit/7ebaec1a38384b5f04001ad2d8603d7ac0322534) Thanks [@mrbbot](https://github.com/mrbbot)! - Allow `--experimental-local` to be used with module workers +- [#1934](https://github.com/cloudflare/workers-sdk/pull/1934) [`7ebaec1a`](https://github.com/cloudflare/workers-sdk/commit/7ebaec1a38384b5f04001ad2d8603d7ac0322534) Thanks [@mrbbot](https://github.com/mrbbot)! - Allow `--experimental-local` to be used with module workers -* [#1939](https://github.com/cloudflare/wrangler2/pull/1939) [`5854cb69`](https://github.com/cloudflare/wrangler2/commit/5854cb6918cd0271683b4f3f62987f3e9e4b3300) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: respect variable binding type when printing +* [#1939](https://github.com/cloudflare/workers-sdk/pull/1939) [`5854cb69`](https://github.com/cloudflare/workers-sdk/commit/5854cb6918cd0271683b4f3f62987f3e9e4b3300) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: respect variable binding type when printing After this change, when printing the bindings it has access to, wrangler will correctly only add quotes around string variables, and serialize objects via JSON.stringify (rather than printing `"[object Object]"`). -- [#1953](https://github.com/cloudflare/wrangler2/pull/1953) [`20195479`](https://github.com/cloudflare/wrangler2/commit/20195479c9f57d9fede1f5924f6a4ab36f860bea) Thanks [@mrbbot](https://github.com/mrbbot)! - Add `--experimental-local` support to `unstable_dev` +- [#1953](https://github.com/cloudflare/workers-sdk/pull/1953) [`20195479`](https://github.com/cloudflare/workers-sdk/commit/20195479c9f57d9fede1f5924f6a4ab36f860bea) Thanks [@mrbbot](https://github.com/mrbbot)! - Add `--experimental-local` support to `unstable_dev` -* [#1930](https://github.com/cloudflare/wrangler2/pull/1930) [`56798155`](https://github.com/cloudflare/wrangler2/commit/5679815521d7e62d24866eee1653ba409a53e12b) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: use node http instead of faye-websocket in proxy server +* [#1930](https://github.com/cloudflare/workers-sdk/pull/1930) [`56798155`](https://github.com/cloudflare/workers-sdk/commit/5679815521d7e62d24866eee1653ba409a53e12b) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: use node http instead of faye-websocket in proxy server We change how websockets are handled in the proxy server, fixing multiple issues of websocket behaviour, particularly to do with headers. @@ -930,7 +927,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1894](https://github.com/cloudflare/wrangler2/pull/1894) [`ed646cf9`](https://github.com/cloudflare/wrangler2/commit/ed646cf902a86f467ec2ed08545ced3f97468d31) Thanks [@mrbbot](https://github.com/mrbbot)! - Add experimental support for using the open-source Workers runtime [`workerd`](https://github.com/cloudflare/workerd) in `wrangler dev`. +- [#1894](https://github.com/cloudflare/workers-sdk/pull/1894) [`ed646cf9`](https://github.com/cloudflare/workers-sdk/commit/ed646cf902a86f467ec2ed08545ced3f97468d31) Thanks [@mrbbot](https://github.com/mrbbot)! - Add experimental support for using the open-source Workers runtime [`workerd`](https://github.com/cloudflare/workerd) in `wrangler dev`. Use `wrangler dev --experimental-local` to try it out! 🚀 Note this feature is still under active development. @@ -938,13 +935,13 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1881](https://github.com/cloudflare/wrangler2/pull/1881) [`6ff5a030`](https://github.com/cloudflare/wrangler2/commit/6ff5a0308b8f65f0422719ede3a2a4863311d3d9) Thanks [@Skye-31](https://github.com/Skye-31)! - Chore: correctly log all listening ports on remote mode (closes #1652) +- [#1881](https://github.com/cloudflare/workers-sdk/pull/1881) [`6ff5a030`](https://github.com/cloudflare/workers-sdk/commit/6ff5a0308b8f65f0422719ede3a2a4863311d3d9) Thanks [@Skye-31](https://github.com/Skye-31)! - Chore: correctly log all listening ports on remote mode (closes #1652) -* [#1913](https://github.com/cloudflare/wrangler2/pull/1913) [`9f7cc5a0`](https://github.com/cloudflare/wrangler2/commit/9f7cc5a06a704ff2320d0a1996baf6a1da7845a4) Thanks [@threepointone](https://github.com/threepointone)! - feat: expose port and address on (Unstable)DevWorker +* [#1913](https://github.com/cloudflare/workers-sdk/pull/1913) [`9f7cc5a0`](https://github.com/cloudflare/workers-sdk/commit/9f7cc5a06a704ff2320d0a1996baf6a1da7845a4) Thanks [@threepointone](https://github.com/threepointone)! - feat: expose port and address on (Unstable)DevWorker when using `unstable_dev()`, I think we want to expose the port/address that the server has started on. The usecase is when trying to connect to the server _without_ calling `.fetch()` (example: when making a websocket connection). -- [#1911](https://github.com/cloudflare/wrangler2/pull/1911) [`16c28502`](https://github.com/cloudflare/wrangler2/commit/16c28502593c27a1b372d8056a55cdee32b5c4cf) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: put config cache log behind logger.debug +- [#1911](https://github.com/cloudflare/workers-sdk/pull/1911) [`16c28502`](https://github.com/cloudflare/workers-sdk/commit/16c28502593c27a1b372d8056a55cdee32b5c4cf) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: put config cache log behind logger.debug Prior to this change, wrangler would print `Retrieving cached values for...` after almost every single command. @@ -952,15 +949,15 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #1808 -* [#1687](https://github.com/cloudflare/wrangler2/pull/1687) [`28cd7361`](https://github.com/cloudflare/wrangler2/commit/28cd7361a6386913b62389705c335dd1b12d1dd6) Thanks [@geelen](https://github.com/geelen)! - Wrangler now supports the beta release of D1. +* [#1687](https://github.com/cloudflare/workers-sdk/pull/1687) [`28cd7361`](https://github.com/cloudflare/workers-sdk/commit/28cd7361a6386913b62389705c335dd1b12d1dd6) Thanks [@geelen](https://github.com/geelen)! - Wrangler now supports the beta release of D1. ## 2.1.6 ### Patch Changes -- [#1890](https://github.com/cloudflare/wrangler2/pull/1890) [`5a4c7113`](https://github.com/cloudflare/wrangler2/commit/5a4c7113bd34753f571d7c7984658c8b3bb033e0) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: add missing noBundle type to api/dev +- [#1890](https://github.com/cloudflare/workers-sdk/pull/1890) [`5a4c7113`](https://github.com/cloudflare/workers-sdk/commit/5a4c7113bd34753f571d7c7984658c8b3bb033e0) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: add missing noBundle type to api/dev -* [#1895](https://github.com/cloudflare/wrangler2/pull/1895) [`1b53bf9d`](https://github.com/cloudflare/wrangler2/commit/1b53bf9d06fbe2afbd43c18b6406e59e85618dc3) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: rename keep_bindings to keep_vars, and make it opt-in, to keep wrangler.toml compatible with being used for Infrastructure as Code +* [#1895](https://github.com/cloudflare/workers-sdk/pull/1895) [`1b53bf9d`](https://github.com/cloudflare/workers-sdk/commit/1b53bf9d06fbe2afbd43c18b6406e59e85618dc3) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: rename keep_bindings to keep_vars, and make it opt-in, to keep wrangler.toml compatible with being used for Infrastructure as Code By default, wrangler.toml is the source of truth for your environment configuration, like a terraform file. @@ -968,9 +965,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Between wrangler 2.0.28 and 2.1.5, by default wrangler would _not_ delete your vars by default, breaking expected wrangler.toml behaviour. -- [#1889](https://github.com/cloudflare/wrangler2/pull/1889) [`98f756c7`](https://github.com/cloudflare/wrangler2/commit/98f756c7dfcdefaf1426b6770d0c0450ce4a8619) Thanks [@penalosa](https://github.com/penalosa)! - fix: Correctly place the `.wrangler/state` local state directory in the same directory as `wrangler.toml` by default +- [#1889](https://github.com/cloudflare/workers-sdk/pull/1889) [`98f756c7`](https://github.com/cloudflare/workers-sdk/commit/98f756c7dfcdefaf1426b6770d0c0450ce4a8619) Thanks [@penalosa](https://github.com/penalosa)! - fix: Correctly place the `.wrangler/state` local state directory in the same directory as `wrangler.toml` by default -* [#1886](https://github.com/cloudflare/wrangler2/pull/1886) [`8b647175`](https://github.com/cloudflare/wrangler2/commit/8b647175d31716ef5ff6f801bfd9ed47e2af4bcc) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: potential missing compatibility_date in wrangler.toml when running `wrangler init --from-dash` +* [#1886](https://github.com/cloudflare/workers-sdk/pull/1886) [`8b647175`](https://github.com/cloudflare/workers-sdk/commit/8b647175d31716ef5ff6f801bfd9ed47e2af4bcc) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: potential missing compatibility_date in wrangler.toml when running `wrangler init --from-dash` Fixed a bug where compatibility_date wasn't being added to wrangler.toml when initializing a worker via `wrangler init --from-dash` fixes #1855 @@ -979,11 +976,11 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1819](https://github.com/cloudflare/wrangler2/pull/1819) [`d8a18070`](https://github.com/cloudflare/wrangler2/commit/d8a18070c5abe5d9e62da4d5adab794626156ab3) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Adds support for custom \_routes.json when running `wrangler pages dev` +- [#1819](https://github.com/cloudflare/workers-sdk/pull/1819) [`d8a18070`](https://github.com/cloudflare/workers-sdk/commit/d8a18070c5abe5d9e62da4d5adab794626156ab3) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Adds support for custom \_routes.json when running `wrangler pages dev` -* [#1815](https://github.com/cloudflare/wrangler2/pull/1815) [`d8fe95d2`](https://github.com/cloudflare/wrangler2/commit/d8fe95d252a4fd8da5d65eacc32c3be49fca212d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: testing scheduled events with `wrangler dev` remote mode +* [#1815](https://github.com/cloudflare/workers-sdk/pull/1815) [`d8fe95d2`](https://github.com/cloudflare/workers-sdk/commit/d8fe95d252a4fd8da5d65eacc32c3be49fca212d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: testing scheduled events with `wrangler dev` remote mode - Using the new middleware (https://github.com/cloudflare/wrangler2/pull/1735), we implement a way of testing scheduled workers from a fetch using `wrangler dev` in remote mode, by passing a new command line flag `--test-scheduled`. This exposes a route `/__scheduled` which will trigger the scheduled event. + Using the new middleware (https://github.com/cloudflare/workers-sdk/pull/1735), we implement a way of testing scheduled workers from a fetch using `wrangler dev` in remote mode, by passing a new command line flag `--test-scheduled`. This exposes a route `/__scheduled` which will trigger the scheduled event. ```sh $ npx wrangler dev index.js --test-scheduled @@ -991,9 +988,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c $ curl http://localhost:8787/__scheduled ``` - Closes https://github.com/cloudflare/wrangler2/issues/570 + Closes https://github.com/cloudflare/workers-sdk/issues/570 -- [#1801](https://github.com/cloudflare/wrangler2/pull/1801) [`07fc90d6`](https://github.com/cloudflare/wrangler2/commit/07fc90d60912d6906a4b419db8cefc501e693473) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: multi-worker testing +- [#1801](https://github.com/cloudflare/workers-sdk/pull/1801) [`07fc90d6`](https://github.com/cloudflare/workers-sdk/commit/07fc90d60912d6906a4b419db8cefc501e693473) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: multi-worker testing This change introduces the ability to test multi-worker setups via the wrangler API's [unstable_dev](https://developers.cloudflare.com/workers/wrangler/api/#unstable_dev) function. @@ -1047,27 +1044,27 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c }); ``` -* [#1865](https://github.com/cloudflare/wrangler2/pull/1865) [`adfc52d6`](https://github.com/cloudflare/wrangler2/commit/adfc52d6961ca3a43c846d7bce62a5864a80b373) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - polish: loglevel flag +* [#1865](https://github.com/cloudflare/workers-sdk/pull/1865) [`adfc52d6`](https://github.com/cloudflare/workers-sdk/commit/adfc52d6961ca3a43c846d7bce62a5864a80b373) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - polish: loglevel flag Added a '--log-level' flag that allows the user to specify between 'debug', 'info', 'log', 'warning', 'error', 'none' Currently 'none' will turn off all outputs in Miniflare (local mode), however, Wrangler will still output Errors. resolves #185 -- [#1861](https://github.com/cloudflare/wrangler2/pull/1861) [`3d51d553`](https://github.com/cloudflare/wrangler2/commit/3d51d5536d1c125142bfea1879609411905051ce) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Add 'charset' to 'Content-Type' on 'wrangler pages dev' responses +- [#1861](https://github.com/cloudflare/workers-sdk/pull/1861) [`3d51d553`](https://github.com/cloudflare/workers-sdk/commit/3d51d5536d1c125142bfea1879609411905051ce) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Add 'charset' to 'Content-Type' on 'wrangler pages dev' responses -* [#1867](https://github.com/cloudflare/wrangler2/pull/1867) [`5a6ccc58`](https://github.com/cloudflare/wrangler2/commit/5a6ccc584dffcbc0ae176bed7102dda8e50cdbea) Thanks [@cameron-robey](https://github.com/cameron-robey)! - fix: handle logging of empty map/set/weak-map/weak-set +* [#1867](https://github.com/cloudflare/workers-sdk/pull/1867) [`5a6ccc58`](https://github.com/cloudflare/workers-sdk/commit/5a6ccc584dffcbc0ae176bed7102dda8e50cdbea) Thanks [@cameron-robey](https://github.com/cameron-robey)! - fix: handle logging of empty map/set/weak-map/weak-set -- [#1882](https://github.com/cloudflare/wrangler2/pull/1882) [`ba0aed63`](https://github.com/cloudflare/wrangler2/commit/ba0aed63903d88ca2111084558625935cf7daddb) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: refactor remote.tsx to only destructure when necessary +- [#1882](https://github.com/cloudflare/workers-sdk/pull/1882) [`ba0aed63`](https://github.com/cloudflare/workers-sdk/commit/ba0aed63903d88ca2111084558625935cf7daddb) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: refactor remote.tsx to only destructure when necessary ## 2.1.4 ### Patch Changes -- [#1843](https://github.com/cloudflare/wrangler2/pull/1843) [`c5ee6dee`](https://github.com/cloudflare/wrangler2/commit/c5ee6deec547a69dc092cbcda2df212a6836013f) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: teach wrangler init how to write js tests +- [#1843](https://github.com/cloudflare/workers-sdk/pull/1843) [`c5ee6dee`](https://github.com/cloudflare/workers-sdk/commit/c5ee6deec547a69dc092cbcda2df212a6836013f) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: teach wrangler init how to write js tests -* [#1856](https://github.com/cloudflare/wrangler2/pull/1856) [`6aae958a`](https://github.com/cloudflare/wrangler2/commit/6aae958aafc7a2a5be8853214438bc7c1ccda939) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: add vitest as a test runner option +* [#1856](https://github.com/cloudflare/workers-sdk/pull/1856) [`6aae958a`](https://github.com/cloudflare/workers-sdk/commit/6aae958aafc7a2a5be8853214438bc7c1ccda939) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: add vitest as a test runner option -- [#1839](https://github.com/cloudflare/wrangler2/pull/1839) [`2660872a`](https://github.com/cloudflare/wrangler2/commit/2660872a391b6c4662889bfdd5fda035f48ca54d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: make it possible to specify a path for `unstable_dev()`'s fetch method +- [#1839](https://github.com/cloudflare/workers-sdk/pull/1839) [`2660872a`](https://github.com/cloudflare/workers-sdk/commit/2660872a391b6c4662889bfdd5fda035f48ca54d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: make it possible to specify a path for `unstable_dev()`'s fetch method ``` const worker = await unstable_dev( @@ -1078,23 +1075,23 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c where `req` can be anything from `RequestInfo`: `string | URL | Request`. -* [#1851](https://github.com/cloudflare/wrangler2/pull/1851) [`afca1b6c`](https://github.com/cloudflare/wrangler2/commit/afca1b6c47933ddb22ccb3317fbd4976c5b926c8) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: summary output for secret:bulk +* [#1851](https://github.com/cloudflare/workers-sdk/pull/1851) [`afca1b6c`](https://github.com/cloudflare/workers-sdk/commit/afca1b6c47933ddb22ccb3317fbd4976c5b926c8) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: summary output for secret:bulk When wrangler `secret:bulk ` is run, a summary is outputted at the end with the number of secrets successfully / unsuccessfully created. -- [#1847](https://github.com/cloudflare/wrangler2/pull/1847) [`5726788f`](https://github.com/cloudflare/wrangler2/commit/5726788fa1b50765c8455c98f508acffad6ca588) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: add instructions as part of wrangler init for testing +- [#1847](https://github.com/cloudflare/workers-sdk/pull/1847) [`5726788f`](https://github.com/cloudflare/workers-sdk/commit/5726788fa1b50765c8455c98f508acffad6ca588) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: add instructions as part of wrangler init for testing -* [#1846](https://github.com/cloudflare/wrangler2/pull/1846) [`f450e387`](https://github.com/cloudflare/wrangler2/commit/f450e387f61cf7e28b84fefd018d9758b7b2c931) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: when running `wrangler init`, add a `test` script to package.json when the user asks us to write their first test +* [#1846](https://github.com/cloudflare/workers-sdk/pull/1846) [`f450e387`](https://github.com/cloudflare/workers-sdk/commit/f450e387f61cf7e28b84fefd018d9758b7b2c931) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: when running `wrangler init`, add a `test` script to package.json when the user asks us to write their first test -- [#1837](https://github.com/cloudflare/wrangler2/pull/1837) [`aa5ede62`](https://github.com/cloudflare/wrangler2/commit/aa5ede624d9b9465dbe80cdfe2b21b85a8a217ba) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: explicitly export UnstableDevWorker type +- [#1837](https://github.com/cloudflare/workers-sdk/pull/1837) [`aa5ede62`](https://github.com/cloudflare/workers-sdk/commit/aa5ede624d9b9465dbe80cdfe2b21b85a8a217ba) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: explicitly export UnstableDevWorker type -* [#1779](https://github.com/cloudflare/wrangler2/pull/1779) [`974f3311`](https://github.com/cloudflare/wrangler2/commit/974f3311145175f77baacbf0b41fd81865c99159) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Add debug outputs to the exchange request +* [#1779](https://github.com/cloudflare/workers-sdk/pull/1779) [`974f3311`](https://github.com/cloudflare/workers-sdk/commit/974f3311145175f77baacbf0b41fd81865c99159) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Add debug outputs to the exchange request ## 2.1.3 ### Patch Changes -- [#1836](https://github.com/cloudflare/wrangler2/pull/1836) [`3583f313`](https://github.com/cloudflare/wrangler2/commit/3583f313f50d1b0ba703286a44842d1c70b730e9) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: wrangler publish for CI after a manual deployment +- [#1836](https://github.com/cloudflare/workers-sdk/pull/1836) [`3583f313`](https://github.com/cloudflare/workers-sdk/commit/3583f313f50d1b0ba703286a44842d1c70b730e9) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: wrangler publish for CI after a manual deployment Prior to this change, if you edited your Worker via the Cloudflare Dashboard, then used CI to deploy your script, `wrangler publish` would fail. @@ -1102,7 +1099,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #1832 -* [#1644](https://github.com/cloudflare/wrangler2/pull/1644) [`dc1c9595`](https://github.com/cloudflare/wrangler2/commit/dc1c959548b41c617dd220ff3b222c076b62ea78) Thanks [@geelen](https://github.com/geelen)! - Deprecated --experimental-enable-local-persistence. +* [#1644](https://github.com/cloudflare/workers-sdk/pull/1644) [`dc1c9595`](https://github.com/cloudflare/workers-sdk/commit/dc1c959548b41c617dd220ff3b222c076b62ea78) Thanks [@geelen](https://github.com/geelen)! - Deprecated --experimental-enable-local-persistence. Added --persist and --persist-to in its place. Changed the default persistence directory to .wrangler/state, relative to wrangler.toml. @@ -1112,13 +1109,13 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1833](https://github.com/cloudflare/wrangler2/pull/1833) [`b1622395`](https://github.com/cloudflare/wrangler2/commit/b1622395641057b1eda0d165951fd9079036fefc) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: \_headers and \_redirects parsing in 'wrangler pages dev' +- [#1833](https://github.com/cloudflare/workers-sdk/pull/1833) [`b1622395`](https://github.com/cloudflare/workers-sdk/commit/b1622395641057b1eda0d165951fd9079036fefc) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: \_headers and \_redirects parsing in 'wrangler pages dev' ## 2.1.1 ### Patch Changes -- [#1827](https://github.com/cloudflare/wrangler2/pull/1827) [`32a58fee`](https://github.com/cloudflare/wrangler2/commit/32a58fee8efd2c0c07dcb75ad5e52cbca8785b12) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: Publish error when deploying new Workers +- [#1827](https://github.com/cloudflare/workers-sdk/pull/1827) [`32a58fee`](https://github.com/cloudflare/workers-sdk/commit/32a58fee8efd2c0c07dcb75ad5e52cbca8785b12) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: Publish error when deploying new Workers This fix adds a try/catch when checking when the Worker was last deployed. @@ -1126,7 +1123,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c fixes #1824 -* [#1799](https://github.com/cloudflare/wrangler2/pull/1799) [`a89786ba`](https://github.com/cloudflare/wrangler2/commit/a89786ba3b08a7cd7c074c52b6b83ab91223dddf) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: Bulk Secret Upload +* [#1799](https://github.com/cloudflare/workers-sdk/pull/1799) [`a89786ba`](https://github.com/cloudflare/workers-sdk/commit/a89786ba3b08a7cd7c074c52b6b83ab91223dddf) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: Bulk Secret Upload Created a flag that allows for passing in a JSON file with key/value's of secrets. resolve #1610 @@ -1135,36 +1132,36 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Minor Changes -- [#1713](https://github.com/cloudflare/wrangler2/pull/1713) [`82451e9d`](https://github.com/cloudflare/wrangler2/commit/82451e9dbb12447f487904788a6e82b184c83722) Thanks [@jspspike](https://github.com/jspspike)! - Tail now uses updated endpoint. Allows tailing workers that are above the normal "invocations per second" limit when using the `--ip self` filter. +- [#1713](https://github.com/cloudflare/workers-sdk/pull/1713) [`82451e9d`](https://github.com/cloudflare/workers-sdk/commit/82451e9dbb12447f487904788a6e82b184c83722) Thanks [@jspspike](https://github.com/jspspike)! - Tail now uses updated endpoint. Allows tailing workers that are above the normal "invocations per second" limit when using the `--ip self` filter. ### Patch Changes -- [#1745](https://github.com/cloudflare/wrangler2/pull/1745) [`1a13e483`](https://github.com/cloudflare/wrangler2/commit/1a13e483398fb13239c3a5a58efbf4b30c47857e) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: let users know when we'll use their proxy for requests +- [#1745](https://github.com/cloudflare/workers-sdk/pull/1745) [`1a13e483`](https://github.com/cloudflare/workers-sdk/commit/1a13e483398fb13239c3a5a58efbf4b30c47857e) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: let users know when we'll use their proxy for requests -* [#1782](https://github.com/cloudflare/wrangler2/pull/1782) [`cc43e3c4`](https://github.com/cloudflare/wrangler2/commit/cc43e3c491aef432a52c15f43ecd4005c1400211) Thanks [@jahands](https://github.com/jahands)! - fix: Update Pages test to assert version in package.json +* [#1782](https://github.com/cloudflare/workers-sdk/pull/1782) [`cc43e3c4`](https://github.com/cloudflare/workers-sdk/commit/cc43e3c491aef432a52c15f43ecd4005c1400211) Thanks [@jahands](https://github.com/jahands)! - fix: Update Pages test to assert version in package.json This test was asserting a hardcoded wrangler version which broke after release. -- [#1786](https://github.com/cloudflare/wrangler2/pull/1786) [`1af49b68`](https://github.com/cloudflare/wrangler2/commit/1af49b68d3189b8ded0d53a2a88cf08d792abf2a) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: refactor unstable_dev to avoid race conditions with ports +- [#1786](https://github.com/cloudflare/workers-sdk/pull/1786) [`1af49b68`](https://github.com/cloudflare/workers-sdk/commit/1af49b68d3189b8ded0d53a2a88cf08d792abf2a) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: refactor unstable_dev to avoid race conditions with ports Prior to this change, wrangler would check to see if a port was available, do a bit more work, then try use that port when starting miniflare. With this change, we're using port 0 to tell Node to assign us a random free port. To make this change work, we had to do some plumbing so miniflare can tell us the host and port it's using, so we can call fetch against it. -* [#1795](https://github.com/cloudflare/wrangler2/pull/1795) [`c17f6d3d`](https://github.com/cloudflare/wrangler2/commit/c17f6d3d1efee7bbaa4de48dc01ff6b7b1f40c1e) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.8`](https://github.com/cloudflare/miniflare/releases/tag/v2.8.0) +* [#1795](https://github.com/cloudflare/workers-sdk/pull/1795) [`c17f6d3d`](https://github.com/cloudflare/workers-sdk/commit/c17f6d3d1efee7bbaa4de48dc01ff6b7b1f40c1e) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.8`](https://github.com/cloudflare/miniflare/releases/tag/v2.8.0) -- [#1788](https://github.com/cloudflare/wrangler2/pull/1788) [`152a1e81`](https://github.com/cloudflare/wrangler2/commit/152a1e81cb6967a701973faaf85ddc03404b866a) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Refactor 'wrangler pages dev' to use the same code as we do in production +- [#1788](https://github.com/cloudflare/workers-sdk/pull/1788) [`152a1e81`](https://github.com/cloudflare/workers-sdk/commit/152a1e81cb6967a701973faaf85ddc03404b866a) Thanks [@GregBrimble](https://github.com/GregBrimble)! - chore: Refactor 'wrangler pages dev' to use the same code as we do in production This will make our dev implementation an even closer simulation of production, and will make maintenance easier going forward. -* [#1789](https://github.com/cloudflare/wrangler2/pull/1789) [`b21ee41a`](https://github.com/cloudflare/wrangler2/commit/b21ee41ae66d739f2db496a73acfcbf57ef45c0e) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: getMonth compatibility date +* [#1789](https://github.com/cloudflare/workers-sdk/pull/1789) [`b21ee41a`](https://github.com/cloudflare/workers-sdk/commit/b21ee41ae66d739f2db496a73acfcbf57ef45c0e) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: getMonth compatibility date Set correct month for `compatibility_date` when initializing a new Worker resolves #1766 -- [#1694](https://github.com/cloudflare/wrangler2/pull/1694) [`3fb730a3`](https://github.com/cloudflare/wrangler2/commit/3fb730a33d36bbb6a4270c8d4a3a80fd506a9ad1) Thanks [@yjl9903](https://github.com/yjl9903)! - feat: starting pages dev server doesn't require command when proxy port provided +- [#1694](https://github.com/cloudflare/workers-sdk/pull/1694) [`3fb730a3`](https://github.com/cloudflare/workers-sdk/commit/3fb730a33d36bbb6a4270c8d4a3a80fd506a9ad1) Thanks [@yjl9903](https://github.com/yjl9903)! - feat: starting pages dev server doesn't require command when proxy port provided -* [#1729](https://github.com/cloudflare/wrangler2/pull/1729) [`ebb5b88f`](https://github.com/cloudflare/wrangler2/commit/ebb5b88fbcba30fca3beb3900c2429218aad5ed2) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: autogenerated config from dash +* [#1729](https://github.com/cloudflare/workers-sdk/pull/1729) [`ebb5b88f`](https://github.com/cloudflare/workers-sdk/commit/ebb5b88fbcba30fca3beb3900c2429218aad5ed2) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: autogenerated config from dash Makes `wrangler init`'s `--from-dash` option pull in data from Cloudflare's dashboard to generate a wrangler.toml file populated with configuration from an existing Worker. This is a first step towards making `wrangler init` more useful for folks who are already using Cloudflare's products on the Dashboard. @@ -1172,7 +1169,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c related discussion #1623 resolves #1638 -- [#1781](https://github.com/cloudflare/wrangler2/pull/1781) [`603d0b35`](https://github.com/cloudflare/wrangler2/commit/603d0b35074e2c59484e39305e0b01121de20f15) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: Publish Origin Messaging +- [#1781](https://github.com/cloudflare/workers-sdk/pull/1781) [`603d0b35`](https://github.com/cloudflare/workers-sdk/commit/603d0b35074e2c59484e39305e0b01121de20f15) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: Publish Origin Messaging feat: warn about potential conflicts during `publish` and `init --from-dash`. - If publishing to a worker that has been modified in the dashboard, warn that the dashboard changes will be overwritten. @@ -1180,7 +1177,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c resolves #1737 -* [#1735](https://github.com/cloudflare/wrangler2/pull/1735) [`de29a445`](https://github.com/cloudflare/wrangler2/commit/de29a4459750cf229fb563bcc8191ab3ad77bf4d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: new internal middleware +* [#1735](https://github.com/cloudflare/workers-sdk/pull/1735) [`de29a445`](https://github.com/cloudflare/workers-sdk/commit/de29a4459750cf229fb563bcc8191ab3ad77bf4d) Thanks [@cameron-robey](https://github.com/cameron-robey)! - feat: new internal middleware A new way of registering middleware that gets bundled and executed on the edge. @@ -1191,9 +1188,9 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1731](https://github.com/cloudflare/wrangler2/pull/1731) [`16f051d3`](https://github.com/cloudflare/wrangler2/commit/16f051d36e8c205374e5ac38b141def45095e3ef) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add custom \_routes.json support for Pages Functions projects +- [#1731](https://github.com/cloudflare/workers-sdk/pull/1731) [`16f051d3`](https://github.com/cloudflare/workers-sdk/commit/16f051d36e8c205374e5ac38b141def45095e3ef) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add custom \_routes.json support for Pages Functions projects -* [#1762](https://github.com/cloudflare/wrangler2/pull/1762) [`23f89216`](https://github.com/cloudflare/wrangler2/commit/23f8921628baf32f0cace1ebf893964a26afe91a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Use getBasePath() when trying to specify paths to files relative to the +* [#1762](https://github.com/cloudflare/workers-sdk/pull/1762) [`23f89216`](https://github.com/cloudflare/workers-sdk/commit/23f8921628baf32f0cace1ebf893964a26afe91a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Use getBasePath() when trying to specify paths to files relative to the base of the Wrangler package directory rather than trying to compute the path from Node.js constants like **dirname and **filename. This is because the act of bundling the source code can move the file that contains @@ -1201,12 +1198,12 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Fixes #1755 -- [#1763](https://github.com/cloudflare/wrangler2/pull/1763) [`75f3ae82`](https://github.com/cloudflare/wrangler2/commit/75f3ae829b0b4f8ae2cf2093bda93e8096838240) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add `description` field to \_routes.json +- [#1763](https://github.com/cloudflare/workers-sdk/pull/1763) [`75f3ae82`](https://github.com/cloudflare/workers-sdk/commit/75f3ae829b0b4f8ae2cf2093bda93e8096838240) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add `description` field to \_routes.json When generating routes for Functions projects, let's add a description so we know what wrangler version generated this config -* [#1538](https://github.com/cloudflare/wrangler2/pull/1538) [`2c9caf74`](https://github.com/cloudflare/wrangler2/commit/2c9caf74bdf3f60db7c244b2202f358abe5ced1f) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: refactor wrangler.dev API to not need React/Ink +* [#1538](https://github.com/cloudflare/workers-sdk/pull/1538) [`2c9caf74`](https://github.com/cloudflare/workers-sdk/commit/2c9caf74bdf3f60db7c244b2202f358abe5ced1f) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: refactor wrangler.dev API to not need React/Ink Prior to this change, `wrangler.unstable_dev()` would only support running one instance of wrangler at a time, as Ink only lets you render one instance of React. This resulted in test failures in CI. @@ -1222,39 +1219,39 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #1432 Closes #1419 -- [#1775](https://github.com/cloudflare/wrangler2/pull/1775) [`8163b8cf`](https://github.com/cloudflare/wrangler2/commit/8163b8cfde8020d76bd64090276347b01b4a8f8d) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add unit tests for `wrangler pages publish` +- [#1775](https://github.com/cloudflare/workers-sdk/pull/1775) [`8163b8cf`](https://github.com/cloudflare/workers-sdk/commit/8163b8cfde8020d76bd64090276347b01b4a8f8d) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Add unit tests for `wrangler pages publish` ## 2.0.28 ### Patch Changes -- [#1725](https://github.com/cloudflare/wrangler2/pull/1725) [`eb75413e`](https://github.com/cloudflare/wrangler2/commit/eb75413ec35f6d4f6306601f4d5c9d058f794a18) Thanks [@threepointone](https://github.com/threepointone)! - rename: `worker_namespaces` / `dispatch_namespaces` +- [#1725](https://github.com/cloudflare/workers-sdk/pull/1725) [`eb75413e`](https://github.com/cloudflare/workers-sdk/commit/eb75413ec35f6d4f6306601f4d5c9d058f794a18) Thanks [@threepointone](https://github.com/threepointone)! - rename: `worker_namespaces` / `dispatch_namespaces` The Worker-for-Platforms team would like to rename this field to more closely match what it's called internally. This fix does a search+replace on this term. This feature already had an experimental warning, and no one's using it at the moment, so we're not going to add a warning/backward compat for existing customers. -* [#1736](https://github.com/cloudflare/wrangler2/pull/1736) [`800f8553`](https://github.com/cloudflare/wrangler2/commit/800f8553b25bb0641fd5e9b38eb5d9ca02abe24c) Thanks [@threepointone](https://github.com/threepointone)! - fix: do not delete previously defined plain_text/json bindings on publish +* [#1736](https://github.com/cloudflare/workers-sdk/pull/1736) [`800f8553`](https://github.com/cloudflare/workers-sdk/commit/800f8553b25bb0641fd5e9b38eb5d9ca02abe24c) Thanks [@threepointone](https://github.com/threepointone)! - fix: do not delete previously defined plain_text/json bindings on publish Currently, when we publish a worker, we delete an pre-existing bindings if they're not otherwise defined in `wrangler.toml`, and overwrite existing ones. But folks may be deploying with wrangler, and changing environment variables on the fly (like marketing messages, etc). It's annoying when deploying via wrangler blows away those values. This patch fixes one of those issues. It will not delete any older bindings that are not in wrangler.toml. It still _does_ overwrite existing vars, but at least this gives a way for developers to have some vars that are not blown away on every publish. -- [#1726](https://github.com/cloudflare/wrangler2/pull/1726) [`0b83504c`](https://github.com/cloudflare/wrangler2/commit/0b83504c12b35301acaeb5302c0d16021c958f8e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Multiworker and static asset dev bug preventing both from being used +- [#1726](https://github.com/cloudflare/workers-sdk/pull/1726) [`0b83504c`](https://github.com/cloudflare/workers-sdk/commit/0b83504c12b35301acaeb5302c0d16021c958f8e) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Multiworker and static asset dev bug preventing both from being used There was previously a collision on the generated filenames which resulted in the generated scripts looping and crashing in Miniflare with error code 7. By renaming one of the generated files, this is avoided. -* [#1718](https://github.com/cloudflare/wrangler2/pull/1718) [`02f1fe9b`](https://github.com/cloudflare/wrangler2/commit/02f1fe9b07bb08b7395e7de1d78cc929221b464f) Thanks [@threepointone](https://github.com/threepointone)! - fix: use `config.dev.ip` when provided +* [#1718](https://github.com/cloudflare/workers-sdk/pull/1718) [`02f1fe9b`](https://github.com/cloudflare/workers-sdk/commit/02f1fe9b07bb08b7395e7de1d78cc929221b464f) Thanks [@threepointone](https://github.com/threepointone)! - fix: use `config.dev.ip` when provided Because we'd used a default for 0.0.0.0 for the `--ip` flag, `wrangler dev` was overriding the value specified in `wrangler.toml` under `dev.ip`. This fix removes the default value (since it's being set when normalising config anyway). - Fixes https://github.com/cloudflare/wrangler2/issues/1714 + Fixes https://github.com/cloudflare/workers-sdk/issues/1714 -- [#1727](https://github.com/cloudflare/wrangler2/pull/1727) [`3f9e8f63`](https://github.com/cloudflare/wrangler2/commit/3f9e8f634e6544bf3aef8748f56041a077758ab2) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: refresh token when we detect that the preview session has expired (error code 10049) +- [#1727](https://github.com/cloudflare/workers-sdk/pull/1727) [`3f9e8f63`](https://github.com/cloudflare/workers-sdk/commit/3f9e8f634e6544bf3aef8748f56041a077758ab2) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: refresh token when we detect that the preview session has expired (error code 10049) When running `wrangler dev`, from time to time the preview session token would expire, and the dev server would need to be manually restarted. This fixes this, by refreshing the token when it expires. Closes #1446 -* [#1730](https://github.com/cloudflare/wrangler2/pull/1730) [`27ad80ee`](https://github.com/cloudflare/wrangler2/commit/27ad80eed7f25393a0e5c1d8a62c3b0e743a639d) Thanks [@threepointone](https://github.com/threepointone)! - feat: `--var name:value` and `--define name:value` +* [#1730](https://github.com/cloudflare/workers-sdk/pull/1730) [`27ad80ee`](https://github.com/cloudflare/workers-sdk/commit/27ad80eed7f25393a0e5c1d8a62c3b0e743a639d) Thanks [@threepointone](https://github.com/threepointone)! - feat: `--var name:value` and `--define name:value` This enables passing values for `[vars]` and `[define]` via the cli. We have a number of usecases where the values to be injected during dev/publish aren't available statically (eg: a version string, some identifier for 3p libraries, etc) and reading those values only from `wrangler.toml` isn't good ergonomically. So we can now read those values when passed through the CLI. @@ -1268,81 +1265,81 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Also, you can use actual environment vars in these commands. e.g.: `wrangler dev --var xyz:$XYZ` will set `xyz` to whatever `XYZ` has been set to in the terminal environment. -- [#1700](https://github.com/cloudflare/wrangler2/pull/1700) [`d7c23e49`](https://github.com/cloudflare/wrangler2/commit/d7c23e49706cb8fdb6eb71ece9fb4eca14c62df8) Thanks [@penalosa](https://github.com/penalosa)! - Closes [#1505](https://github.com/cloudflare/wrangler2/issues/1505) by extending `wrangler tail` to allow for passing worker routes as well as worker script names. +- [#1700](https://github.com/cloudflare/workers-sdk/pull/1700) [`d7c23e49`](https://github.com/cloudflare/workers-sdk/commit/d7c23e49706cb8fdb6eb71ece9fb4eca14c62df8) Thanks [@penalosa](https://github.com/penalosa)! - Closes [#1505](https://github.com/cloudflare/workers-sdk/issues/1505) by extending `wrangler tail` to allow for passing worker routes as well as worker script names. For example, if you have a worker `example-worker` assigned to the route `example.com/*`, you can retrieve it's logs by running either `wrangler tail example.com/*` or `wrangler tail example-worker`—previously only `wrangler tail example-worker` was supported. -* [#1720](https://github.com/cloudflare/wrangler2/pull/1720) [`f638de64`](https://github.com/cloudflare/wrangler2/commit/f638de6426619a899367ba41674179b8ca67c6ab) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.7.1`](https://github.com/cloudflare/miniflare/releases/tag/v2.7.1) incorporating changes from [`2.7.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.7.0) +* [#1720](https://github.com/cloudflare/workers-sdk/pull/1720) [`f638de64`](https://github.com/cloudflare/workers-sdk/commit/f638de6426619a899367ba41674179b8ca67c6ab) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to [`2.7.1`](https://github.com/cloudflare/miniflare/releases/tag/v2.7.1) incorporating changes from [`2.7.0`](https://github.com/cloudflare/miniflare/releases/tag/v2.7.0) -- [#1691](https://github.com/cloudflare/wrangler2/pull/1691) [`5b2c3ee2`](https://github.com/cloudflare/wrangler2/commit/5b2c3ee2c5d65b25c966ca07751f544f282525b9) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: bump undici and increase minimum node version to 16.13 +- [#1691](https://github.com/cloudflare/workers-sdk/pull/1691) [`5b2c3ee2`](https://github.com/cloudflare/workers-sdk/commit/5b2c3ee2c5d65b25c966ca07751f544f282525b9) Thanks [@cameron-robey](https://github.com/cameron-robey)! - chore: bump undici and increase minimum node version to 16.13 - We bump undici to version to 5.9.1 to patch some security vulnerabilities in previous versions - This requires bumping the minimum node version to >= 16.8 so we update the minimum to the LTS 16.13 - Fixes https://github.com/cloudflare/wrangler2/issues/1679 - Fixes https://github.com/cloudflare/wrangler2/issues/1684 + Fixes https://github.com/cloudflare/workers-sdk/issues/1679 + Fixes https://github.com/cloudflare/workers-sdk/issues/1684 ## 2.0.27 ### Patch Changes -- [#1686](https://github.com/cloudflare/wrangler2/pull/1686) [`a0a3ffde`](https://github.com/cloudflare/wrangler2/commit/a0a3ffde4a2388cfa2c6d2fa13b4c0ee94a172ba) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: pages dev correctly escapes regex characters in function paths (fixes #1685) +- [#1686](https://github.com/cloudflare/workers-sdk/pull/1686) [`a0a3ffde`](https://github.com/cloudflare/workers-sdk/commit/a0a3ffde4a2388cfa2c6d2fa13b4c0ee94a172ba) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: pages dev correctly escapes regex characters in function paths (fixes #1685) -* [#1667](https://github.com/cloudflare/wrangler2/pull/1667) [`ba6451df`](https://github.com/cloudflare/wrangler2/commit/ba6451dfe888580aa7d8d33c2c770a5d3d57667d) Thanks [@arjunyel](https://github.com/arjunyel)! - fix: check for nonempty kv id and r2 bucket_name +* [#1667](https://github.com/cloudflare/workers-sdk/pull/1667) [`ba6451df`](https://github.com/cloudflare/workers-sdk/commit/ba6451dfe888580aa7d8d33c2c770a5d3d57667d) Thanks [@arjunyel](https://github.com/arjunyel)! - fix: check for nonempty kv id and r2 bucket_name -- [#1628](https://github.com/cloudflare/wrangler2/pull/1628) [`61e3f00b`](https://github.com/cloudflare/wrangler2/commit/61e3f00bcb017b7ea96bb0c12459c56539fb891a) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: pages dev process exit when proxied process exits +- [#1628](https://github.com/cloudflare/workers-sdk/pull/1628) [`61e3f00b`](https://github.com/cloudflare/workers-sdk/commit/61e3f00bcb017b7ea96bb0c12459c56539fb891a) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: pages dev process exit when proxied process exits Currently, if the process pages dev is proxying exists or crashes, pages dev does not clean it up, and attempts to continue proxying requests to it, resulting in it throwing 502 errors. This fixes that behaviour to make wrangler exit with the code the child_process exits with. -* [#1690](https://github.com/cloudflare/wrangler2/pull/1690) [`670fa778`](https://github.com/cloudflare/wrangler2/commit/670fa778db263a3cf81b2b1d572dcb0df96a0463) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: check if we're in CI before trying to open the browser +* [#1690](https://github.com/cloudflare/workers-sdk/pull/1690) [`670fa778`](https://github.com/cloudflare/workers-sdk/commit/670fa778db263a3cf81b2b1d572dcb0df96a0463) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: check if we're in CI before trying to open the browser -- [#1675](https://github.com/cloudflare/wrangler2/pull/1675) [`ee30101d`](https://github.com/cloudflare/wrangler2/commit/ee30101db59b195dba734fcbd479ec1aeae1feab) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: use rimraf & cross-env to support windows development +- [#1675](https://github.com/cloudflare/workers-sdk/pull/1675) [`ee30101d`](https://github.com/cloudflare/workers-sdk/commit/ee30101db59b195dba734fcbd479ec1aeae1feab) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: use rimraf & cross-env to support windows development -* [#1710](https://github.com/cloudflare/wrangler2/pull/1710) [`9943e647`](https://github.com/cloudflare/wrangler2/commit/9943e647c56c686d0e499c28b3c54b4fbe47dccb) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: pass create-cloudflare the correct path +* [#1710](https://github.com/cloudflare/workers-sdk/pull/1710) [`9943e647`](https://github.com/cloudflare/workers-sdk/commit/9943e647c56c686d0e499c28b3c54b4fbe47dccb) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: pass create-cloudflare the correct path wrangler generate was passing create-cloudflare an absolute path, rather than a folder name, resulting in "doubled-up" paths -- [#1712](https://github.com/cloudflare/wrangler2/pull/1712) [`c18c60ee`](https://github.com/cloudflare/wrangler2/commit/c18c60eeacca27656f0e21f1bdcfc0e1298343c3) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: add debug logging to CF API requests and remote dev worker requests +- [#1712](https://github.com/cloudflare/workers-sdk/pull/1712) [`c18c60ee`](https://github.com/cloudflare/workers-sdk/commit/c18c60eeacca27656f0e21f1bdcfc0e1298343c3) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: add debug logging to CF API requests and remote dev worker requests -* [#1663](https://github.com/cloudflare/wrangler2/pull/1663) [`a9f9094c`](https://github.com/cloudflare/wrangler2/commit/a9f9094c92e547c1db7cd45fb5bc46f933f75e39) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Adds `--compatibility-date` and `--compatibility-flags` to `wrangler pages dev` +* [#1663](https://github.com/cloudflare/workers-sdk/pull/1663) [`a9f9094c`](https://github.com/cloudflare/workers-sdk/commit/a9f9094c92e547c1db7cd45fb5bc46f933f75e39) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Adds `--compatibility-date` and `--compatibility-flags` to `wrangler pages dev` Soon to follow in production. -- [#1653](https://github.com/cloudflare/wrangler2/pull/1653) [`46b73b52`](https://github.com/cloudflare/wrangler2/commit/46b73b5227ddbcc0ce53feb1c13845044474c86c) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Fixed R2 create bucket API endpoint. The `wrangler r2 bucket create` command should work again +- [#1653](https://github.com/cloudflare/workers-sdk/pull/1653) [`46b73b52`](https://github.com/cloudflare/workers-sdk/commit/46b73b5227ddbcc0ce53feb1c13845044474c86c) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Fixed R2 create bucket API endpoint. The `wrangler r2 bucket create` command should work again ## 2.0.26 ### Patch Changes -- [#1655](https://github.com/cloudflare/wrangler2/pull/1655) [`fed80faa`](https://github.com/cloudflare/wrangler2/commit/fed80faa9d704d7d840d65a7dfc57805ff9356d7) Thanks [@jahands](https://github.com/jahands)! - fix: Pages Functions custom \_routes.json not being used +- [#1655](https://github.com/cloudflare/workers-sdk/pull/1655) [`fed80faa`](https://github.com/cloudflare/workers-sdk/commit/fed80faa9d704d7d840d65a7dfc57805ff9356d7) Thanks [@jahands](https://github.com/jahands)! - fix: Pages Functions custom \_routes.json not being used Also cleaned up when we were reading generated \_routes.json -* [#1649](https://github.com/cloudflare/wrangler2/pull/1649) [`a366b12f`](https://github.com/cloudflare/wrangler2/commit/a366b12f6af1593a5d060ad83338397a6047d329) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: [windows] unable to find netstat +* [#1649](https://github.com/cloudflare/workers-sdk/pull/1649) [`a366b12f`](https://github.com/cloudflare/workers-sdk/commit/a366b12f6af1593a5d060ad83338397a6047d329) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: [windows] unable to find netstat -- [#1626](https://github.com/cloudflare/wrangler2/pull/1626) [`f650a0b2`](https://github.com/cloudflare/wrangler2/commit/f650a0b2be8f725d5e71520f89fe848bb1379194) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: Added pathname to the constructed URL service bindings + wrangler dev ignores pathname when making a request. +- [#1626](https://github.com/cloudflare/workers-sdk/pull/1626) [`f650a0b2`](https://github.com/cloudflare/workers-sdk/commit/f650a0b2be8f725d5e71520f89fe848bb1379194) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: Added pathname to the constructed URL service bindings + wrangler dev ignores pathname when making a request. resolves #1598 -* [#1648](https://github.com/cloudflare/wrangler2/pull/1648) [`af669a19`](https://github.com/cloudflare/wrangler2/commit/af669a1983a02adc1b997798869b2b4260c10891) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Implement new wrangler pages functions optimize-routes command +* [#1648](https://github.com/cloudflare/workers-sdk/pull/1648) [`af669a19`](https://github.com/cloudflare/workers-sdk/commit/af669a1983a02adc1b997798869b2b4260c10891) Thanks [@CarmenPopoviciu](https://github.com/CarmenPopoviciu)! - Implement new wrangler pages functions optimize-routes command -- [#1622](https://github.com/cloudflare/wrangler2/pull/1622) [`02bdfde0`](https://github.com/cloudflare/wrangler2/commit/02bdfde0d683097d1d1c40d9e3b64011cc8859ef) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: Handle static files with multiple extensions, e.g. /a.b should resolve /a.b.html, if /a.b as a file does not exist +- [#1622](https://github.com/cloudflare/workers-sdk/pull/1622) [`02bdfde0`](https://github.com/cloudflare/workers-sdk/commit/02bdfde0d683097d1d1c40d9e3b64011cc8859ef) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: Handle static files with multiple extensions, e.g. /a.b should resolve /a.b.html, if /a.b as a file does not exist -* [#1666](https://github.com/cloudflare/wrangler2/pull/1666) [`662dfdf9`](https://github.com/cloudflare/wrangler2/commit/662dfdf9e02056245e0c0ac7464f1c7b83465899) Thanks [@jahands](https://github.com/jahands)! - fix: Consolidate routes that are over the limit to prevent failed deployments +* [#1666](https://github.com/cloudflare/workers-sdk/pull/1666) [`662dfdf9`](https://github.com/cloudflare/workers-sdk/commit/662dfdf9e02056245e0c0ac7464f1c7b83465899) Thanks [@jahands](https://github.com/jahands)! - fix: Consolidate routes that are over the limit to prevent failed deployments Rather than failing a deployment because a route is too long (>100 characters), it will now be shortened to the next available level. Eg. `/foo/aaaaaaa...` -> `/foo/*` -- [#1670](https://github.com/cloudflare/wrangler2/pull/1670) [`1b232aaf`](https://github.com/cloudflare/wrangler2/commit/1b232aafa7ba192f8cc309d5905d9afdaa4eae78) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: dev.tsx opens 127.0.0.1 instead of 0.0.0.0 (doesn't work on windows) +- [#1670](https://github.com/cloudflare/workers-sdk/pull/1670) [`1b232aaf`](https://github.com/cloudflare/workers-sdk/commit/1b232aafa7ba192f8cc309d5905d9afdaa4eae78) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: dev.tsx opens 127.0.0.1 instead of 0.0.0.0 (doesn't work on windows) -* [#1671](https://github.com/cloudflare/wrangler2/pull/1671) [`808c0ab3`](https://github.com/cloudflare/wrangler2/commit/808c0ab39465c61c8cca532329a56fa4786331b0) Thanks [@Skye-31](https://github.com/Skye-31)! - feat: pages publish - log special files being uploaded +* [#1671](https://github.com/cloudflare/workers-sdk/pull/1671) [`808c0ab3`](https://github.com/cloudflare/workers-sdk/commit/808c0ab39465c61c8cca532329a56fa4786331b0) Thanks [@Skye-31](https://github.com/Skye-31)! - feat: pages publish - log special files being uploaded -- [#1656](https://github.com/cloudflare/wrangler2/pull/1656) [`37852672`](https://github.com/cloudflare/wrangler2/commit/37852672ba14cacfeb780b03f3ea35e82ca1aa1f) Thanks [@jahands](https://github.com/jahands)! - fix: Warn when Pages Functions have no routes +- [#1656](https://github.com/cloudflare/workers-sdk/pull/1656) [`37852672`](https://github.com/cloudflare/workers-sdk/commit/37852672ba14cacfeb780b03f3ea35e82ca1aa1f) Thanks [@jahands](https://github.com/jahands)! - fix: Warn when Pages Functions have no routes Building/publishing pages functions with no valid handlers would result in a Functions script containing no routes, often because the user is using the functions directory for something unrelated. This will no longer add an empty Functions script to the deployment, needlessly consuming Functions quota. -* [#1665](https://github.com/cloudflare/wrangler2/pull/1665) [`c40fca42`](https://github.com/cloudflare/wrangler2/commit/c40fca421b6826d7f0ef0bf7a8840e4bce7cd062) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Fix SW and Durable Object request URLs made over the service registry +* [#1665](https://github.com/cloudflare/workers-sdk/pull/1665) [`c40fca42`](https://github.com/cloudflare/workers-sdk/commit/c40fca421b6826d7f0ef0bf7a8840e4bce7cd062) Thanks [@GregBrimble](https://github.com/GregBrimble)! - fix: Fix SW and Durable Object request URLs made over the service registry -- [#1645](https://github.com/cloudflare/wrangler2/pull/1645) [`ac397480`](https://github.com/cloudflare/wrangler2/commit/ac39748069d2d20cb4dfd703b65f2329f60ae4ce) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: download & initialize a wrangler project from dashboard worker +- [#1645](https://github.com/cloudflare/workers-sdk/pull/1645) [`ac397480`](https://github.com/cloudflare/workers-sdk/commit/ac39748069d2d20cb4dfd703b65f2329f60ae4ce) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: download & initialize a wrangler project from dashboard worker Added `wrangler init --from-dash `, which allows initializing a wrangler project from a pre-existing worker in the dashboard. @@ -1351,7 +1348,7 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Notes: `multiplart/form-data` parsing is [not currently supported in Undici](https://github.com/nodejs/undici/issues/974), so a temporary workaround to slice off top and bottom boundaries is in place. -* [#1639](https://github.com/cloudflare/wrangler2/pull/1639) [`d86382a5`](https://github.com/cloudflare/wrangler2/commit/d86382a50fd4a163659cdf745e462f3a9c7159a5) Thanks [@matthewdavidrodgers](https://github.com/matthewdavidrodgers)! - fix: support 'exceededMemory' error status in tail +* [#1639](https://github.com/cloudflare/workers-sdk/pull/1639) [`d86382a5`](https://github.com/cloudflare/workers-sdk/commit/d86382a50fd4a163659cdf745e462f3a9c7159a5) Thanks [@matthewdavidrodgers](https://github.com/matthewdavidrodgers)! - fix: support 'exceededMemory' error status in tail While the exception for 'Worker exceeded memory limits' gets logged correctly when tailing, the actual status wasn't being counted as an @@ -1363,17 +1360,17 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1615](https://github.com/cloudflare/wrangler2/pull/1615) [`9163da17`](https://github.com/cloudflare/wrangler2/commit/9163da17959532ab801c8dca772e29c135f80cf1) Thanks [@huw](https://github.com/huw)! - fix: Resolve source maps correctly in local dev mode +- [#1615](https://github.com/cloudflare/workers-sdk/pull/1615) [`9163da17`](https://github.com/cloudflare/workers-sdk/commit/9163da17959532ab801c8dca772e29c135f80cf1) Thanks [@huw](https://github.com/huw)! - fix: Resolve source maps correctly in local dev mode - Resolves https://github.com/cloudflare/wrangler2/issues/1614 + Resolves https://github.com/cloudflare/workers-sdk/issues/1614 -* [#1617](https://github.com/cloudflare/wrangler2/pull/1617) [`32c9a4ae`](https://github.com/cloudflare/wrangler2/commit/32c9a4ae95eb2d6ffecb8f5765ed68b2e9278f4e) Thanks [@jahands](https://github.com/jahands)! - fix: Ignore \_routes.generated.json when uploading Pages assets +* [#1617](https://github.com/cloudflare/workers-sdk/pull/1617) [`32c9a4ae`](https://github.com/cloudflare/workers-sdk/commit/32c9a4ae95eb2d6ffecb8f5765ed68b2e9278f4e) Thanks [@jahands](https://github.com/jahands)! - fix: Ignore \_routes.generated.json when uploading Pages assets -- [#1609](https://github.com/cloudflare/wrangler2/pull/1609) [`fa8cb73f`](https://github.com/cloudflare/wrangler2/commit/fa8cb73f72e3f167289326ed6a2ce58d42bd9102) Thanks [@jahands](https://github.com/jahands)! - patch: Consolidate redundant routes when generating \_routes.generated.json +- [#1609](https://github.com/cloudflare/workers-sdk/pull/1609) [`fa8cb73f`](https://github.com/cloudflare/workers-sdk/commit/fa8cb73f72e3f167289326ed6a2ce58d42bd9102) Thanks [@jahands](https://github.com/jahands)! - patch: Consolidate redundant routes when generating \_routes.generated.json Example: `["/foo/:name", "/foo/bar"] => ["/foo/*"]` -* [#1595](https://github.com/cloudflare/wrangler2/pull/1595) [`d4fbd0be`](https://github.com/cloudflare/wrangler2/commit/d4fbd0be5f5801c331a76709cb375a9386117361) Thanks [@caass](https://github.com/caass)! - Add support for Alarm Events in `wrangler tail` +* [#1595](https://github.com/cloudflare/workers-sdk/pull/1595) [`d4fbd0be`](https://github.com/cloudflare/workers-sdk/commit/d4fbd0be5f5801c331a76709cb375a9386117361) Thanks [@caass](https://github.com/caass)! - Add support for Alarm Events in `wrangler tail` `wrangler tail --format pretty` now supports receiving events from [Durable Object Alarms](https://developers.cloudflare.com/workers/learning/using-durable-objects/#alarms-in-durable-objects), and will display the time the alarm was triggered. @@ -1381,15 +1378,15 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Closes #1519 -- [#1642](https://github.com/cloudflare/wrangler2/pull/1642) [`a3e654f8`](https://github.com/cloudflare/wrangler2/commit/a3e654f8d98c5ac5bbb5d167ddaf6b8975c383c5) Thanks [@jrf0110](https://github.com/jrf0110)! - feat: Add output-routes-path to functions build +- [#1642](https://github.com/cloudflare/workers-sdk/pull/1642) [`a3e654f8`](https://github.com/cloudflare/workers-sdk/commit/a3e654f8d98c5ac5bbb5d167ddaf6b8975c383c5) Thanks [@jrf0110](https://github.com/jrf0110)! - feat: Add output-routes-path to functions build This controls the output path of the \_routes.json file. Also moves \_routes.json generation to tmp directory during functions build + publish -* [#1606](https://github.com/cloudflare/wrangler2/pull/1606) [`24327289`](https://github.com/cloudflare/wrangler2/commit/243272890ece055b1b5a7fdb3eb97200ea686a98) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: make prettier also fix changesets, as it causes checks to fail if they're not formatted +* [#1606](https://github.com/cloudflare/workers-sdk/pull/1606) [`24327289`](https://github.com/cloudflare/workers-sdk/commit/243272890ece055b1b5a7fdb3eb97200ea686a98) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: make prettier also fix changesets, as it causes checks to fail if they're not formatted -- [#1611](https://github.com/cloudflare/wrangler2/pull/1611) [`3df0fe04`](https://github.com/cloudflare/wrangler2/commit/3df0fe043a69492db2a2ebe7098e0355409d3dc6) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Durable Object multi-worker bindings in local dev. +- [#1611](https://github.com/cloudflare/workers-sdk/pull/1611) [`3df0fe04`](https://github.com/cloudflare/workers-sdk/commit/3df0fe043a69492db2a2ebe7098e0355409d3dc6) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Durable Object multi-worker bindings in local dev. - Building on [the recent work for multi-worker Service bindings in local dev](https://github.com/cloudflare/wrangler2/pull/1503), this now adds support for direct Durable Object namespace bindings. + Building on [the recent work for multi-worker Service bindings in local dev](https://github.com/cloudflare/workers-sdk/pull/1503), this now adds support for direct Durable Object namespace bindings. A parent (calling) Worker will look for child Workers (where the Durable Object has been defined) by matching the `script_name` configuration option with the child's Service name. For example, if you have a Worker A which defines a Durable Object, `MyDurableObject`, and Worker B which references A's Durable Object: @@ -1415,43 +1412,43 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c Note: this only works in local mode (`wrangler dev --local`) at present. -* [#1621](https://github.com/cloudflare/wrangler2/pull/1621) [`2aa3fe88`](https://github.com/cloudflare/wrangler2/commit/2aa3fe884422671ba128ea01a37abf63d344e541) Thanks [@Skye-31](https://github.com/Skye-31)! - fix(#1487) [pages]: Command failed: git rev-parse --abrev-ref HEAD +* [#1621](https://github.com/cloudflare/workers-sdk/pull/1621) [`2aa3fe88`](https://github.com/cloudflare/workers-sdk/commit/2aa3fe884422671ba128ea01a37abf63d344e541) Thanks [@Skye-31](https://github.com/Skye-31)! - fix(#1487) [pages]: Command failed: git rev-parse --abrev-ref HEAD -- [#1631](https://github.com/cloudflare/wrangler2/pull/1631) [`f1c97c8b`](https://github.com/cloudflare/wrangler2/commit/f1c97c8ba07d1b346bbd12e05503007b8e6ec912) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: add fixtures to prettier +- [#1631](https://github.com/cloudflare/workers-sdk/pull/1631) [`f1c97c8b`](https://github.com/cloudflare/workers-sdk/commit/f1c97c8ba07d1b346bbd12e05503007b8e6ec912) Thanks [@Skye-31](https://github.com/Skye-31)! - chore: add fixtures to prettier -* [#1602](https://github.com/cloudflare/wrangler2/pull/1602) [`ebd1d631`](https://github.com/cloudflare/wrangler2/commit/ebd1d631915fb2041886aad8ee398d5c9e0f612e) Thanks [@huw](https://github.com/huw)! - fix: Pass `usageModel` to Miniflare in local dev +* [#1602](https://github.com/cloudflare/workers-sdk/pull/1602) [`ebd1d631`](https://github.com/cloudflare/workers-sdk/commit/ebd1d631915fb2041886aad8ee398d5c9e0f612e) Thanks [@huw](https://github.com/huw)! - fix: Pass `usageModel` to Miniflare in local dev This allows Miniflare to dynamically update the external subrequest limit for Unbound workers. -- [#1629](https://github.com/cloudflare/wrangler2/pull/1629) [`06915ff7`](https://github.com/cloudflare/wrangler2/commit/06915ff780c7333a2f979b042b4c20eed1338b37) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: disallow imports in \_worker.js (https://github.com/cloudflare/wrangler2/issues/1214) +- [#1629](https://github.com/cloudflare/workers-sdk/pull/1629) [`06915ff7`](https://github.com/cloudflare/workers-sdk/commit/06915ff780c7333a2f979b042b4c20eed1338b37) Thanks [@Skye-31](https://github.com/Skye-31)! - fix: disallow imports in \_worker.js (https://github.com/cloudflare/workers-sdk/issues/1214) -* [#1518](https://github.com/cloudflare/wrangler2/pull/1518) [`85ab8a93`](https://github.com/cloudflare/wrangler2/commit/85ab8a9389de8d77b1d08b2cf14a5c7b5d493e07) Thanks [@jahands](https://github.com/jahands)! - feature: Reduce Pages Functions executions for Asset-only requests in `_routes.json` +* [#1518](https://github.com/cloudflare/workers-sdk/pull/1518) [`85ab8a93`](https://github.com/cloudflare/workers-sdk/commit/85ab8a9389de8d77b1d08b2cf14a5c7b5d493e07) Thanks [@jahands](https://github.com/jahands)! - feature: Reduce Pages Functions executions for Asset-only requests in `_routes.json` Manually create a `_routes.json` file in your build output directory to specify routes. This is a set of inclusion/exclusion rules to indicate when to run a Pages project's Functions. Note: This is an experemental feature and is subject to change. -- [#1634](https://github.com/cloudflare/wrangler2/pull/1634) [`f6ea7e7b`](https://github.com/cloudflare/wrangler2/commit/f6ea7e7b48b36e39b11380eb6a14461ebbabc80b) Thanks [@Skye-31](https://github.com/Skye-31)! - feat: [pages] add loaders for .html & .txt +- [#1634](https://github.com/cloudflare/workers-sdk/pull/1634) [`f6ea7e7b`](https://github.com/cloudflare/workers-sdk/commit/f6ea7e7b48b36e39b11380eb6a14461ebbabc80b) Thanks [@Skye-31](https://github.com/Skye-31)! - feat: [pages] add loaders for .html & .txt -* [#1589](https://github.com/cloudflare/wrangler2/pull/1589) [`6aa96e49`](https://github.com/cloudflare/wrangler2/commit/6aa96e490489e5847bae53885b9e5ef3dcff55b7) Thanks [@Skye-31](https://github.com/Skye-31)! - fix routing for URI encoded static requests +* [#1589](https://github.com/cloudflare/workers-sdk/pull/1589) [`6aa96e49`](https://github.com/cloudflare/workers-sdk/commit/6aa96e490489e5847bae53885b9e5ef3dcff55b7) Thanks [@Skye-31](https://github.com/Skye-31)! - fix routing for URI encoded static requests -- [#1643](https://github.com/cloudflare/wrangler2/pull/1643) [`4b04a377`](https://github.com/cloudflare/wrangler2/commit/4b04a3772f170bd0e0b9c0de076acfd5e5fdc3d2) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add `--inspector-port` argument to `wrangler pages dev` +- [#1643](https://github.com/cloudflare/workers-sdk/pull/1643) [`4b04a377`](https://github.com/cloudflare/workers-sdk/commit/4b04a3772f170bd0e0b9c0de076acfd5e5fdc3d2) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add `--inspector-port` argument to `wrangler pages dev` -* [#1641](https://github.com/cloudflare/wrangler2/pull/1641) [`5f5466ab`](https://github.com/cloudflare/wrangler2/commit/5f5466abda5929359a3e405a36c39547660cf039) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add support for using external Durable Objects from `wrangler pages dev`. +* [#1641](https://github.com/cloudflare/workers-sdk/pull/1641) [`5f5466ab`](https://github.com/cloudflare/workers-sdk/commit/5f5466abda5929359a3e405a36c39547660cf039) Thanks [@GregBrimble](https://github.com/GregBrimble)! - feat: Add support for using external Durable Objects from `wrangler pages dev`. An external Durable Object can be referenced using `npx wrangler pages dev ./public --do MyDO=MyDurableObject@api` where the Durable Object is made available on `env.MyDO`, and is described in a Workers service (`name = "api"`) with the class name `MyDurableObject`. You must have the `api` Workers service running in as another `wrangler dev` process elsewhere already in order to reference that object. -- [#1605](https://github.com/cloudflare/wrangler2/pull/1605) [`9e632cdd`](https://github.com/cloudflare/wrangler2/commit/9e632cddeace54aa8fbc9695621002889c3daa03) Thanks [@kimyvgy](https://github.com/kimyvgy)! - refactor: add --ip argument for `wrangler pages dev` & defaults IP to `0.0.0.0` +- [#1605](https://github.com/cloudflare/workers-sdk/pull/1605) [`9e632cdd`](https://github.com/cloudflare/workers-sdk/commit/9e632cddeace54aa8fbc9695621002889c3daa03) Thanks [@kimyvgy](https://github.com/kimyvgy)! - refactor: add --ip argument for `wrangler pages dev` & defaults IP to `0.0.0.0` Add new argument `--ip` for the command `wrangler pages dev`, defaults to `0.0.0.0`. The command `wrangler dev` is also defaulting to `0.0.0.0` instead of `localhost`. -* [#1604](https://github.com/cloudflare/wrangler2/pull/1604) [`9732fafa`](https://github.com/cloudflare/wrangler2/commit/9732fafa066d3a18ba6096cfc814a2831f4a7d0e) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Added R2 support for wrangler pages dev. You can add an R2 binding with `--r2 `. +* [#1604](https://github.com/cloudflare/workers-sdk/pull/1604) [`9732fafa`](https://github.com/cloudflare/workers-sdk/commit/9732fafa066d3a18ba6096cfc814a2831f4a7d0e) Thanks [@WalshyDev](https://github.com/WalshyDev)! - Added R2 support for wrangler pages dev. You can add an R2 binding with `--r2 `. -- [#1608](https://github.com/cloudflare/wrangler2/pull/1608) [`9f02758f`](https://github.com/cloudflare/wrangler2/commit/9f02758fcd9c7816120a76f357a179a268f45a35) Thanks [@jrf0110](https://github.com/jrf0110)! - feat: Generate \_routes.generated.json for Functions routing +- [#1608](https://github.com/cloudflare/workers-sdk/pull/1608) [`9f02758f`](https://github.com/cloudflare/workers-sdk/commit/9f02758fcd9c7816120a76f357a179a268f45a35) Thanks [@jrf0110](https://github.com/jrf0110)! - feat: Generate \_routes.generated.json for Functions routing When using Pages Functions, a \_routes.generated.json file is created to inform Pages how to route requests to a project's Functions Worker. -* [#1603](https://github.com/cloudflare/wrangler2/pull/1603) [`7ae059b3`](https://github.com/cloudflare/wrangler2/commit/7ae059b3dcdd9dce5f03110d8ff670022b8ccf02) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: R2 Object Deletequote +* [#1603](https://github.com/cloudflare/workers-sdk/pull/1603) [`7ae059b3`](https://github.com/cloudflare/workers-sdk/commit/7ae059b3dcdd9dce5f03110d8ff670022b8ccf02) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: R2 Object Deletequote Improving the R2 objects management, added the functionality to delete objects in a bucket. resolves #1584 @@ -1460,11 +1457,11 @@ rozenmd@cflaptop test1 % npx wrangler d1 execute test --command="select * from c ### Patch Changes -- [#1577](https://github.com/cloudflare/wrangler2/pull/1577) [`359d0ba3`](https://github.com/cloudflare/wrangler2/commit/359d0ba379c7c94fa29c8e1728a2c0a7491749c6) Thanks [@threepointone](https://github.com/threepointone)! - chore: update esbuild to 0.14.51 +- [#1577](https://github.com/cloudflare/workers-sdk/pull/1577) [`359d0ba3`](https://github.com/cloudflare/workers-sdk/commit/359d0ba379c7c94fa29c8e1728a2c0a7491749c6) Thanks [@threepointone](https://github.com/threepointone)! - chore: update esbuild to 0.14.51 -* [#1558](https://github.com/cloudflare/wrangler2/pull/1558) [`b43a7f98`](https://github.com/cloudflare/wrangler2/commit/b43a7f9836e8f2d969624c2c5a88adf374a1ebe3) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: extract devProps parsing into own function +* [#1558](https://github.com/cloudflare/workers-sdk/pull/1558) [`b43a7f98`](https://github.com/cloudflare/workers-sdk/commit/b43a7f9836e8f2d969624c2c5a88adf374a1ebe3) Thanks [@rozenmd](https://github.com/rozenmd)! - chore: extract devProps parsing into own function -- [#1438](https://github.com/cloudflare/wrangler2/pull/1438) [`0a9fe918`](https://github.com/cloudflare/wrangler2/commit/0a9fe918216264a2f6fa3f69dd596f89de7d9f56) Thanks [@caass](https://github.com/caass)! - Initial implementation of `wrangler generate` +- [#1438](https://github.com/cloudflare/workers-sdk/pull/1438) [`0a9fe918`](https://github.com/cloudflare/workers-sdk/commit/0a9fe918216264a2f6fa3f69dd596f89de7d9f56) Thanks [@caass](https://github.com/caass)! - Initial implementation of `wrangler generate` - `wrangler generate` and `wrangler generate ` delegate to `wrangler init`. - `wrangler generate