Wrangler Changelog
2024-07-26
3.67.1
#6312
67c611a
Thanks @emily-shen! - feat: add CLI flag and config key for experimental Workers AssetsThis change adds a new experimental CLI flag (
--experimental-assets
) and configuration key (experimental_assets
) for the new Workers Assets work.The new flag and configuration key are for the time being “inactive”, in the sense that no behaviour is attached to them yet. This will follow up in future work.
Updated dependencies [
b3c3cb8
]:
2024-07-25
3.67.0
#4545
e5afae0
Thanks @G4brym! - Remove experimental/beta constellation commands and binding, please migrate to Workers AI, learn more here https://developers.cloudflare.com/workers-ai/. This is not deemed a major version bump for Wrangler since these commands were never generally available.#6322
373248e
Thanks @IRCody! - Add cloudchamber scope to existing scopes instead of replacing them.When using any cloudchamber command the cloudchamber scope will now be added to the existing scopes instead of replacing them.
#6276
a432a13
Thanks @CarmenPopoviciu! - feat: Add support forwrangler.jsonc
This commit adds support for
wrangler.jsonc
config file for Workers. This feature is available behind the--experimental-json-config
flag (just likewrangler.json
).To use the new configuration file, add a
wrangler.jsonc
file to your Worker project and runwrangler dev --experimental-json-config
orwrangler deploy --experimental-json-config
.Please note that this work does NOT add
wrangler.json
orwrangler.jsonc
support for Pages projects!#6168
1ee41ff
Thanks @IRCody! - feature: Add list and remove subcommands to cloudchamber registries command.#6331
e6ada07
Thanks @threepointone! - fix: only warn about miniflare feature support (ai, vectorize, cron) onceWe have some warnings in local mode dev when trying to use ai bindings / vectorize / cron, but they are printed every time the worker is started. This PR changes the warning to only be printed once per worker start.
2024-07-23
3.66.0
#6295
ebc85c3
Thanks @andyjessop! - feat: introduce an experimental flag forwrangler types
to dynamically generate runtime types according to the user’s project configuration.#6272
084d39e
Thanks @emily-shen! - fix: addlegacy-assets
config and flag as alias of currentassets
behavior- The existing behavior of the
assets
config key/flag will change on August 15th. legacy-assets
will preserve current functionality.
- The existing behavior of the
#6203
5462ead
Thanks @geelen! - fix: Updating to match new D1 import/export API format#6315
3fd94e7
Thanks @penalosa! - chore: Add RayID towrangler login
error message displayed when a user hits a bot challenge page
2024-07-19
3.65.1
#6267
957d668
Thanks @WalshyDev! - chore: add total module size to the logged table, this makes it much easier to see the total size of all modules combined.#6244
e7c06d7
Thanks @gabivlj! - fix: wrangler cloudchamber json errors are properly formattedUpdated dependencies [
779c713
]:
2024-07-16
3.65.0
#6194
25afcb2
Thanks @zebp! - chore: Add duration and sourcemap size to upload metrics eventWrangler will now send the duration and the total size of any sourcemaps uploaded with your Worker to Cloudflare if you have metrics enabled.
#6259
eb201a3
Thanks @ottomated! - chore: Add types to DurableObjectNamespace type generation. For example:interface Env {OBJECT: DurableObjectNamespace<import("./src/index").MyDurableObject>;}#6245
e4abed3
Thanks @OilyLime! - feature: Add support for Hyperdrive over Access configs#6255
d497e1e
Thanks @rozenmd! - fix: teach wrangler init –from-dash about d1 bindingsThis PR teaches
wrangler init --from-dash
about D1 bindings, so they aren’t incorrectly added to the wrangler.toml as unsafe bindings.#6258
4f524f2
Thanks @dom96! - feature: Add warning about deploying Python with requirements.txtThis expands on the warning shown for all Python Workers to include a message about deploying Python Workers with a requirements.txt not being supported.
#6249
8bbd824
Thanks @petebacondarwin! - chore: Update config-schema.json for the wrangler.toml#5955
db11a0f
Thanks @harugon! - fix: correctly escape newlines inconstructType
function for multiline stringsThis fix ensures that multiline strings are correctly handled by the
constructType
function. Newlines are now properly escaped to prevent invalid JavaScript code generation when using thewrangler types
command. This improves robustness and prevents errors related to multiline string handling in environment variables and other configuration settings.#6263
fa1016c
Thanks @petebacondarwin! - fix: use cli script-name arg when deploying a worker with queue consumersUpdated dependencies [
0d32448
]:
2024-07-11
3.64.0
#4925
7d4a4d0
Thanks @dom96! - feature: whoami, logout and login commands mention the CLOUDFLARE_API_TOKEN env var nowIt is easy to get confused when trying to logout while the CLOUDFLARE_API_TOKEN env var is set. The logout command normally prints out a message which states that the user is not logged in. This change rectifes this to explicitly call out that the CLOUDFLARE_API_TOKEN is set and requests that the user unsets it to logout.
#5032
75f7928
Thanks @dbenCF! - Adding client side error handling for R2 when the user tries to create a bucket with an invalid name. The purpose of this addition is to provide the user with more context when encountering this error.#4398
4b1e5bc
Thanks @mattpocock! - fix: update tsconfig for Workers generated by wrangler init
2024-07-04
3.63.1
#6192
b879ce4
Thanks @petebacondarwin! - fix: do not report D1 user errors to Sentry#6150
d993409
Thanks @CarmenPopoviciu! - fix: Fixpages dev
watch mode [_worker.js]The watch mode in
pages dev
for Advanced Mode projects is currently partially broken, as it only watches for changes in the “_worker.js” file, but not for changes in any of its imported dependencies. This means that given the following “_worker.js” fileimport { graham } from "./graham-the-dog"; export default { fetch(request, env) { return new Response(graham) } }
pages dev
will reload for any changes in the_worker.js
file itself, but not for any changes ingraham-the-dog.js
, which is its dependency.Similarly,
pages dev
will not reload for any changes in non-JS module imports, such as wasm/html/binary module imports.This commit fixes all the aforementioned issues.
2024-07-03
3.63.0
#6167
e048958
Thanks @threepointone! - feature: alias modules in the workerSometimes, users want to replace modules with other modules. This commonly happens inside a third party dependency itself. As an example, a user might have imported
node-fetch
, which will probably never work in workerd. You can use the alias config to replace any of these imports with a module of your choice.Let’s say you make a
fetch-nolyfill.js
export default fetch; // all this does is export the standard fetch function`You can then configure
wrangler.toml
like so:# ...[alias]"node-fetch": "./fetch-nolyfill"So any calls to
import fetch from 'node-fetch';
will simply use our nolyfilled version.You can also pass aliases in the cli (for both
dev
anddeploy
). Like:npx wrangler dev --alias node-fetch:./fetch-nolyfill#6073
7ed675e
Thanks @geelen! - Added D1 export support for local databases#6149
35689ea
Thanks @RamIdeas! - refactor: React-free hotkeys implementation, behind the--x-dev-env
flag#6022
7951815
Thanks @CarmenPopoviciu! - fix: Fixpages dev
watch mode [Functions]The watch mode in
pages dev
for Pages Functions projects is currently partially broken, as it only watches for file system changes in the “/functions” directory, but not for changes in any of the Functions’ dependencies. This means that given a Pages Functionmath-is-fun.ts
, defined as follows:import { ADD } from "../math/add"; export async function onRequest() { return new Response(`${ADD} is fun!`); }
pages dev
will reload for any changes inmath-is-fun.ts
itself, but not for any changes inmath/add.ts
, which is its dependency.Similarly,
pages dev
will not reload for any changes in non-JS module imports, such as wasm/html/binary module imports.This commit fixes all these things, plus adds some extra polish to the
pages dev
watch mode experience.#6164
4cdad9b
Thanks @threepointone! - fix: use account id for listing zonesFixes https://github.com/cloudflare/workers-sdk/issues/4944
Trying to fetch
/zones
fails when it spans more than 500 zones. The fix to use an account id when doing so. This patch passes the account id to the zones call, threading it through all the functions that require it.#6180
b994604
Thanks @Skye-31! - Fix: pass env to getBindings to support reading.dev.vars.{environment}
https://github.com/cloudflare/workers-sdk/pull/5612 added support for selecting the environment of config used, but it missed passing it to the code that reads
.dev.vars.{environment}
Closes #5641
#6124
d03b102
Thanks @RamIdeas! - feat:url
andinspectorUrl
properties have been exposed on the worker object returned bynew unstable_DevEnv().startWorker(options)
#6147
02dda3d
Thanks @penalosa! - refactor: React free dev registry#6127
1568c25
Thanks @DaniFoldi! - fix: Bump ws dependency#6140
4072114
Thanks @petebacondarwin! - fix: add extra error logging to auth response errors#6160
9466531
Thanks @sm-bean! - fix: removes unnecessary wrangler tail warning against resetting durable object#6142
9272ef5
Thanks @dario-piotrowicz! - fix: improve thegetPlatformProxy
configPath
option ts-doc comment to clarify its behavior