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
wrangler@0.0.24
Patch Changes
#719
6503ace
Thanks @petebacondarwin! - fix: ensure the correct worker name is published in legacy environmentsWhen a developer uses
--env
to specify an environment name, the Worker name shouldbe computed from the top-level Worker name and the environment name.
When the given environment name does not match those in the wrangler.toml, we error.
But if no environments have been specified in the wrangler.toml, at all, then we only
log a warning and continue.
In this second case, we were reusing the top-level environment, which did not have the
correct legacy environment fields set, such as the name. Now we ensure that such an
environment is created as needed.
See Support backwards compatibility with environment names and related CLI flags #680 (comment)
#708
763dcb6
Thanks @threepointone! - fix: unexpected commands and arguments should throwThis enables strict mode in our command line parser (yargs), so that unexpected commands and options uniformly throw errors.
Fixes 🐛 BUG: insufficient command line param checking -
wrangler tail --pretty
doesn't fail #706#713
18d09c7
Thanks @threepointone! - fix: don't fetch zone id forwrangler dev --local
We shouldn't try to resolve a domain/route to a zone id when starting in local mode (since there may not even be network).
#692
52ea60f
Thanks @threepointone! - fix: do not deploy to workers.dev when routes are defined in an environmentWhen
workers_dev
is not configured, we had a bug where it would default to true inside an environment even when there were routes defined, thus publishing both to aworkers.dev
subdomain as well as the defined routes. The fix is to defaultworkers_dev
toundefined
, and check when publishing whether or not to publish toworkers.dev
/defined routes.Fixes 🐛 BUG: wrangler publishes to workers.dev if there's no top level route, but does have one in an environment #690
#687
8f7ac7b
Thanks @petebacondarwin! - fix: add warning aboutwrangler dev
with remote Durable ObjectsDurable Objects that are being bound by
script_name
will not be isolated from thelive data during development with
wrangler dev
.This change simply warns the developer about this, so that they can back out before
accidentally changing live data.
Fixes Warn when wrangler dev is being used on a worker that binds to a durable object class implemented by a different script #319
#661
6967086
Thanks @JacobMGEvans! - polish: add "Beta" messaging around the CLI command for Pages. Explicitly specifying the command is Beta, not to be confused with Pages itself which is production ready.#709
7e8ec9a
Thanks @threepointone! - fix: trigger login flow if refreshtoken isn't validIf the auth refresh token isn't valid, then we should trigger the login flow. Reported in A couple of bugs I faced today (
dev
,publish
) #316#702
241000f
Thanks @threepointone! - fix: setup jsx loaders when guessing worker formatThe fix is to add the same loaders to the esbuild run that guesses the worker format.
Reported in 🐛 BUG: Migration flow for Wrangler1 webpack projects could be more clear #701
#711
3dac1da
Thanks @threepointone! - fix: defaultwrangler tail
to pretty printFixes 🐛 BUG: the default
wrangler tail
output is too busy #707#712
fb53fda
Thanks @threepointone! - feat: Non-interactive modeContinuing the work from Non interactive mode #325, this detects when wrangler is running inside an environment where "raw" mode is not available on stdin, and disables the features for hot keys and the shortcut bar. This also adds stubs for testing local mode functionality in
local-mode-tests
, and deletes the previous hackydev2.test.tsx
.Fixes Running
wrangler dev
from an E2E test throws Ink errors #322#716
6987cf3
Thanks @threepointone! - feat: path to a customtsconfig
This adds a config field and a command line arg
tsconfig
for passing a path to a custom typescript configuration file. We don't do any typechecking, but we do pass it along to our build process so things likecompilerOptions.paths
get resolved correctly.#665
62a89c6
Thanks @caass! - fix: validate that bindings have unique namesWe don't want to have, for example, a KV namespace named "DATA"
and a Durable Object also named "DATA". Then it would be ambiguous
what exactly would live at
env.DATA
(or in the case of service workers,the
DATA
global) which could lead to unexpected behavior -- and errors.Similarly, we don't want to have multiple resources of the same type
bound to the same name. If you've been working with some KV namespace
called "DATA", and you add a second namespace but don't change the binding
to something else (maybe you're copying-and-pasting and just changed out the
id
),you could be reading entirely the wrong stuff out of your KV store.
So now we check for those sorts of situations and throw an error if
we find that we've encountered one.
#698
e3e3243
Thanks @threepointone! - feat: injectprocess.env.NODE_ENV
into scriptsAn extremely common pattern in the js ecosystem is to add additional behaviour gated by the value of
process.env.NODE_ENV
. For example, React leverages it heavily to add dev-time checks and warnings/errors, and to load dev/production versions of code. By doing this substitution ourselves, we can get a significant runtime boost in libraries/code that leverage this.This does NOT tackle the additional features of either minification, or proper node compatibility, or injecting wrangler's own environment name, which we will tackle in future PRs.
#680
8e2cbaf
Thanks @JacobMGEvans! - refactor: support backwards compatibility with environment names and related CLI flags--env
and--name
are used together in Legacy Environment, except for Secrets & Tail which are using a special casegetLegacyScriptName
for parity with Wrangler1Fixes 🐛 BUG: Legacy Env
name
computed on publish #672#684
82ec7c2
Thanks @GregBrimble! - fix: Fix--binding
option forwrangler pages dev
.We'd broken this with Fix incorrect parse for env binding #581. This reverts that PR, and fixes it slightly differently. Also added an integration test to ensure we don't regress in the future.
#678
82e4143
Thanks @threepointone! - fix: cleanup afterpages dev
testsWe weren't killing the process started by wrangler whenever its parent was killed. This fix is to listen on SIGINT/SIGTERM and kill that process. I also did some minor configuration cleanups.
Fixes chore: tests in
example-remix-app
leaves a hanging esbuild process #397Fixes pages dev integration tests leave port open #618