From 21af9ad7524ceb3af7fa66488726d7576181c1e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 May 2022 23:59:14 +0100 Subject: [PATCH] Version Packages (#849) Co-authored-by: github-actions[bot] --- .changeset/afraid-oranges-happen.md | 7 -- .changeset/dirty-knives-exercise.md | 7 -- .changeset/dry-walls-buy.md | 11 ---- .changeset/early-timers-camp.md | 7 -- .changeset/fifty-drinks-hear.md | 13 ---- .changeset/hungry-pandas-report.md | 5 -- .changeset/many-numbers-cheer.md | 19 ------ .changeset/mean-owls-own.md | 9 --- .changeset/nasty-teachers-drop.md | 9 --- package-lock.json | 4 +- .../jest-environment-wrangler/CHANGELOG.md | 2 + .../jest-environment-wrangler/package.json | 2 +- packages/wrangler/CHANGELOG.md | 64 +++++++++++++++++++ packages/wrangler/package.json | 2 +- 14 files changed, 70 insertions(+), 91 deletions(-) delete mode 100644 .changeset/afraid-oranges-happen.md delete mode 100644 .changeset/dirty-knives-exercise.md delete mode 100644 .changeset/dry-walls-buy.md delete mode 100644 .changeset/early-timers-camp.md delete mode 100644 .changeset/fifty-drinks-hear.md delete mode 100644 .changeset/hungry-pandas-report.md delete mode 100644 .changeset/many-numbers-cheer.md delete mode 100644 .changeset/mean-owls-own.md delete mode 100644 .changeset/nasty-teachers-drop.md diff --git a/.changeset/afraid-oranges-happen.md b/.changeset/afraid-oranges-happen.md deleted file mode 100644 index 2afde70271df..000000000000 --- a/.changeset/afraid-oranges-happen.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -fix: `site.entry-point` is no longer a hard deprecation - -To make migration of v1 projects easier, Sites projects should still work, including the `entry-point` field (which currently errors out). This enables `site.entry-point` as a valid entry point, with a deprecation warning. diff --git a/.changeset/dirty-knives-exercise.md b/.changeset/dirty-knives-exercise.md deleted file mode 100644 index b8be4ee2eabd..000000000000 --- a/.changeset/dirty-knives-exercise.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -polish: improve consistency of warnings and errors - -Related to #377 diff --git a/.changeset/dry-walls-buy.md b/.changeset/dry-walls-buy.md deleted file mode 100644 index e6bebec0e1ca..000000000000 --- a/.changeset/dry-walls-buy.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"wrangler": patch ---- - -Treat the "name" parameter in `wrangler init` as a path. - -This means that running `wrangler init .` will create a worker in the current directory, -and the worker's name will be the name of the current directory. - -You can also run `wrangler init path/to/my-worker` and a worker will be created at -`[CWD]/path/to/my-worker` with the name `my-worker`, diff --git a/.changeset/early-timers-camp.md b/.changeset/early-timers-camp.md deleted file mode 100644 index cceb7cd027fa..000000000000 --- a/.changeset/early-timers-camp.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -polish: do not log the error object when refreshing a token fails - -We handle the error anyway (by doing a fresh login) which has its own logging and messaging. In the future we should add a DEBUG mode that logs all requests/errors/warnings, but that's for later. diff --git a/.changeset/fifty-drinks-hear.md b/.changeset/fifty-drinks-hear.md deleted file mode 100644 index fc6cc5acdc8a..000000000000 --- a/.changeset/fifty-drinks-hear.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"wrangler": patch ---- - -feat: experimental `--node-compat` / `config.node_compat` - -This adds an experimental node.js compatibility mode. It can be enabled by adding `node_compat = true` in `wrangler.toml`, or by passing `--node-compat` as a command line arg for `dev`/`publish` commands. This is currently powered by `@esbuild-plugins/node-globals-polyfill` (which in itself is powered by `rollup-plugin-node-polyfills`). - -We'd previously added this, and then removed it because the quality of the polyfills isn't great. We're reintroducing it regardless so we can start getting feedback on its usage, and it sets up a foundation for replacing it with our own, hopefully better maintained polyfills. - -Of particular note, this means that what we promised in https://blog.cloudflare.com/announcing-stripe-support-in-workers/ now actually works. - -This patch also addresses some dependency issues, specifically leftover entries in package-lock.json. diff --git a/.changeset/hungry-pandas-report.md b/.changeset/hungry-pandas-report.md deleted file mode 100644 index 867d0d9d2157..000000000000 --- a/.changeset/hungry-pandas-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -feature: Adds 'wrangler pages publish' (alias 'wrangler pages deployment create') command. diff --git a/.changeset/many-numbers-cheer.md b/.changeset/many-numbers-cheer.md deleted file mode 100644 index 37edd5a39477..000000000000 --- a/.changeset/many-numbers-cheer.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"wrangler": patch ---- - -Add a runtime check for `wrangler dev` local mode to avoid erroring in environments with no `AsyncLocalStorage` class - -Certain runtime APIs are only available to workers during the "request context", -which is any code that returns after receiving a request and before returning -a response. - -Miniflare emulates this behavior by using an [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage) and -[checking at runtime](https://github.com/cloudflare/miniflare/blob/master/packages/shared/src/context.ts#L21-L36) -to see if you're using those APIs during the request context. - -In certain environments `AsyncLocalStorage` is unavailable, such as in a -[webcontainer](https://github.com/stackblitz/webcontainer-core). -This function figures out if we're able to run those "request context" checks -and returns [a set of options](https://miniflare.dev/core/standards#global-functionality-limits) -that indicate to miniflare whether to run the checks or not. diff --git a/.changeset/mean-owls-own.md b/.changeset/mean-owls-own.md deleted file mode 100644 index d894d5f8fab2..000000000000 --- a/.changeset/mean-owls-own.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -feat: Add validation to the `name` field in configuration. -The validation will warn users that the field can only be "type string, -alphanumeric, underscores, and lowercase with dashes only" using the same RegEx as the backend - -resolves #795 #775 diff --git a/.changeset/nasty-teachers-drop.md b/.changeset/nasty-teachers-drop.md deleted file mode 100644 index 4613e6cc5e03..000000000000 --- a/.changeset/nasty-teachers-drop.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"wrangler": patch ---- - -feat: implement service environments + durable objects - -Now that the APIs for getting migrations tags of services works as expected, this lands support for publishing durable objects to service environments, including migrations. It also removes the error we used to throw when attempting to use service envs + durable objects. - -Fixes https://github.com/cloudflare/wrangler2/issues/739 diff --git a/package-lock.json b/package-lock.json index 488bcdd14d7c..27532b645b15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20583,7 +20583,7 @@ "license": "ISC" }, "packages/jest-environment-wrangler": { - "version": "0.0.27", + "version": "0.0.28", "license": "ISC", "dependencies": { "jest-environment-miniflare": "2.4.0" @@ -20600,7 +20600,7 @@ } }, "packages/wrangler": { - "version": "0.0.27", + "version": "0.0.28", "license": "MIT OR Apache-2.0", "dependencies": { "@esbuild-plugins/node-globals-polyfill": "^0.1.1", diff --git a/packages/jest-environment-wrangler/CHANGELOG.md b/packages/jest-environment-wrangler/CHANGELOG.md index cc358a18803e..dcc7ba240867 100644 --- a/packages/jest-environment-wrangler/CHANGELOG.md +++ b/packages/jest-environment-wrangler/CHANGELOG.md @@ -1,5 +1,7 @@ # jest-environment-wrangler +## 0.0.28 + ## 0.0.27 ## 0.0.26 diff --git a/packages/jest-environment-wrangler/package.json b/packages/jest-environment-wrangler/package.json index b577f9d1005a..20c3abaf76c4 100644 --- a/packages/jest-environment-wrangler/package.json +++ b/packages/jest-environment-wrangler/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-wrangler", - "version": "0.0.27", + "version": "0.0.28", "description": "A jest environment for Cloudflare Workers, powered by wrangler.", "main": "dist/index.js", "scripts": { diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index f3444d57016f..83395b52865d 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,69 @@ # wrangler +## 0.0.28 + +### Patch Changes + +- [#843](https://github.com/cloudflare/wrangler2/pull/843) [`da12cc5`](https://github.com/cloudflare/wrangler2/commit/da12cc55a571eb30480fb21324002f682137b836) Thanks [@threepointone](https://github.com/threepointone)! - fix: `site.entry-point` is no longer a hard deprecation + + To make migration of v1 projects easier, Sites projects should still work, including the `entry-point` field (which currently errors out). This enables `site.entry-point` as a valid entry point, with a deprecation warning. + +* [#848](https://github.com/cloudflare/wrangler2/pull/848) [`0a79d75`](https://github.com/cloudflare/wrangler2/commit/0a79d75e6aba11a3f0d5a7490f1b75c9f3e80ea8) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - polish: improve consistency of warnings and errors + + Related to #377 + +- [#877](https://github.com/cloudflare/wrangler2/pull/877) [`97f945f`](https://github.com/cloudflare/wrangler2/commit/97f945fd3544eaba3f6bc4df2e5487049ea32817) Thanks [@caass](https://github.com/caass)! - Treat the "name" parameter in `wrangler init` as a path. + + This means that running `wrangler init .` will create a worker in the current directory, + and the worker's name will be the name of the current directory. + + You can also run `wrangler init path/to/my-worker` and a worker will be created at + `[CWD]/path/to/my-worker` with the name `my-worker`, + +* [#851](https://github.com/cloudflare/wrangler2/pull/851) [`277b254`](https://github.com/cloudflare/wrangler2/commit/277b25421175b4efc803cd68ef543cb55b07c114) Thanks [@threepointone](https://github.com/threepointone)! - polish: do not log the error object when refreshing a token fails + + We handle the error anyway (by doing a fresh login) which has its own logging and messaging. In the future we should add a DEBUG mode that logs all requests/errors/warnings, but that's for later. + +- [#869](https://github.com/cloudflare/wrangler2/pull/869) [`f1423bf`](https://github.com/cloudflare/wrangler2/commit/f1423bf6399655d5c186c4849f23bb2196e4fcec) Thanks [@threepointone](https://github.com/threepointone)! - feat: experimental `--node-compat` / `config.node_compat` + + This adds an experimental node.js compatibility mode. It can be enabled by adding `node_compat = true` in `wrangler.toml`, or by passing `--node-compat` as a command line arg for `dev`/`publish` commands. This is currently powered by `@esbuild-plugins/node-globals-polyfill` (which in itself is powered by `rollup-plugin-node-polyfills`). + + We'd previously added this, and then removed it because the quality of the polyfills isn't great. We're reintroducing it regardless so we can start getting feedback on its usage, and it sets up a foundation for replacing it with our own, hopefully better maintained polyfills. + + Of particular note, this means that what we promised in https://blog.cloudflare.com/announcing-stripe-support-in-workers/ now actually works. + + This patch also addresses some dependency issues, specifically leftover entries in package-lock.json. + +* [#790](https://github.com/cloudflare/wrangler2/pull/790) [`331c659`](https://github.com/cloudflare/wrangler2/commit/331c65979295320b37cbf1f995f4acfc28630702) Thanks [@sidharthachatterjee](https://github.com/sidharthachatterjee)! - feature: Adds 'wrangler pages publish' (alias 'wrangler pages deployment create') command. + +- [#866](https://github.com/cloudflare/wrangler2/pull/866) [`8b227fc`](https://github.com/cloudflare/wrangler2/commit/8b227fc97e50abe36651b4a6c029b9ada404dc1f) Thanks [@caass](https://github.com/caass)! - Add a runtime check for `wrangler dev` local mode to avoid erroring in environments with no `AsyncLocalStorage` class + + Certain runtime APIs are only available to workers during the "request context", + which is any code that returns after receiving a request and before returning + a response. + + Miniflare emulates this behavior by using an [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage) and + [checking at runtime](https://github.com/cloudflare/miniflare/blob/master/packages/shared/src/context.ts#L21-L36) + to see if you're using those APIs during the request context. + + In certain environments `AsyncLocalStorage` is unavailable, such as in a + [webcontainer](https://github.com/stackblitz/webcontainer-core). + This function figures out if we're able to run those "request context" checks + and returns [a set of options](https://miniflare.dev/core/standards#global-functionality-limits) + that indicate to miniflare whether to run the checks or not. + +* [#829](https://github.com/cloudflare/wrangler2/pull/829) [`f08aac5`](https://github.com/cloudflare/wrangler2/commit/f08aac5dc1894ceaa84fc8b1a0c3d898dbbbe028) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - feat: Add validation to the `name` field in configuration. + The validation will warn users that the field can only be "type string, + alphanumeric, underscores, and lowercase with dashes only" using the same RegEx as the backend + + resolves #795 #775 + +- [#868](https://github.com/cloudflare/wrangler2/pull/868) [`6ecb1c1`](https://github.com/cloudflare/wrangler2/commit/6ecb1c128bde5c8f8d7403278f07cc0e991c16a0) Thanks [@threepointone](https://github.com/threepointone)! - feat: implement service environments + durable objects + + Now that the APIs for getting migrations tags of services works as expected, this lands support for publishing durable objects to service environments, including migrations. It also removes the error we used to throw when attempting to use service envs + durable objects. + + Fixes https://github.com/cloudflare/wrangler2/issues/739 + ## 0.0.27 ### Patch Changes diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index d46923ced1e1..3251d95f5774 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "0.0.27", + "version": "0.0.28", "author": "wrangler@cloudflare.com", "description": "Command-line interface for all things Cloudflare Workers", "bin": {