Repository navigation
wrangler@2.8.1
Patch Changes
-
#2501
a0e5a491Thanks @geelen! - fix: make it possible to query d1 databases from durable objectsThis PR makes it possible to access D1 from Durable Objects.
To be able to query D1 from your Durable Object, you'll need to install the latest version of wrangler, and redeploy your Worker.
For a D1 binding like:
[[d1_databases]] binding = "DB" # i.e. available in your Worker on env.DB database_name = "my-database-name" database_id = "UUID-GOES-HERE" preview_database_id = "UUID-GOES-HERE"
You'll be able to access your D1 database via
env.DBin your Durable Object. -
#2280
ef110923Thanks @penalosa! - Supportqueueandtraceevents in module middleware. This means thatqueueandtraceevents should work properly with the--test-scheduledflag -
#2526
69d379a4Thanks @jrf0110! - Adds unstable_pages module to JS API -
#2554
fbeaf609Thanks @CarmenPopoviciu! - feat: Add support for wasm module imports inwrangler pages devCurrently it is not possible to import
wasmmodules in either Pages
Functions or Pages Advanced Mode projects.This commit caries out work to address the aforementioned issue by
enablingwasmmodule imports inwrangler pages dev. As a result,
Pages users can now import theirwasmmodules withing their Functions
or_worker.jsfiles, andwrangler pages devwill correctly bundle
everything and serve these "external" modules.import hello from "./hello.wasm" export async function onRequest() { const module = await WebAssembly.instantiate(hello); return new Response(module.exports.hello); } -
#2563
5ba39569Thanks @CarmenPopoviciu! - fix: Copy module imports related files to outdirWhen we bundle a Worker
esbuildtakes care of writing the
results to the output directory. However, if the Worker contains
anyexternalimports, such as text/wasm/binary module imports,
that cannot be inlined into the same bundle file,bundleWorker
will not copy these files to the output directory. This doesn't
affectwrangler publishper se, because of how the Worker
upload FormData is created. It does however create some
inconsistencies when runningwrangler publish --outdiror
wrangler publish --outdir --dry-run, in that,outdirwill
not contain those external import files.This commit addresses this issue by making sure the aforementioned
files do get copied over tooutdirtogether withesbuild's
resulting bundle files.