Releases: cloudflare/workers-sdk
wrangler@3.11.0
Minor Changes
-
#3726
7d20bdbd
Thanks @petebacondarwin! - feat: support partial bundling with configurable external modulesSetting
find_additional_modules
totrue
in your configuration file will now instruct Wrangler to look for files in
yourbase_dir
that match your configuredrules
, and deploy them as unbundled, external modules with your Worker.
base_dir
defaults to the directory containing yourmain
entrypoint.Wrangler can operate in two modes: the default bundling mode and
--no-bundle
mode. In bundling mode, dynamic imports
(e.g.await import("./large-dep.mjs")
) would be bundled into your entrypoint, making lazy loading less effective.
Additionally, variable dynamic imports (e.g.await import(`./lang/${language}.mjs`)
) would always fail at runtime,
as Wrangler would have no way of knowing which modules to upload. The--no-bundle
mode sought to address these issues
by disabling Wrangler's bundling entirely, and just deploying code as is. Unfortunately, this also disabled Wrangler's
code transformations (e.g. TypeScript compilation,--assets
,--test-scheduled
, etc).With this change, we now additionally support partial bundling. Files are bundled into a single Worker entry-point file
unlessfind_additional_modules
istrue
, and the file matches one of the configuredrules
. See
https://developers.cloudflare.com/workers/wrangler/bundling/ for more details and examples. -
#4093
c71d8a0f
Thanks @mrbbot! - chore: bumpminiflare
to3.20231002.0
Patch Changes
-
#3726
7d20bdbd
Thanks @petebacondarwin! - fix: ensure that additional modules appear in the out-dirWhen using
find_additional_modules
(orno_bundle
) we find files that
will be uploaded to be deployed alongside the Worker.Previously, if an
outDir
was specified, only the Worker code was output
to this directory. Now all additional modules are also output there too. -
#4067
31270711
Thanks @mrbbot! - fix: generate valid source maps withwrangler pages dev
on macOSOn macOS,
wrangler pages dev
previously generated source maps with an
incorrect number of../
s in relative paths. This change ensures paths are
always correct, improving support for breakpoint debugging. -
#4084
9a7559b6
Thanks @RamIdeas! - fix: respect the options.local value in unstable_dev (it was being ignored) -
#4107
807ab931
Thanks @mrbbot! - chore: bumpminiflare
to3.20231002.1
-
#3726
7d20bdbd
Thanks @petebacondarwin! - fix: allow__STATIC_CONTENT_MANIFEST
module to be imported anywhere__STATIC_CONTENT_MANIFEST
can now be imported in subdirectories when
--no-bundle
orfind_additional_modules
are enabled. -
#3926
f585f695
Thanks @penalosa! - Log more detail about tokens after authentication errors -
#3695
1d0b7ad5
Thanks @JacksonKearl! - Fixedpages dev
crashing and leaving port open when building a worker script fails -
#4066
c8b4a07f
Thanks @RamIdeas! - fix: we no longer infer pathnames from route patterns as the hostDuring local development, inside your worker, the host of
request.url
is inferred from theroutes
in your config.Previously, route patterns like "*/some/path/name" would infer the host as "some". We now handle this case and determine we cannot infer a host from such patterns.
create-cloudflare@2.4.0
Minor Changes
-
#4063
cb4309f9
Thanks @jculvey! - Bump supported node version to 18.14.1We've recently switched out testing infrastructure to test C3 on node version 18.14.1.
As of earlier this month, Node v16 is no longer supported, and many of the underlying
framework scaffolding tools that C3 uses (ex.create-astro
,gatsby
) have dropped
support for node v16, which in turn causes C3 to fail for those frameworks.
Patch Changes
-
#3991
80f78dad
Thanks @dependabot! - C3: Bumpedcreate-astro
from4.1.0
to4.2.0
-
#4002
8ee46b06
Thanks @dependabot! - C3: Bumpedcreate-docusaurus
from2.4.1
to2.4.3
-
#4012
a21acf82
Thanks @dependabot! - C3: Bumpedcreate-solid
from0.2.26
to0.3.6
-
#4091
a9cb8c60
Thanks @dependabot! - C3: Bumpedcreate-svelte
from5.0.6
to5.1.0
-
#4100
866c7833
Thanks @dependabot! - C3: Bumpedcreate-remix
from2.0.0
to2.0.1
-
#4103
f79cf89a
Thanks @dependabot! - C3: Bumpedcreate-astro
from4.2.0
to4.2.1
-
#4088
35165a26
Thanks @jculvey! - Fixes an issue where users were prompted for TypeScript twice during worker creation -
#4087
57e9f218
Thanks @jculvey! - Fixes an issue where exiting early from c3 would cause the terminal cursor to be hidden -
#3754
811730d8
Thanks @RamIdeas! - .gitignore files were not included in our templates due to npm/npm#3763we now workaround this issue and ensure C3 templates include a .gitignore file
-
#4062
02359bc5
Thanks @jculvey! - Defaults the project type toWeb Framework
. The previous default was"Hello World" worker
-
#4030
dba26262
Thanks @admah! - Fixes Workers templates to have adev
command in package.json to match comments inindex
files. -
#3916
15d75e50
Thanks @admah! - fix: update the main file in the c3 scheduled js template to index.js.
@cloudflare/pages-shared@0.10.0
Minor Changes
- #4093
c71d8a0f
Thanks @mrbbot! - chore: bumpminiflare
to3.20231002.0
Patch Changes
- #4107
807ab931
Thanks @mrbbot! - chore: bumpminiflare
to3.20231002.1
wrangler@3.10.1
Patch Changes
-
#4041
6b1c327d
Thanks @elithrar! - Fixed a bug in Vectorize that send preset configurations with the wrong key. This was patched on the server-side to work around this for users in the meantime. -
#4054
f8c52b93
Thanks @mrbbot! - fix: allowwrangler pages dev
sessions to be reloadedPreviously,
wrangler pages dev
attempted to send messages on a closed IPC
channel when sources changed, resulting in anERR_IPC_CHANNEL_CLOSED
error.
This change ensures the channel stays open until the user exitswrangler pages dev
.
wrangler@3.10.0
Minor Changes
-
#4013
3cd72862
Thanks @elithrar! - Adds wrangler support for Vectorize, Cloudflare's new vector database, with
wrangler vectorize
. Visit the developer documentation
(https://developers.cloudflare.com/vectorize/) to learn more and create your
first vector database withwrangler vectorize create my-first-index
. -
#3999
ee6f3458
Thanks @OilyLime! - Adds support for Hyperdrive, viawrangler hyperdrive
.
Patch Changes
-
#4034
bde9d64a
Thanks @ndisidore! - Adds Vectorize support uploading batches of newline delimited json (ndjson)
vectors from a source file.
Load a dataset withvectorize insert my-index --file vectors.ndjson
-
#4028
d5389731
Thanks @JacobMGEvans! - fix: Bulk Secret Draft WorkerFixes the issue of a upload of a Secret when a Worker doesn't exist yet, the draft worker is created and the secret is uploaded to it.
wrangler@3.9.1
Patch Changes
-
#3992
35564741
Thanks @edevil! - Add AI binding that will be used to interact with the AI project.Example
wrangler.toml
name = "ai-worker" main = "src/index.ts" [ai] binding = "AI"
Example script:
import Ai from "@cloudflare/ai" export default { async fetch(request: Request, env: Env): Promise<Response> { const ai = new Ai(env.AI); const story = await ai.run({ model: 'llama-2', input: { prompt: 'Tell me a story about the future of the Cloudflare dev platform' } }); return new Response(JSON.stringify(story)); }, }; export interface Env { AI: any; }
-
#4006
bc8c147a
Thanks @rozenmd! - fix: remove warning around using D1's binding, and clean up the epilogue when running D1 commands -
#4027
9e466599
Thanks @jspspike! - Add WebGPU support through miniflare update -
#3986
00247a8d
Thanks @edevil! - Added AI related CLI commands
create-cloudflare@2.3.1
Patch Changes
- #4001
fd39ae64
Thanks @dependabot! - C3: Bumpednuxi
from3.8.4
to3.9.0
wrangler@3.9.0
Note this release changes the layout of persisted data in the .wrangler
folder. KV namespaces, R2 buckets and D1 databases will automatically be migrated to the new layout. See the corresponding miniflare@3.20230918.0
release notes for more information.
Minor Changes
-
#3951
e0850ad1
Thanks @mrbbot! - feat: add support for breakpoint debugging towrangler dev
's--remote
and--no-bundle
modesPreviously, breakpoint debugging using Wrangler's DevTools was only supported
in local mode, when using Wrangler's built-in bundler. This change extends that
to remote development, and--no-bundle
.When using
--remote
and--no-bundle
together, uncaught errors will now be
source-mapped when logged too. -
#3951
e0850ad1
Thanks @mrbbot! - feat: add support for Visual Studio Code's built-in breakpoint debuggerWrangler now supports breakpoint debugging with Visual Studio Code's debugger.
Create a.vscode/launch.json
file with the following contents...{ "configurations": [ { "name": "Wrangler", "type": "node", "request": "attach", "port": 9229, "cwd": "/", "resolveSourceMapLocations": null, "attachExistingChildren": false, "autoAttachChildProcesses": false } ] }
...then run
wrangler dev
, and launch the configuration.
Patch Changes
-
#3954
bc88f0ec
Thanks @dario-piotrowicz! - updatewrangler pages dev
D1 and DO descriptions -
#3928
95b24b1e
Thanks @JacobMGEvans! - Colorize Deployed Bundle Size
Most bundlers, and other tooling that give you size outputs will colorize their the text to indicate if the value is within certain ranges.
The current range values are:
red 100% - 90%
yellow 89% - 70%
green <70%resolves #1312
create-cloudflare@2.3.0
Minor Changes
-
#3887
765ebc1c
Thanks @G4brym! - Add OpenAPI 3.1 template project -
#3888
7310add1
Thanks @G4brym! - Bump chatgptPlugin template itty-router-openapi version
Patch Changes
-
#3970
0a8d97c7
Thanks @dependabot! - C3: Bumpedcreate-astro
from4.0.1
to4.1.0
-
#3971
1723d3e6
Thanks @dependabot! - C3: Bumpedcreate-svelte
from4.2.0
to5.0.6
-
#3972
dac69503
Thanks @dependabot! - C3: Bumpedcreate-remix
from1.19.3
to2.0.0
-
#3973
324907ac
Thanks @dependabot! - C3: Bumpednuxi
from3.6.5
to3.8.4
-
#3980
1354ab36
Thanks @dependabot! - C3: Bumpedcreate-astro
from4.0.1
to4.1.0
-
#3987
fe227900
Thanks @dependabot! - C3: Bumpedcreate-vue
from3.6.4
to3.7.5
-
#3988
d8833eff
Thanks @dependabot! - C3: Bumpedgatsby
from5.11.0
to5.12.4
-
#3990
07b57803
Thanks @dependabot! - C3: Bumpedcreate-qwik
from1.2.7
to1.2.12
wrangler@3.8.0
Minor Changes
-
#3775
3af30879
Thanks @bthwaites! - R2 Jurisdictional Restrictions guarantee objects in a bucket are stored within a specific jurisdiction. Wrangler now allows you to interact with buckets in a defined jurisdiction.Wrangler R2 operations now support a
-J
flag that allows the user to specify a jurisdiction. When passing the-J
flag, you will only be able to interact with R2 resources within that jurisdiction.# List all of the buckets in the EU jurisdiction wrangler r2 bucket list -J eu # Downloads the object 'myfile.txt' from the bucket 'mybucket' in EU jurisdiction wrangler r2 object get mybucket/myfile.txt -J eu
To access R2 buckets that belong to a jurisdiction from Workers, you will need to specify the jurisdiction as well as the bucket name as part of your bindings in your
wrangler.toml
:[[r2_buckets]] bindings = [ { binding = "MY_BUCKET", bucket_name = "<YOUR_BUCKET_NAME>", jurisdiction = "<JURISDICTION>" } ]