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 #562

Merged
merged 1 commit into from
Mar 21, 2022
Merged

Version Packages #562

merged 1 commit into from
Mar 21, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 9, 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

wrangler@0.0.20

Patch Changes

  • #627 ff53f4e Thanks @petebacondarwin! - fix: do not warn about miniflare in the configuration

  • #649 e0b9366 Thanks @threepointone! - fix: use expiration_ttl to expire assets with [site]

    This switches how we expire static assets with [site] uploads to use expiration_ttl instead of expiration. This is because we can't trust the time that a deploy target may provide (like in Expiration changes hanging deploys wrangler-legacy#2224).

  • #599 7d4ea43 Thanks @caass! - Force-open a chromium-based browser for devtools

    We rely on Chromium-based devtools for debugging workers, so when opening up the devtools URL,
    we should force a chromium-based browser to launch. For now, this means checking (in order)
    for Chrome and Edge, and then failing if neither of those are available.

  • #567 05b81c5 Thanks @threepointone! - fix: consolidate getEntry() logic

    This consolidates some logic into getEntry(), namely including guessWorkerFormat() and custom builds. This simplifies the code for both dev and publish.

    • Previously, the implementation of custom builds inside dev assumed it could be a long running process; however it's not (else consider that publish would never work).
    • By running custom builds inside getEntry(), we can be certain that the entry point exists as we validate it and before we enter dev/publish, simplifying their internals
    • We don't have to do periodic checks inside wrangler dev because it's now a one shot build (and always should have been)
    • This expands test coverage a little for both dev and publish.
    • The 'format' of a worker is intrinsic to its contents, so it makes sense to establish its value inside getEntry()
    • This also means less async logic inside <Dev/>, which is always a good thing
  • #628 b640ab5 Thanks @caass! - Validate that if route exists in wrangler.toml, routes does not (and vice versa)

  • #591 42c2c0f Thanks @petebacondarwin! - fix: add warning about setting upstream-protocol to http

    We have not implemented setting upstream-protocol to http and currently do not intend to.

    This change just adds a warning if a developer tries to do so and provides a link to an issue where they can add their use-case.

  • #596 187264d Thanks @threepointone! - feat: support wrangler 1.x module specifiers with a deprecation warning

    This implements wrangler 1.x style module specifiers, but also logs a deprecation warning for every usage.

    Consider a project like so:

      project
      ├── index.js
      └── some-dependency.js
    

    where the content of index.js is:

    import SomeDependency from "some-dependency.js";
    addEventListener("fetch", event => {
      // ...
    });

    wrangler 1.x would resolve import SomeDependency from "some-dependency.js"; to the file some-dependency.js. This will work in wrangler v2, but it will log a deprecation warning. Instead, you should rewrite the import to specify that it's a relative path, like so:

    - import SomeDependency from "some-dependency.js";
    + import SomeDependency from "./some-dependency.js";

    In a near future version, this will become a breaking deprecation and throw an error.

    (This also updates workers-chat-demo to use the older style specifier, since that's how it currently is at https://github.com/cloudflare/workers-chat-demo)

    Known issue: This might not work as expected with .js/.cjs/.mjs files as expected, but that's something to be fixed overall with the module system.

    Closes support/deprecate wrangler1 style module specifiers  #586

  • #579 2f0e59b Thanks @JacobMGEvans! - feat: Incomplete subcommands render a help message for that specific subcommand.

  • #559 16fb5e6 Thanks @petebacondarwin! - feat: support adding secrets in non-interactive mode

    Now the user can pipe in the secret value to the wrangler secret put command.
    For example:

    cat my-secret.txt | wrangler secret put secret-key --name worker-name
    

    This requires that the user is logged in, and has only one account, or that the account_id has been set in wrangler.toml.

    Fixes Trying to configure secret yield an "Raw mode not supported" from vadimdemdes/ink package #170

  • #597 94c2698 Thanks @caass! - Deprecate wrangler route, wrangler route list, and wrangler route delete

    Users should instead modify their wrangler.toml or use the --routes flag when publishing
    to manage routes.

  • #564 ffd5c0d Thanks @GregBrimble! - Request Pages OAuth scopes when logging in

  • #638 06f9278 Thanks @threepointone! - polish: add a small banner for commands

    This adds a small banner for most commands. Specifically, we avoid any commands that maybe used as a parse input (like json into jq). The banner itself simply says "⛅️ wrangler" with an orange underline.

  • #561 6e9a219 Thanks @threepointone! - fix: resolve modules correctly in wrangler dev --local

    This is an alternate fix to generate "real" paths for identifiers when linking modules. miniflare#205, and fixes the error where miniflare would get confused resolving relative modules on macs because of /var//private/var being symlinks. Instead, we realpathSync the bundle path before passing it on to miniflare, and that appears to fix the problem.

    Test plan:

    cd packages/wrangler
    npm run build
    cd ../workers-chat-demo
    npx wrangler dev --local
    

    Fixes fix: import wasm module from a higher directory fails in wrangler dev --local for a module format worker #443

  • #592 56886cf Thanks @caass! - Stop reporting breadcrumbs to sentry

    Sentry's SDK automatically tracks "breadcrumbs", which are pieces of information
    that get tracked leading up to an exception. This can be useful for debugging
    errors because it gives better insight into what happens before an error occurs,
    so you can more easily understand and recreate exactly what happened before an
    error occurred.

    Unfortunately, Sentry automatically includes all console statements. And since
    we use the console a lot (e.g. logging every request received in wrangler dev),
    this is mostly useless. Additionally, since developers frequently use the console
    to debug their workers we end up with a bunch of data that is not only irrelevant
    to the reported error, but also contains data that could be potentially sensitive.

    For now, we're turning off breadcrumbs entirely. Later, we might wish to add our
    own breadcrumbs manually (e.g. add a "wrangler dev" breadcrumb when a user runs
    wrangler dev), at which point we can selectively enable breadcrumbs to catch
    only the ones we've put in there ourselves.

  • #645 61aea30 Thanks @petebacondarwin! - fix: improve authentication logging and warnings

    • If a user has previously logged in via Wrangler 1 with an API token, we now display a helpful warning.
    • When logging in and out, we no longer display the path to the internal user auh config file.
    • When logging in, we now display an initial message to indicate the authentication flow is starting.

    Fixes #526

  • #608 a7fa544 Thanks @sidharthachatterjee! - fix: Ensure generateConfigFromFileTree generates config correctly for multiple splats

    Functions with multiple parameters, like /near/[latitude]/[longitude].ts wouldn't work. This
    fixes that.

  • #580 8013e0a Thanks @petebacondarwin! - feat: add support for --local-protocol=https to wrangler dev

    This change adds full support for the setting the protocol that the localhost proxy server listens to.
    Previously, it was only possible to use HTTP. But now you can set it to HTTPS as well.

    To support HTTPS, Wrangler needs an SSL certificate.
    Wrangler now generates a self-signed certificate, as needed, and caches it in the ~/.wrangler/local-cert directory.
    These certificates expire after 30 days and are regenerated by Wrangler as needed.

    Note that if you use HTTPS then your browser will complain about the self-signed and you must tell it to accept the certificate before it will let you access the page.

  • #639 5161e1e Thanks @petebacondarwin! - refactor: initialize the user auth state synchronously

    We can now initialize the user state synchronously, which means that
    we can remove the checks for whether it has been done or not in each
    of the user auth functions.

  • #580 aaac8dd Thanks @petebacondarwin! - fix: validate that local_protocol and upstream_protocol can only take "http" or "https"

  • #568 b6f2266 Thanks @caass! - Show an actionable error message when publishing to a workers.dev subdomain that hasn't been created yet.

    When publishing a worker to workers.dev, you need to first have registered your workers.dev subdomain
    (e.g. my-subdomain.workers.dev). We now check to ensure that the user has created their subdomain before
    uploading a worker to workers.dev, and if they haven't, we provide a link to where they can go through
    the workers onboarding flow and create one.

  • #641 21ee93e Thanks @petebacondarwin! - fix: error if a non-legacy service environment tries to define a worker name

    Given that service environments all live off the same worker, it doesn't make sense
    for them to have different names.

    This change adds validation to tell the developer to remove such name fields in
    service environment config.

    Fixes fix: name shouldn't be defined in environments if legacy_env = false #623

  • #646 c75cfb8 Thanks @threepointone! - fix: default watch_dir to src of project directory

    Via wrangler 1, when using custom builds in wrangler dev, watch_dir should default to src of the "project directory" (i.e - wherever the wrangler.toml is defined if it exists, else in the cwd.

    Fixes 🐛 BUG: wrangler dev does not watch for source changes when using a custom build command #631

  • #621 e452a04 Thanks @petebacondarwin! - fix: stop checking for open port once it has timed out in waitForPortToBeAvailable()

    Previously, if waitForPortToBeAvailable() timed out, the checkPort()
    function would continue to be called.
    Now we clean up fully once the promise is resolved or rejected.

  • #600 1bbd834 Thanks @skirsten! - fix: use environment specific and inherited config values in publish

  • #577 7faf0eb Thanks @threepointone! - fix: config.site.entry-point as a breaking deprecation

    This makes configuring site.entry-point in config as a breaking deprecation, and throws an error. We do this because existing apps with site.entry-point won't work in v2.

  • #578 c56847c Thanks @threepointone! - fix: gracefully fail if we can't create ~/.wrangler/reporting.toml

    In some scenarios (CI/CD, docker, etc), we won't have write access to ~/.wrangler. We already don't write a configuration file there if one passes a CF_API_TOKEN/CLOUDFLARE_API_TOKEN env var. This also adds a guard when writing the error reporting configuration file.

  • #621 e452a04 Thanks @petebacondarwin! - fix: check for the correct inspector port in local dev

    Previously, the useLocalWorker() hook was being passed the wrong port for the inspectorPort prop.

    Once this was fixed, it became apparent that we were waiting for the port to become free in the wrong place, since this port is already being listened to in useInspector() by the time we were starting the check.

    Now, the check to see if the inspector port is free is done in useInspector(),
    which also means that Remote benefits from this check too.

  • #587 49869a3 Thanks @threepointone! - feat: expire unused assets in [site] uploads

    This expires any previously uploaded assets when using a Sites / [site] configuration. Because we currently do a full iteration of a namespace's keys when publishing, for rapidly changing sites this means that uploads get slower and slower. We can't just delete unused assets because it leads to occasional 404s on older publishes while we're publishing. So we expire previous assets while uploading new ones. The implementation/constraints of the kv api means that uploads may become slower, but should hopefully be faster overall. These optimisations also only matter for rapidly changing sites, so common usecases still have the same perf characteristics.

  • #580 9ef36a9 Thanks @petebacondarwin! - fix: improve validation error message for fields that must be one of a selection of choices

example-pages-functions-app@null

example-pages-functions-app

null

Patch Changes

@github-actions github-actions bot requested a review from threepointone as a code owner March 9, 2022 10:01
@github-actions github-actions bot force-pushed the changeset-release/main branch 24 times, most recently from 3807ae2 to 618dd2c Compare March 16, 2022 11:03
@github-actions github-actions bot force-pushed the changeset-release/main branch 5 times, most recently from ab60c85 to 832e761 Compare March 17, 2022 03:47
@github-actions github-actions bot force-pushed the changeset-release/main branch 12 times, most recently from 8fc548e to efdeee7 Compare March 20, 2022 17:22
@github-actions github-actions bot force-pushed the changeset-release/main branch from efdeee7 to 6d02975 Compare March 20, 2022 17:24
@petebacondarwin petebacondarwin merged commit 76fad8c into main Mar 21, 2022
@petebacondarwin petebacondarwin deleted the changeset-release/main branch March 21, 2022 07:14
mrbbot added a commit that referenced this pull request Oct 31, 2023
* Bump to `ava@5.2.0` and disable worker threads when debugging

This attempts to fix an issue where tests would pass, but AVA would
hang. Step-through debugging doesn't seem to work when the
`workerThreads` option is enabled either.

* Re-implement Cache gateway using new storage system

Closes DEVX-590
mrbbot added a commit that referenced this pull request Nov 1, 2023
* Bump to `ava@5.2.0` and disable worker threads when debugging

This attempts to fix an issue where tests would pass, but AVA would
hang. Step-through debugging doesn't seem to work when the
`workerThreads` option is enabled either.

* Re-implement Cache gateway using new storage system

Closes DEVX-590
mrbbot added a commit that referenced this pull request Nov 1, 2023
* Bump to `ava@5.2.0` and disable worker threads when debugging

This attempts to fix an issue where tests would pass, but AVA would
hang. Step-through debugging doesn't seem to work when the
`workerThreads` option is enabled either.

* Re-implement Cache gateway using new storage system

Closes DEVX-590
mrbbot added a commit that referenced this pull request Nov 1, 2023
* Bump to `ava@5.2.0` and disable worker threads when debugging

This attempts to fix an issue where tests would pass, but AVA would
hang. Step-through debugging doesn't seem to work when the
`workerThreads` option is enabled either.

* Re-implement Cache gateway using new storage system

Closes DEVX-590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment