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

Version Packages #1025

merged 1 commit into from
May 19, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 16, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Patch Changes

  • #1018 cd2c42f Thanks @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 bug: leading */*/. in routes causes bugs in wrangler dev #1002

  • #1044 7a191a2 Thanks @JacobMGEvans! - fix: trim trailing whitespace from the secrets before uploading

    resolves 🐛 BUG: the value read from stdin should be trimmed #993

  • #1052 233eef2 Thanks @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:

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

Fixes #1026

  • #1045 8eeef9a Thanks @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 95852c3 Thanks @threepointone! - fix: don't fetch migrations when in --dry-run mode

    Fixes bug: wrangler publish --dry-run fetches migrations for durable objects #1038

  • #1033 ffce3e3 Thanks @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 wrangler init throws an error if git is not available  #1022

  • #982 6791703 Thanks @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 5816eba Thanks @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 feat: bind to an external script's durable object by environment #996

  • #1057 608dcd9 Thanks @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

  • #1027 3545e41 Thanks @rozenmd! - feat: trying to use node builtins should recommend you enable node_compat in wrangler.toml

  • #1024 110f340 Thanks @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 kv:bulk only accepts string values #571

  • #1037 963e9e0 Thanks @rozenmd! - fix: don't attempt to login during a --dryRun

[email protected]

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/main branch 16 times, most recently from 13ff2f5 to 91dc583 Compare May 19, 2022 08:32
@github-actions github-actions bot force-pushed the changeset-release/main branch from 91dc583 to 54cd12a Compare May 19, 2022 08:34
@threepointone threepointone merged commit 0d5a03f into main May 19, 2022
@threepointone threepointone deleted the changeset-release/main branch May 19, 2022 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment