From f8a97de78900e1a09524a24032e4bcfb54e93596 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 19:27:21 +0000 Subject: [PATCH] Version Packages (#206) Co-authored-by: github-actions[bot] --- .changeset/angry-schools-walk.md | 7 --- .changeset/brown-hounds-wink.md | 5 -- .changeset/brown-planes-sip.md | 5 -- .changeset/cyan-crews-try.md | 7 --- .changeset/eight-fans-drum.md | 5 -- .changeset/fluffy-insects-clap.md | 5 -- .changeset/fuzzy-ads-rush.md | 5 -- .changeset/grumpy-knives-bathe.md | 5 -- .changeset/loud-dolls-pay.md | 5 -- .changeset/metal-ties-invent.md | 5 -- .changeset/modern-books-leave.md | 17 ------ .changeset/modern-hounds-fold.md | 5 -- .changeset/new-carrots-relax.md | 5 -- .changeset/pretty-starfishes-judge.md | 12 ---- .changeset/purple-planets-join.md | 7 --- .changeset/rare-bikes-shout.md | 7 --- .changeset/slimy-suits-hope.md | 10 ---- .changeset/thick-beans-thank.md | 9 --- .changeset/unlucky-sloths-lay.md | 5 -- .changeset/young-timers-talk.md | 5 -- package-lock.json | 2 +- packages/wrangler/CHANGELOG.md | 80 +++++++++++++++++++++++++++ packages/wrangler/package.json | 2 +- 23 files changed, 82 insertions(+), 138 deletions(-) delete mode 100644 .changeset/angry-schools-walk.md delete mode 100644 .changeset/brown-hounds-wink.md delete mode 100644 .changeset/brown-planes-sip.md delete mode 100644 .changeset/cyan-crews-try.md delete mode 100644 .changeset/eight-fans-drum.md delete mode 100644 .changeset/fluffy-insects-clap.md delete mode 100644 .changeset/fuzzy-ads-rush.md delete mode 100644 .changeset/grumpy-knives-bathe.md delete mode 100644 .changeset/loud-dolls-pay.md delete mode 100644 .changeset/metal-ties-invent.md delete mode 100644 .changeset/modern-books-leave.md delete mode 100644 .changeset/modern-hounds-fold.md delete mode 100644 .changeset/new-carrots-relax.md delete mode 100644 .changeset/pretty-starfishes-judge.md delete mode 100644 .changeset/purple-planets-join.md delete mode 100644 .changeset/rare-bikes-shout.md delete mode 100644 .changeset/slimy-suits-hope.md delete mode 100644 .changeset/thick-beans-thank.md delete mode 100644 .changeset/unlucky-sloths-lay.md delete mode 100644 .changeset/young-timers-talk.md diff --git a/.changeset/angry-schools-walk.md b/.changeset/angry-schools-walk.md deleted file mode 100644 index bc4b833702a2..000000000000 --- a/.changeset/angry-schools-walk.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -refactor: proxy/preview server - -This PR refactors how we setup the proxy server between the developer and the edge preview service during `wrangler dev`. Of note, we start the server immediately. We also buffer requests/streams and hold on to them, when starting/refreshing the token. This means a developer should never see `ERR_CONNECTION_REFUSED` error page, or have an older worker respond after making a change to the code. And when the token does get refreshed, we flush said streams/requests with the newer values, making the iteration process a lot smoother and predictable. diff --git a/.changeset/brown-hounds-wink.md b/.changeset/brown-hounds-wink.md deleted file mode 100644 index 87ba8dba343d..000000000000 --- a/.changeset/brown-hounds-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Added prompt for users to select an account. diff --git a/.changeset/brown-planes-sip.md b/.changeset/brown-planes-sip.md deleted file mode 100644 index 37e88cc93d36..000000000000 --- a/.changeset/brown-planes-sip.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Fix the `--watch` command for `wrangler pages functions build`. diff --git a/.changeset/cyan-crews-try.md b/.changeset/cyan-crews-try.md deleted file mode 100644 index cfe4157c74b5..000000000000 --- a/.changeset/cyan-crews-try.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Remove explicit `any` types from the codebase - -This change removes all use of `any` from the code and updates the `no-explicit-any` eslint rule to be an error. diff --git a/.changeset/eight-fans-drum.md b/.changeset/eight-fans-drum.md deleted file mode 100644 index 1d273cbd469e..000000000000 --- a/.changeset/eight-fans-drum.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Add ability to compile a directory other than `functions` for `wrangler pages functions build`. diff --git a/.changeset/fluffy-insects-clap.md b/.changeset/fluffy-insects-clap.md deleted file mode 100644 index 0d46600b4872..000000000000 --- a/.changeset/fluffy-insects-clap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Ignore non-JS files when compiling Pages Functions diff --git a/.changeset/fuzzy-ads-rush.md b/.changeset/fuzzy-ads-rush.md deleted file mode 100644 index d2042bb022e0..000000000000 --- a/.changeset/fuzzy-ads-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Reverse execution order of Pages Functions middlewares diff --git a/.changeset/grumpy-knives-bathe.md b/.changeset/grumpy-knives-bathe.md deleted file mode 100644 index d305b1d0078d..000000000000 --- a/.changeset/grumpy-knives-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Upgrade `miniflare` to `2.0.0` diff --git a/.changeset/loud-dolls-pay.md b/.changeset/loud-dolls-pay.md deleted file mode 100644 index de5a29cc448c..000000000000 --- a/.changeset/loud-dolls-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -allow specifying only "index" without extension or nothing at all for "wrangler dev" and "wrangler publish" diff --git a/.changeset/metal-ties-invent.md b/.changeset/metal-ties-invent.md deleted file mode 100644 index c1391653ad91..000000000000 --- a/.changeset/metal-ties-invent.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Silently fail to auto-open the browser in `wrangler pages dev` command when that errors out. diff --git a/.changeset/modern-books-leave.md b/.changeset/modern-books-leave.md deleted file mode 100644 index af7a99c9e31a..000000000000 --- a/.changeset/modern-books-leave.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"wrangler": patch ---- - -Refactor raw value extraction from Cloudflare APIs - -Most API responses are JSON of the form: - -``` -{ result, success, errors, messages, result_info } -``` - -where the `result` contains the actual response value. - -But some API responses only contain the result value. - -This change refactors the client-side fetch API to allow callers to specify what kind of response they expect. diff --git a/.changeset/modern-hounds-fold.md b/.changeset/modern-hounds-fold.md deleted file mode 100644 index 1fce8ee29872..000000000000 --- a/.changeset/modern-hounds-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Disable @typescript-lint/no-explicit-any eslint rule in pages code diff --git a/.changeset/new-carrots-relax.md b/.changeset/new-carrots-relax.md deleted file mode 100644 index 44285afa077a..000000000000 --- a/.changeset/new-carrots-relax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -rename `--public` as `--experimental-public` diff --git a/.changeset/pretty-starfishes-judge.md b/.changeset/pretty-starfishes-judge.md deleted file mode 100644 index 7cc03cd3daee..000000000000 --- a/.changeset/pretty-starfishes-judge.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"wrangler": patch ---- - -Add `--compatibility-date`, `--compatibility-flags`, `--latest` cli arguments to `dev` and `publish`. - -- A cli arg for adding a compatibility data, e.g `--compatibility_date 2022-01-05` -- A shorthand `--latest` that sets `compatibility_date` to today's date. Usage of this flag logs a warning. -- `latest` is NOT a config field in `wrangler.toml`. -- In `dev`, when a compatibility date is not available in either `wrangler.toml` or as a cli arg, then we default to `--latest`. -- In `publish` we error if a compatibility date is not available in either `wrangler.toml` or as a cli arg. Usage of `--latest` logs a warning. -- We also accept compatibility flags via the cli, e.g: `--compatibility-flags formdata_parser_supports_files` diff --git a/.changeset/purple-planets-join.md b/.changeset/purple-planets-join.md deleted file mode 100644 index b80c58fda45e..000000000000 --- a/.changeset/purple-planets-join.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Expose `wrangler pages functions build` command, which takes the `functions` folder and compiles it into a single Worker. - -This was already done in `wrangler pages dev`, so this change just exposes this build command for use in our build image, or for people who want to do it themselves. diff --git a/.changeset/rare-bikes-shout.md b/.changeset/rare-bikes-shout.md deleted file mode 100644 index 84e02035b859..000000000000 --- a/.changeset/rare-bikes-shout.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Adds support for building a Worker from a folder of functions which isn't tied to the Pages platform. - -This lets developers use the same file-based routing system an simplified syntax when developing their own Workers! diff --git a/.changeset/slimy-suits-hope.md b/.changeset/slimy-suits-hope.md deleted file mode 100644 index 5d94143fc098..000000000000 --- a/.changeset/slimy-suits-hope.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"wrangler": patch ---- - -Refactor inspection/debugging code - - -- I've installed devtools-protocol, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. -- We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. -- Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. -- We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) diff --git a/.changeset/thick-beans-thank.md b/.changeset/thick-beans-thank.md deleted file mode 100644 index f20def44ed0f..000000000000 --- a/.changeset/thick-beans-thank.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -Fix pagination handling of list requests to the Cloudflare API - -When doing a list request to the API, the server may respond with only a single page of results. -In this case, it will also provide a `cursor` value in the `result_info` part of the response, which can be used to request the next page. -This change implements this on the client-side so that we get all the results by requesting further pages when there is a cursor. diff --git a/.changeset/unlucky-sloths-lay.md b/.changeset/unlucky-sloths-lay.md deleted file mode 100644 index b1720bbf5f10..000000000000 --- a/.changeset/unlucky-sloths-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Add `--live-reload` option to `wrangler pages dev` which automatically reloads HTML pages when a change is detected diff --git a/.changeset/young-timers-talk.md b/.changeset/young-timers-talk.md deleted file mode 100644 index d05a8b57370c..000000000000 --- a/.changeset/young-timers-talk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Add `--output-config-path` option to `wrangler pages functions build` which writes a config file describing the `functions` folder. diff --git a/package-lock.json b/package-lock.json index 8d46af42d287..e914378c2f63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15142,7 +15142,7 @@ "license": "ISC" }, "packages/wrangler": { - "version": "0.0.7", + "version": "0.0.8", "license": "MIT OR Apache-2.0", "dependencies": { "esbuild": "0.14.1", diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index 5e5771164a95..55e776e0b4c3 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,85 @@ # wrangler +## 0.0.8 + +### Patch Changes + +- [#231](https://github.com/cloudflare/wrangler2/pull/231) [`18f8f65`](https://github.com/cloudflare/wrangler2/commit/18f8f65424adb8505c7584ae01b1823bb648eb6e) Thanks [@threepointone](https://github.com/threepointone)! - refactor: proxy/preview server + + This PR refactors how we setup the proxy server between the developer and the edge preview service during `wrangler dev`. Of note, we start the server immediately. We also buffer requests/streams and hold on to them, when starting/refreshing the token. This means a developer should never see `ERR_CONNECTION_REFUSED` error page, or have an older worker respond after making a change to the code. And when the token does get refreshed, we flush said streams/requests with the newer values, making the iteration process a lot smoother and predictable. + +* [#239](https://github.com/cloudflare/wrangler2/pull/239) [`0431093`](https://github.com/cloudflare/wrangler2/commit/04310932118921d4566ccf6c803b9980dc986089) Thanks [@Warfields](https://github.com/Warfields)! - Added prompt for users to select an account. + +- [#225](https://github.com/cloudflare/wrangler2/pull/225) [`b901bf7`](https://github.com/cloudflare/wrangler2/commit/b901bf76dee2220fb0349fca8d9250ea8e09fdb4) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Fix the `--watch` command for `wrangler pages functions build`. + +* [#208](https://github.com/cloudflare/wrangler2/pull/208) [`fe4b099`](https://github.com/cloudflare/wrangler2/commit/fe4b0996eb446a94896fac4c7a4210ea5db52f11) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Remove explicit `any` types from the codebase + + This change removes all use of `any` from the code and updates the `no-explicit-any` eslint rule to be an error. + +- [#223](https://github.com/cloudflare/wrangler2/pull/223) [`a979d55`](https://github.com/cloudflare/wrangler2/commit/a979d55feac1bdd340ec2b56710691837399183d) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Add ability to compile a directory other than `functions` for `wrangler pages functions build`. + +* [#216](https://github.com/cloudflare/wrangler2/pull/216) [`e1c615f`](https://github.com/cloudflare/wrangler2/commit/e1c615f4e04c8d9d2dfa31fc0c5278d97c5dd663) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Ignore non-JS files when compiling Pages Functions + +- [#217](https://github.com/cloudflare/wrangler2/pull/217) [`777f4d5`](https://github.com/cloudflare/wrangler2/commit/777f4d581a252f4b7f760816a00c3e8ae7b5a463) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Reverse execution order of Pages Functions middlewares + +* [#221](https://github.com/cloudflare/wrangler2/pull/221) [`8ff5537`](https://github.com/cloudflare/wrangler2/commit/8ff55376ffb8f9db24d56fef6ee2c6bd5cc0527d) Thanks [@mrbbot](https://github.com/mrbbot)! - Upgrade `miniflare` to `2.0.0` + +- [#196](https://github.com/cloudflare/wrangler2/pull/196) [`fc112d7`](https://github.com/cloudflare/wrangler2/commit/fc112d74fe212f32e585865df96999a894062801) Thanks [@jgentes](https://github.com/jgentes)! - allow specifying only "index" without extension or nothing at all for "wrangler dev" and "wrangler publish" + +* [#211](https://github.com/cloudflare/wrangler2/pull/211) [`3bbfd4f`](https://github.com/cloudflare/wrangler2/commit/3bbfd4f7c207eb7dc903b843a53589d2fc3dea87) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Silently fail to auto-open the browser in `wrangler pages dev` command when that errors out. + +- [#189](https://github.com/cloudflare/wrangler2/pull/189) [`2f7e1b2`](https://github.com/cloudflare/wrangler2/commit/2f7e1b21d229ea942bb0ee7dd46de3446576c604) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Refactor raw value extraction from Cloudflare APIs + + Most API responses are JSON of the form: + + ``` + { result, success, errors, messages, result_info } + ``` + + where the `result` contains the actual response value. + + But some API responses only contain the result value. + + This change refactors the client-side fetch API to allow callers to specify what kind of response they expect. + +* [#202](https://github.com/cloudflare/wrangler2/pull/202) [`e26781f`](https://github.com/cloudflare/wrangler2/commit/e26781f9089b02425af56b8a7fe5c6770a457ffe) Thanks [@threepointone](https://github.com/threepointone)! - Disable @typescript-lint/no-explicit-any eslint rule in pages code + +- [#214](https://github.com/cloudflare/wrangler2/pull/214) [`79d0f2d`](https://github.com/cloudflare/wrangler2/commit/79d0f2dc8ab416c15c5b1e73b6c6888ade8c848a) Thanks [@threepointone](https://github.com/threepointone)! - rename `--public` as `--experimental-public` + +* [#215](https://github.com/cloudflare/wrangler2/pull/215) [`41d4c3e`](https://github.com/cloudflare/wrangler2/commit/41d4c3e0ae24f3edbe1ee510ec817f6aca528e6e) Thanks [@threepointone](https://github.com/threepointone)! - Add `--compatibility-date`, `--compatibility-flags`, `--latest` cli arguments to `dev` and `publish`. + + - A cli arg for adding a compatibility data, e.g `--compatibility_date 2022-01-05` + - A shorthand `--latest` that sets `compatibility_date` to today's date. Usage of this flag logs a warning. + - `latest` is NOT a config field in `wrangler.toml`. + - In `dev`, when a compatibility date is not available in either `wrangler.toml` or as a cli arg, then we default to `--latest`. + - In `publish` we error if a compatibility date is not available in either `wrangler.toml` or as a cli arg. Usage of `--latest` logs a warning. + - We also accept compatibility flags via the cli, e.g: `--compatibility-flags formdata_parser_supports_files` + +- [#210](https://github.com/cloudflare/wrangler2/pull/210) [`d381fed`](https://github.com/cloudflare/wrangler2/commit/d381fed8ff6c5450d0b2ed5a636e99bb874a5a3a) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Expose `wrangler pages functions build` command, which takes the `functions` folder and compiles it into a single Worker. + + This was already done in `wrangler pages dev`, so this change just exposes this build command for use in our build image, or for people who want to do it themselves. + +* [#213](https://github.com/cloudflare/wrangler2/pull/213) [`5e1222a`](https://github.com/cloudflare/wrangler2/commit/5e1222a827792fbd4a7a48c73eedde5ffa476cf5) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Adds support for building a Worker from a folder of functions which isn't tied to the Pages platform. + + This lets developers use the same file-based routing system an simplified syntax when developing their own Workers! + +- [#199](https://github.com/cloudflare/wrangler2/pull/199) [`d9ecb70`](https://github.com/cloudflare/wrangler2/commit/d9ecb7070ac692550497c8dfb3627e7badae4438) Thanks [@threepointone](https://github.com/threepointone)! - Refactor inspection/debugging code - + + - I've installed devtools-protocol, a convenient package that has the static types for the devtools protocol (duh) autogenerated from chrome's devtools codebase. + - We now log messages and exceptions into the terminal directly, so you don't have to open devtools to see those messages. + - Messages are now buffered until a devtools instance connects, so you won't lose any messages while devtools isn't connected. + - We don't lose the connection on making changes to the worker, removing the need for the kludgy hack on the devtools side (where we refresh the whole page when there's a change) + +* [#189](https://github.com/cloudflare/wrangler2/pull/189) [`2f7e1b2`](https://github.com/cloudflare/wrangler2/commit/2f7e1b21d229ea942bb0ee7dd46de3446576c604) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Fix pagination handling of list requests to the Cloudflare API + + When doing a list request to the API, the server may respond with only a single page of results. + In this case, it will also provide a `cursor` value in the `result_info` part of the response, which can be used to request the next page. + This change implements this on the client-side so that we get all the results by requesting further pages when there is a cursor. + +- [#220](https://github.com/cloudflare/wrangler2/pull/220) [`6fc2276`](https://github.com/cloudflare/wrangler2/commit/6fc2276e9515da22fe05f267dc9cfef22b2f2793) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Add `--live-reload` option to `wrangler pages dev` which automatically reloads HTML pages when a change is detected + +* [#223](https://github.com/cloudflare/wrangler2/pull/223) [`a979d55`](https://github.com/cloudflare/wrangler2/commit/a979d55feac1bdd340ec2b56710691837399183d) Thanks [@GregBrimble](https://github.com/GregBrimble)! - Add `--output-config-path` option to `wrangler pages functions build` which writes a config file describing the `functions` folder. + ## 0.0.7 ### Patch Changes diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index 927e07d5e0ee..50f70edaecd6 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "0.0.7", + "version": "0.0.8", "author": "wrangler@cloudflare.com", "description": "Command-line interface for all things Cloudflare Workers", "bin": {