Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #1025

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .changeset/forty-mice-travel.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/grumpy-dolphins-explain.md

This file was deleted.

39 changes: 0 additions & 39 deletions .changeset/heavy-rabbits-accept.md

This file was deleted.

26 changes: 0 additions & 26 deletions .changeset/hot-insects-cry.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/large-pets-cheer.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/lazy-sheep-rest.md

This file was deleted.

29 changes: 0 additions & 29 deletions .changeset/metal-bees-shop.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/polite-buses-prove.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/shy-eels-march.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/sweet-worms-fail.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/tame-tigers-impress.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tricky-actors-pretend.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/violet-poems-wait.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wild-seas-breathe.md

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

142 changes: 142 additions & 0 deletions packages/wrangler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,147 @@
# wrangler

## 2.0.6

### Patch Changes

- [#1018](https://github.com/cloudflare/wrangler2/pull/1018) [`cd2c42f`](https://github.com/cloudflare/wrangler2/commit/cd2c42fca02bff463d78398428dcf079a80e2ae6) Thanks [@threepointone](https://github.com/threepointone)! - fix: strip leading `*`/`*.` from routes when deducing a host for `dev`

When given routes, we use the host name from the route to deduce a zone id to pass along with the host to set with dev `session`. Route patterns can include leading `*`/`*.`, which we don't account for when deducing said zone id, resulting in subtle errors for the session. This fix strips those leading characters as appropriate.

Fixes https://github.com/cloudflare/wrangler2/issues/1002

* [#1044](https://github.com/cloudflare/wrangler2/pull/1044) [`7a191a2`](https://github.com/cloudflare/wrangler2/commit/7a191a2fd0cb08f2a80c29703a307286264ef74f) Thanks [@JacobMGEvans](https://github.com/JacobMGEvans)! - fix: trim trailing whitespace from the secrets before uploading

resolves #993

- [#1052](https://github.com/cloudflare/wrangler2/pull/1052) [`233eef2`](https://github.com/cloudflare/wrangler2/commit/233eef2081d093b08ec02e68445c5e9c26ebe58c) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: display the correct help information when a subcommand is invalid

Previously, when an invalid subcommand was used, such as `wrangler r2 foo`,
the help that was displayed showed the top-level commands prefixed by the command in used.
E.g.

```
wrangler r2 init [name] 📥 Create a wrangler.toml configuration file
wrangler r2 dev [script] 👂 Start a local server for developing your worker
wrangler r2 publish [script] 🆙 Publish your Worker to Cloudflare.
...
```

Now the correct command help is displayed:

```
$ wrangler r2 foo

✘ [ERROR] Unknown argument: foo


wrangler r2

📦 Interact with an R2 store

Commands:
wrangler r2 bucket Manage R2 buckets

Flags:
-c, --config Path to .toml configuration file [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
```

Fixes #871

* [#906](https://github.com/cloudflare/wrangler2/pull/906) [`3279f10`](https://github.com/cloudflare/wrangler2/commit/3279f103fb3b1c27addb4c69c30ad970ab0d5f77) Thanks [@threepointone](https://github.com/threepointone)! - feat: implement support for service bindings

This adds experimental support for service bindings, aka worker-to-worker bindings. It's lets you "call" a worker from another worker, without incurring any network cost, and (ideally) with much less latency. To use it, define a `[services]` field in `wrangler.toml`, which is a map of bindings to worker names (and environment). Let's say you already have a worker named "my-worker" deployed. In another worker's configuration, you can create a service binding to it like so:

```toml
[[services]]
binding = "MYWORKER"
service = "my-worker"
environment = "production" # optional, defaults to the worker's `default_environment` for now
```

And in your worker, you can call it like so:

```js
export default {
fetch(req, env, ctx) {
return env.MYWORKER.fetch(new Request("http://domain/some-path"));
}
};
```

Fixes https://github.com/cloudflare/wrangler2/issues/1026

- [#1045](https://github.com/cloudflare/wrangler2/pull/1045) [`8eeef9a`](https://github.com/cloudflare/wrangler2/commit/8eeef9ace652ffad3be0116f6f58c71dc251e49c) Thanks [@jrf0110](https://github.com/jrf0110)! - fix: Incorrect extension extraction from file paths.

Our extension extraction logic was taking into account folder names, which can include periods. The logic would incorrectly identify a file path of .well-known/foo as having the extension of well-known/foo when in reality it should be an empty string.

* [#1039](https://github.com/cloudflare/wrangler2/pull/1039) [`95852c3`](https://github.com/cloudflare/wrangler2/commit/95852c304716e8b9b97ef2a5486c8337cc278f1d) Thanks [@threepointone](https://github.com/threepointone)! - fix: don't fetch migrations when in `--dry-run` mode

Fixes https://github.com/cloudflare/wrangler2/issues/1038

- [#1033](https://github.com/cloudflare/wrangler2/pull/1033) [`ffce3e3`](https://github.com/cloudflare/wrangler2/commit/ffce3e3fa1bf04a1597d4fd1c6ef5ed536b81308) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: `wrangler init` should not crash if Git is not available on Windows

We check for the presence of Git by trying to run `git --version`.
On non-Windows we get an Error with `code` set to "ENOENT".
One Windows we get a different error:

```
{
"shortMessage":"Command failed with exit code 1: git --version",
"command":"git --version",
"escapedCommand":"git --version",
"exitCode":1,
"stdout":"",
"stderr":"'git' is not recognized as an internal or external command,\r\noperable program or batch file.",
"failed":true,
"timedOut":false,
"isCanceled":false,
"killed":false
}
```

Since we don't really care what the error is, now we just assume that Git
is not available if an error is thrown.

Fixes #1022

* [#982](https://github.com/cloudflare/wrangler2/pull/982) [`6791703`](https://github.com/cloudflare/wrangler2/commit/6791703abc6f9e61a7f954db48d53c6994c80e03) Thanks [@matthewdavidrodgers](https://github.com/matthewdavidrodgers)! - feature: add support for publishing to Custom Domains

With the release of Custom Domains for workers, users can publish directly to a custom domain on a route, rather than creating a dummy DNS record first and manually pointing the worker over - this adds the same support to wrangler.

Users declare routes as normal, but to indicate that a route should be treated as a custom domain, a user simply uses the object format in the toml file, but with a new key: custom_domain (i.e. `routes = [{ pattern = "api.example.com", custom_domain = true }]`)

When wrangler sees a route like this, it peels them off from the rest of the routes and publishes them separately, using the /domains api. This api is very defensive, erroring eagerly if there are conflicts in existing Custom Domains or managed DNS records. In the case of conflicts, wrangler prompts for confirmation, and then retries with parameters to indicate overriding is allowed.

- [#1019](https://github.com/cloudflare/wrangler2/pull/1019) [`5816eba`](https://github.com/cloudflare/wrangler2/commit/5816ebae462a5ec9252b9df1b46ace3204bc81e8) Thanks [@threepointone](https://github.com/threepointone)! - feat: bind a durable object by environment

For durable objects, instead of just `{ name, class_name, script_name}`, this lets you bind by environment as well, like so `{ name, class_name, script_name, environment }`.

Fixes https://github.com/cloudflare/wrangler2/issues/996

* [#1057](https://github.com/cloudflare/wrangler2/pull/1057) [`608dcd9`](https://github.com/cloudflare/wrangler2/commit/608dcd940ba2096d975dbbbedb63c34943617d4a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: pages "command" can consist of multiple words

On Windows, the following command `wrangler pages dev -- foo bar` would error
saying that `bar` was not a known argument. This is because `foo` and `bar` are
passed to Yargs as separate arguments.

A workaround is to put the command in quotes: `wrangler pages dev -- "foo bar"`.
But this fix makes the `command` argument variadic, which also solves the problem.

Fixes [#965](https://github.com/cloudflare/wrangler2/issues/965)

- [#1027](https://github.com/cloudflare/wrangler2/pull/1027) [`3545e41`](https://github.com/cloudflare/wrangler2/commit/3545e419a70f4f0d5dd305972bf63acf11f91d5c) Thanks [@rozenmd](https://github.com/rozenmd)! - feat: trying to use node builtins should recommend you enable node_compat in wrangler.toml

* [#1024](https://github.com/cloudflare/wrangler2/pull/1024) [`110f340`](https://github.com/cloudflare/wrangler2/commit/110f340061918026938cda2aba158276386fe6e9) Thanks [@threepointone](https://github.com/threepointone)! - polish: validate payload for `kv:bulk put` on client side

This adds client side validation for the paylod for `kv:bulk put`, importantly ensuring we're uploading only string key/value pairs (as well as validation for the other fields).

Fixes https://github.com/cloudflare/wrangler2/issues/571

- [#1037](https://github.com/cloudflare/wrangler2/pull/1037) [`963e9e0`](https://github.com/cloudflare/wrangler2/commit/963e9e08e52f7871923bded3fd5c2cb2ec452532) Thanks [@rozenmd](https://github.com/rozenmd)! - fix: don't attempt to login during a --dryRun

## 2.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wrangler",
"version": "2.0.5",
"version": "2.0.6",
"author": "[email protected]",
"description": "Command-line interface for all things Cloudflare Workers",
"bin": {
Expand Down
6 changes: 6 additions & 0 deletions packages/wranglerjs-compat-webpack-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# wranglerjs-compat-webpack-plugin

## 0.0.2

### Patch Changes

- [#1034](https://github.com/cloudflare/wrangler2/pull/1034) [`53033f3`](https://github.com/cloudflare/wrangler2/commit/53033f3091e2d8fc675a0b078b36b3aa37673cba) Thanks [@threepointone](https://github.com/threepointone)! - Bumping wranglerjs-compat-webpack-plugin to do a release

## 0.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/wranglerjs-compat-webpack-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wranglerjs-compat-webpack-plugin",
"version": "0.0.1",
"version": "0.0.2",
"description": "A webpack plugin to emulate the behavior of wrangler1's `type = webpack`",
"author": "[email protected]",
"license": "MIT OR Apache-2.0",
Expand Down