Patch Changes
-
#838
9c025c4
Thanks @threepointone! - fix: remove timeout on custom builds, and make sure logs are visibleThis removes the timeout we have for custom builds. We shouldn't be applying this timeout anyway, since it doesn't block wrangler, just the user themselves. Further, in #759, we changed the custom build's process stdout/stderr config to "pipe" to pass tests, however that meant we wouldn't see logs in the terminal anymore. This patch removes the timeout, and brings back proper logging for custom builds.
- #349
9d04a68
Thanks @GregBrimble! - chore: rename--script-path
to--outfile
forwrangler pages functions build
command.
-
#836
28e3b17
Thanks @threepointone! - fix: toggleworkers.dev
subdomains only when requiredThis fix -
- passes the correct query param to check whether a workers.dev subdomain has already been published/enabled
- thus enabling it only when it's not been enabled
- it also disables it only when it's explicitly knows it's already been enabled
The effect of this is that publishes are much faster.
-
#794
ee3475f
Thanks @JacobMGEvans! - fix: Error messaging from failed login would dump aJSON.parse
error in some situations. Added a fallback if.json
fails to parse
it will attempt.text()
then throw result. If both attempts to parse fail it will throw anUnknownError
with a message showing where
it originated.resolves #539
-
#840
32f6108
Thanks @threepointone! - fix: make wrangler work on node v18There's some interference between our data fetching library
undici
and node 18's newfetch
and co. (powered byundici
internally) which replaces the filename ofFile
s attached toFormData
s with a genericblob
(likely this code - https://github.com/nodejs/undici/blob/615f6170f4bd39630224c038d1ea5bf505d292af/lib/fetch/formdata.js#L246-L250). It's still not clear why it does so, and it's hard to make an isolated example of this.Regardless, disabling the new
fetch
functionality makesundici
use its own base classes, avoiding the problem for now, and unblocking our release. We'll keep investigating and look for a proper fix.Unblocks #834
-
#824
62af4b6
Thanks @threepointone! - feat:publish --dry-run
It can be useful to do a dry run of publishing. Developers want peace of mind that a project will compile before actually publishing to live servers. Combined with
--outdir
, this is also useful for testing the output ofpublish
. Further, it gives developers a chance to upload our generated sourcemap to a service like sentry etc, so that errors from the worker can be mapped against actual source code, but before the service actually goes live.
- #798
feecc18
Thanks @GregBrimble! - fix: Allowsnext()
to take just a pathname with Pages Functions.
-
#839
f2d6de6
Thanks @threepointone! - fix: persist dev experimental storage state in feature specific dirsWith
--experimental-enable-local-persistence
indev
, we were clobbering a single folder with data from kv/do/cache. This patch gives individual folders for them. It also enables persistence even when this is not true, but that stays only for the length of a session, and cleans itself up when the dev session ends.Fixes #830
-
#820
60c409a
Thanks @petebacondarwin! - fix: display a warning if the user has aminiflare
section in theirwrangler.toml
.Closes #799
- #796
3e0db3b
Thanks @GregBrimble! - fix: Makes Response Headers object mutable after a call tonext()
in Pages Functions
-
#814
51fea7c
Thanks @threepointone! - fix: disallow setting account_id in named service environmentsMuch like #641, we don't want to allow setting account_id with named service environments. This is so that we use the same account_id for multiple environments, and have them group together in the dashboard.
-
#823
4a00910
Thanks @threepointone! - fix: don't log an error whenwrangler dev
is cancelled earlyWe currently log an
AbortError
with a stack if we exitwrangler dev
's startup process before it's done. This fix skips logging that error (since it's not an exception).Test plan:
cd packages/wrangler npm run build cd ../../examples/workers-chat-demo npx wrangler dev # hit [x] as soon as the hotkey shortcut bar shows
-
#815
025c722
Thanks @threepointone! - fix: ensure that bundle is generated to es2020 targetThe default tsconfig generated by tsc uses
target: "es5"
, which we don't support. This fix ensures that we output es2020 modules, even if tsconfig asks otherwise.
- #349
9d04a68
Thanks @GregBrimble! - feature: Adds a--plugin
option towrangler pages functions build
which compiles a Pages Plugin. More information about Pages Plugins can be found here. This wrangler build is required for both the development of, and inclusion of, plugins.
- #822
4302172
Thanks @GregBrimble! - chore: Add help messages forwrangler pages project
andwrangler pages deployment
-
#837
206b9a5
Thanks @threepointone! - polish: replace 🦺 with ⚠️I got some feedback that the construction worker jacket (?) icon for deprecations is confusing, especially because it's an uncommon icon and not very big in the terminal. This patch replaces it with a more familiar warning symbol.
-
#824
62af4b6
Thanks @threepointone! - feat:publish --outdir <path>
It can be useful to introspect built assets. A leading usecase is to upload the sourcemap that we generate to services like sentry etc, so that errors from the worker can be mapped against actual source code. We introduce a
--outdir
cli arg to specify a path to generate built assets at, which doesn't get cleaned up after publishing. We are not adding this towrangler.toml
just yet, but could in the future if it looks appropriate there.
-
#811
8c2c7b7
Thanks @JacobMGEvans! - feat: Addedminify
as a configuration option and a cli arg, which will minify code fordev
andpublish
resolves #785