Skip to content

Releases: cloudflare/workers-sdk

wrangler@2.7.0

09 Jan 19:21
e60dc90
Compare
Choose a tag to compare

Minor Changes

  • #2465 e1c2f5b9 Thanks @JacobMGEvans! - After this PR, wrangler init --yes will generate a test for your new Worker project, using Vitest with TypeScript.
    When using wrangler init, and choosing to create a Typescript project, you will now be asked if Wrangler should write tests for you, using Vitest.

    This resolves issue #2436.

  • #2333 71691421 Thanks @markjmiller! - Remove the experimental binding warning from Dispatch Namespace since it is GA.

Patch Changes

  • #2460 c2b2dfb8 Thanks @rozenmd! - fix: resolve unstable_dev flakiness in tests by awaiting the dev registry

  • #2439 616f8739 Thanks @petebacondarwin! - fix(wrangler): do not login or read wrangler.toml when applying D1 migrations in local mode.

    When applying D1 migrations to a deployed database, it is important that we are logged in
    and that we have the database ID from the wrangler.toml.
    This is not needed for --local mode where we are just writing to a local SQLite file.

  • #1869 917b07b0 Thanks @petebacondarwin! - feat: enable Wrangler to target the staging API by setting WRANGLER_API_ENVIRONMENT=staging

    If you are developing Wrangler, or an internal Cloudflare feature, and during testing,
    need Wrangler to target the staging API rather than production, it is now possible by
    setting the WRANGLER_API_ENVIRONMENT environment variable to staging.

    This will update all the necessary OAuth and API URLs, update the OAuth client ID, and
    also (if necessary) acquire an Access token for to get through the firewall to the
    staging URLs.

  • #2377 32686e42 Thanks @mrbbot! - Fix ReferenceError when using wrangler dev --experimental-local in Node 16

  • #2393 a6d24732 Thanks @mrbbot! - Remove login requirement from wrangler dev --experimental-local

  • #2502 6b7ebc8d Thanks @mrbbot! - Upgrade miniflare to 2.11.0

  • #2485 4c0e2309 Thanks @GregBrimble! - fix: Pages Plugin routing when mounted at the root of a project

    Previously, there was a bug which meant that Plugins mounted at the root of a Pages project were not correctly matching incoming requests. This change fixes that bug so Plugins mounted at the root should now correctly work.

  • #2479 7b479b91 Thanks @rozenmd! - fix: bump d1js

    This PR bumps d1js, adding the following functionality to the d1 alpha shim:

    • validates supported types
    • converts ArrayBuffer to array
    • converts typedArray to array
  • #2392 7785591c Thanks @rozenmd! - fix: improve wrangler init --from-dash help text and error handling

  • #2391 19525a4b Thanks @mrbbot! - Always log when delegating to local wrangler install.

    When a global wrangler command is executed in a package directory with wrangler installed locally, the command is redirected to the local wrangler install.
    We now always log a message when this happens, so you know what's going on.

  • #2468 97282459 Thanks @rozenmd! - BREAKING CHANGE: move experimental options under the experimental object for unstable_dev

  • #2477 3bd1b676 Thanks @rozenmd! - fix: update NO_D1_WARNING to make it clear how to turn it off

  • #2495 e93063e9 Thanks @petebacondarwin! - fix(d1): ensure that migrations support compound statements

    This fix updates the SQL statement splitting so that it does not split in the middle of compound statements.
    Previously we were using a third party splitting library, but this needed fixing and was actually unnecessary for our purposes.
    So a new splitter has been implemented and the library dependency removed.
    Also the error handling in d1 migrations apply has been improved to handle a wider range of error types.

    Fixes #2463

  • #2400 08a0b22e Thanks @mrbbot! - Cleanly exit wrangler dev --experimental-local when pressing x/q/CTRL-C

  • #2374 ecba1ede Thanks @rozenmd! - fix: make --from-dash error output clearer

    This PR makes it clearer what --from-dash wants from you.

    closes #2373
    closes #2375

  • #2377 32686e42 Thanks @mrbbot! - Respect FORCE_COLOR=0 environment variable to disable colored output when using wrangler dev --local

  • #2455 d9c1d273 Thanks @rozenmd! - BREAKING CHANGE: refactor unstable_dev to use an experimental object, instead of a second options object

    Before, if you wanted to disable the experimental warning, you would run:

    worker = await unstable_dev(
    	"src/index.js",
    	{},
    	{ disableExperimentalWarning: true }
    );

    After this change, you'll need to do this instead:

    worker = await unstable_dev("src/index.js", {
    	experimental: { disableExperimentalWarning: true }
    });

wrangler@2.6.2

09 Dec 14:16
21bab6b
Compare
Choose a tag to compare

Patch Changes

wrangler@2.6.1

06 Dec 12:32
cf0022e
Compare
Choose a tag to compare

Patch Changes

  • #2339 f6821189 Thanks @GregBrimble! - fix: wrangler dev --local now correctly lazy-imports @miniflare/tre

    Previously, we introduced a bug where we were incorrectly requiring @miniflare/tre, even when not using the workerd/--experimental-local mode.

@cloudflare/pages-shared@0.0.12

06 Dec 12:32
cf0022e
Compare
Choose a tag to compare

Patch Changes

  • #2339 f6821189 Thanks @GregBrimble! - fix: wrangler dev --local now correctly lazy-imports @miniflare/tre

    Previously, we introduced a bug where we were incorrectly requiring @miniflare/tre, even when not using the workerd/--experimental-local mode.

wrangler@2.6.0

05 Dec 18:17
271aece
Compare
Choose a tag to compare

Minor Changes

  • #2268 3be1c2cf Thanks @GregBrimble! - feat: Add support for --experimental-local to wrangler pages dev which will use the workerd runtime.

    Add @miniflare/tre environment polyfill to @cloudflare/pages-shared.

  • #2163 d73a34be Thanks @jimhawkridge! - feat: Add support for Analytics Engine bindings.

    For example:

    analytics_engine_datasets = [
        { binding = "ANALYTICS", dataset = "my_dataset" }
    ]
    

Patch Changes

  • #2177 e98613f8 Thanks @caass! - Trigger login flow if a user runs wrangler dev while logged out

    Previously, we would just error if a user logged out and then ran wrangler dev.
    Now, we kick them to the OAuth flow and suggest running wrangler dev --local if
    the login fails.

    Closes #2147

  • #2298 bb5e4f91 Thanks @rozenmd! - fix: d1 not using the preview database when using wrangler dev

    After this fix, wrangler will correctly connect to the preview database, rather than the prod database when using wrangler dev

  • #2176 d48ee112 Thanks @caass! - Use the user's preferred default branch name if set in .gitconfig.

    Previously, we would initialize new workers with main as the name of the default branch.
    Now, we see if the user has a custom setting in .gitconfig for init.defaultBranch, and use
    that if it exists.

    Closes #2112

  • #2275 bbfb6a96 Thanks @mrbbot! - Fix script reloads, and allow clean exits, when using --experimental-local on Linux

  • #2275 bbfb6a96 Thanks @mrbbot! - Fix DevTools inspector support when using --(experimental-)local

@cloudflare/pages-shared@0.0.11

05 Dec 18:17
271aece
Compare
Choose a tag to compare

Patch Changes

  • #2303 1a1f1dc7 Thanks @jrf0110! - fix: Pages asset-server duplicating the hash component
    fix: Pages metadata missing line numbers. This could have resulted in redirects precedence ordering not being respected.

  • #2268 3be1c2cf Thanks @GregBrimble! - feat: Add support for --experimental-local to wrangler pages dev which will use the workerd runtime.

    Add @miniflare/tre environment polyfill to @cloudflare/pages-shared.

wrangler@2.5.0

29 Nov 18:47
b1cd2fc
Compare
Choose a tag to compare

Minor Changes

Patch Changes

  • #2296 7da8f0e6 Thanks @Skye-31! - Fix: check response status of d1 backup download command before writing contents to file

  • #2260 c2940160 Thanks @rozenmd! - fix: make it possible to use a local db for d1 migrations

    As of this change, wrangler's d1 migrations commands now accept local and persist-to as flags, so migrations can run against the local d1 db.

  • #1883 60d31c01 Thanks @GregBrimble! - fix: Fix --port=0 option to report the actually used port.

wrangler@2.4.4

22 Nov 16:03
f8ea2b6
Compare
Choose a tag to compare

Patch Changes

wrangler@2.4.3

22 Nov 14:51
1c3e243
Compare
Choose a tag to compare

Patch Changes

  • #2249 e41c7e41 Thanks @mrbbot! - Enable pretty source-mapped error pages when using --experimental-local

  • #2208 5bd04296 Thanks @OilyLime! - Add link to Queues tab in dashboard when unauthorized to use Queues

  • #2248 effc2215 Thanks @rozenmd! - chore: remove d1 local hardcoding

    Prior to this change wrangler would only ever use local mode when testing d1.

    After this change d1 tests can access both local and remote Workers.

  • #2254 9e296a4d Thanks @penalosa! - Add an option to customise whether wrangler login opens a browser automatically. Use wrangler login --no-browser to prevent a browser being open—the link will be printed to the console so it can be manually opened.

wrangler@2.4.2

18 Nov 14:10
683b983
Compare
Choose a tag to compare

Patch Changes