Minor Changes
-
#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
Patch Changes
-
#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 #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}
#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 -
Updated dependencies [
42a7930
,7ed675e
,1568c25
]:- miniflare@3.20240701.0