Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
[email protected]
Patch Changes
9074990
Thanks @mrbbot! - Upgrademiniflare
to2.5.1
[email protected]
Patch Changes
#1301
9074990
Thanks @mrbbot! - Upgrademiniflare
to2.5.1
#1272
f7d362e
Thanks @JacobMGEvans! - feat: print bundle size duringpublish
anddev
This logs the complete bundle size of the Worker (as well as when compressed) during
publish
anddev
.Via feat: log bundle size during
dev
/publish
#405 (comment))#1287
2072e27
Thanks @f5io! - fix: kv:key put/get binary fileAs raised in 🐛 BUG: kv:key put no longer able to upload binary files #1254, it was discovered that binary uploads were being mangled by wrangler 2, whereas they worked in wrangler 1. This is because they were read into a string by providing an explicit encoding of
utf-8
. This fix reads provided files into a nodeBuffer
that is then passed directly to the request.Subsequently 🐛 BUG: kv commands do not roundtrip binary data correctly #1273 was raised in relation to a similar issue with gets from wrangler 2. This was happening due to the downloaded file being converted to
utf-8
encoding as it was pushed throughconsole.log
. By leveragingprocess.stdout.write
we can push the fetchedArrayBuffer
to std out directly without inferring any specific encoding value.#1325
bcd066d
Thanks @sidharthachatterjee! - fix: Ensure Response is mutable in Pages functions#1265
e322475
Thanks @petebacondarwin! - fix: support all git versions forwrangler init
If
git
does not support the--initial-branch
argument then just fallback to the default initial branch name.We tried to be more clever about this but there are two many weird corner cases with different git versions on different architectures.
Now we do our best, with recent versions of git, to ensure that the branch is called
main
but otherwise just make sure we don't crash.Fixes 🐛 BUG: Initializing project with git fails #1228
#1311
374655d
Thanks @JacobMGEvans! - feat: add--text
flag to decodekv:key get
response values as utf8 stringsPreviously, all kv values were being rendered directly as bytes to the stdout, which makes sense if the value is a binary blob that you are going to pipe into a file, but doesn't make sense if the value is a simple string.
resolves feat: add a
--text
flag tokv:key get
#1306#1327
4880d54
Thanks @JacobMGEvans! - feat: resolve--site
cli arg relative to current working directoryBefore we were resolving the Site directory relative to the location of
wrangler.toml
at all times.Now the
--site
cli arg is resolved relative to current working directory.resolves 🐛 BUG:
--site
should resolve relative to cwd, not wrangler.toml #1243#1270
7ed5e1a
Thanks @caass! - Delegate to a local install ofwrangler
if one exists.Users will frequently install
wrangler
globally to run commands likewrangler init
, but we also recommend pinning a specific version ofwrangler
in a project'spackage.json
. Now, when a user invokes a global install ofwrangler
, we'll check to see if they also have a local installation. If they do, we'll delegate to that version.#1289
0d6098c
Thanks @threepointone! - feat: entry point is not mandatory if--assets
is passedSince we use a facade worker with
--assets
, an entry point is not strictly necessary. This makes a common usecase of "deploy a bunch of static assets" extremely easy to start, as a one linernpx wrangler dev --assets path/to/folder
(and same withpublish
).#1293
ee57d77
Thanks @petebacondarwin! - fix: do not crash inwrangler dev
if user has multiple accountsWhen a user has multiple accounts we show a prompt to allow the user to select which they should use.
This was broken in
wrangler dev
as we were trying to start a new ink.js app (to show the prompt)from inside a running ink.js app (the UI for
wrangler dev
).This fix refactors the
ChooseAccount
component so that it can be used directly within another component.Fixes multiple accounts + dev = Silent Crash in
dev
mode #1258#1299
0fd0c30
Thanks @threepointone! - polish: include a copy-pastable message when trying to publish without a compatibility date#1269
fea87cf
Thanks @petebacondarwin! - fix: do not consider ancestor files when initializing a project with a specified nameWhen initializing a new project (via
wrangler init
) we attempt to reuse files in the currentdirectory, or in an ancestor directory. In particular we look up the directory tree for
package.json and tsconfig.json and use those instead of creating new ones.
Now we only do this if you do not specify a name for the new Worker. If you do specify a name,
we now only consider files in the directory where the Worker will be initialized.
Fixes 🐛 BUG:
wrangler init foo
should stop looking for tsconfig.json and package.json at./foo
#859#1321
8e2b92f
Thanks @GregBrimble! - fix: Correctly resolve directories for 'wrangler pages publish'Previously, attempting to publish a nested directory or the current directory would result in parsing mangled paths which broke deployments. This has now been fixed.
#1293
ee57d77
Thanks @petebacondarwin! - fix: do not hang waiting for account choice when in non-interactive modeThe previous tests for non-interactive only checked the stdin.isTTY, but
you can have scenarios where the stdin is interactive but the stdout is not.
For example when writing the output of a
kv:key get
command to a file.We now check that both stdin and stdout are interactive before trying to
interact with the user.
#1275
35482da
Thanks @alankemp! - Add environment variable WRANGLER_LOG to set log level#1294
f6836b0
Thanks @threepointone! - fix: serve--assets
in dev + local modeA quick bugfix to make sure --assets/config.assets gets served correctly in
dev --local
.#1237
e1b8ac4
Thanks @threepointone! - feat:--assets
/config.assets
to serve a folder of static assetsThis adds support for defining
assets
inwrangler.toml
. You can configure it with a string path, or a{bucket, include, exclude}
object (much like[site]
). This also renames the--experimental-public
arg as--assets
.Via RFC: Static Assets with Workers #1162