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.17
Patch Changes
#414
f30426f
Thanks @petebacondarwin! - fix: supportbuild.upload.dir
when usingbuild.upload.main
Although,
build.upload.dir
is deprecated, we should still support using it when the entry-point is being defined by thebuild.upload.main
and the format ismodules
.Fixes 🐛 BUG:
[build.upload.dir]
not respected when resolvingbuild.upload.main
#413#447
2c5c934
Thanks @threepointone! - fix: Config should be resolved relative to the entrypointDuring
dev
andpublish
, we should resolvewrangler.toml
starting from the entrypoint, and then working up from there. Currently, we start from the directory from which we callwrangler
, this changes that behaviour to start from the entrypoint instead.(To implement this, I made one big change: Inside commands, we now have to explicitly read configuration from a path, instead of expecting it to 'arrive' coerced into a configuration object.)
#472
804523a
Thanks @JacobMGEvans! - bugfix: Replace.destroy()
onfaye-websockets
with.close()
added: Interface to give faye same types as compliant
ws
with additional.pipe()
implementation;.on("message" => fn)
#462
a173c80
Thanks @caass! - Add filtering to wrangler tail, so you can nowwrangler tail <name> --status ok
, for example. Supported options:--status cancelled --status error
--> you can filter onok
,error
, andcancelled
to only tail logs that have that status--header X-CUSTOM-HEADER:somevalue
--> you can filter on headers, including ones that have specific values ("somevalue"
) or just that contain any header (e.g.--header X-CUSTOM-HEADER
with no colon)--method POST --method PUT
--> filter on the HTTP method used to trigger the worker--search catch-this
--> only shows messages that contain the phrase"catch-this"
. Does not (yet!) support regular expressions--ip self --ip 192.0.2.232
--> only show logs from requests that originate from the given IP addresses."self"
will be replaced with the IP address of the computer that sent the tail request.#471
21cde50
Thanks @caass! - Add tests for wrangler tail:#398
40d9553
Thanks @threepointone! - feat: guess-worker-formatThis formalises the logic we use to "guess"/infer what a worker's format is - either "modules" or "service worker". Previously we were using the output of the esbuild process metafile to infer this, we now explicitly do so in a separate step (esbuild's so fast that it doesn't have any apparent performance hit, but we also do a simpler form of the build to get this information).
This also adds
--format
as a command line arg forpublish
.#438
64d62be
Thanks @Electroid! - feat: Add support for "json" bindingsDid you know? We have support for "json" bindings! Here are a few examples:
[vars]
text = "plain ol' string"
count = 1
complex = { enabled = true, id = 123 }
#422
ef13735
Thanks @threepointone! - chore: renameopen-in-brower.ts
toopen-in-browser.ts
#411
a52f0e0
Thanks @ObsidianMinor! - feat: unsafe-bindingsAdds support for "unsafe bindings", that is, bindings that aren't supported by wrangler, but are
desired when uploading a Worker to Cloudflare. This allows you to use beta features before
official support is added to wrangler, while also letting you migrate to proper support for the
feature when desired. Note: these bindings may not work everywhere, and may break at any time.
#415
d826f5a
Thanks @threepointone! - fix: don't crash when browser windows don't openWe open browser windows for a few things; during
wrangler dev
, and logging in. There are environments where this doesn't work as expected (like codespaces, stackblitz, etc). This fix simply logs an error instead of breaking the flow. This is the same fix as Fix silent failure when browser open doesn't work #263, now applied to the rest of wrangler.91d8994
Thanks @Mexican-Man! - fix: do not merge routes with different methods when computing pages routesFixes
wrangler pages dev
404s some functions/routes #92#474
bfedc58
Thanks @JacobMGEvans! - bugfix: createreporting.toml
file in "wrangler/config" and move error reporting user decisions to newreporting.toml
#445
d5935e7
Thanks @threepointone! - chore: removeexperimental_services
from configurationNow that we have
[[unsafe.bindings]]
(as of feat: support for raw "unsafe bindings" #411), we should use that for experimental features. This removes support for[experimental_services]
, and adds a helpful message for how to rewrite their configuration.This error is temporary, until the internal teams that were using this rewrite their configs. We'll remove it before GA.
What the error looks like -
#456
b5f42c5
Thanks @threepointone! - chore: enablestrict
intsconfig.json
In the march towards full strictness, this enables
strict
intsconfig.json
and fixes the errors it pops up. A changeset is included because there are some subtle code changes, and we should leave a trail for them.#408
14098af
Thanks @mrbbot! - Upgrademiniflare
to2.3.0
#448
b72a111
Thanks @JacobMGEvans! - feat: add--yes
with alias--y
flag as automatic answer to all prompts and runwrangler init
non-interactively.generated during setup:
@cloudflare/workers-types
#403
f9fef8f
Thanks @JacobMGEvans! - feat: add scripts to package.json & autogenerate name value when initializing a projectTo get wrangler init projects up and running with good ergonomics for deploying and development,
added default scripts "start" & "deploy" with assumed TS or JS files in generated ./src/index.
The name property is now derived from user input on
init <name>
or parent directory if no input is provided.#452
1cf6701
Thanks @petebacondarwin! - feat: add support for publishing workers with r2 bucket bindingsThis change adds the ability to define bindings in your
wrangler.toml
filefor R2 buckets. These buckets will then be available in the environment
passed to the worker at runtime.
Closes
r2
bucket support #365#458
a8f97e5
Thanks @petebacondarwin! - fix: do not publish to workers.dev if workers_dev is falsePreviously we always published to the workers.dev subdomain, ignoring the
workers_dev
setting in thewrangler.toml
configuration.Now we respect this configuration setting, and also disable an current workers.dev subdomain worker when we publish and
workers_dev
isfalse
.Fixes 🐛 BUG: Disabling workers dev domain doesn't work #410
#457
b249e6f
Thanks @threepointone! - fix: don't report intentional errorsWe shouldn't be reporting intentional errors, only exceptions. This removes reporting for all caught errors for now, until we filter all known errors, and then bring back reporting for unknown errors. We also remove a stray
console.warn()
.#402
5a9bb1d
Thanks @JacobMGEvans! - feat: Added Wrangler TOML fieldsAdditional field to get projects ready to publish as soon as possible.
It will check if the Worker is named, if not then it defaults to using the parent directory name.
#227
97e15f5
Thanks @JacobMGEvans! - feature: Sentry IntegrationTop level exception logging which will allow to Pre-empt issues, fix bugs faster,
Identify uncommon error scenarios, and better quality error information. Context includes of Error in addition to stacktrace
Environment:
OS/arch
node/npm versions
wrangler version
RewriteFrames relative pathing of stacktrace and will prevent user file system information
from being sent.
Sourcemaps:
Sentry upload moved after changeset version bump script and npm script to get current version into GH env variable
Prompt for Opt-In:
will be added to default.toml with a datetime property for future update checks.
Sentry Tests:
The tests currently check that the decision flow works as currently set up then checks if Sentry is able
to send events or is disabled.
#427
bce731a
Thanks @petebacondarwin! - refactor: share worker bundling between bothpublish
anddev
commandsThis changes moves the code that does the esbuild bundling into a shared file
and updates the
publish
anddev
to use it, rather than duplicating thebehaviour.
See chore: consolidate
dev
andpublish
implementations #396Resolves Add deprecation warning when trying to run commands without explicit entrypoint #401
#458
c0cfd60
Thanks @petebacondarwin! - fix: pass correct query param when uploading a scriptIn f9c1423 the query param was incorrectly changed from
available_on_subdomain
toavailable_on_subdomains
.#432
78acd24
Thanks @threepointone! - feat: import.wasm
modules in service worker format workersThis allows importing
.wasm
modules in service worker format workers. We do this by hijacking imports to.wasm
modules, and instead registering them under[wasm_modules]
(building on the work from feat: support[wasm_modules]
for service-worker format workers #409).#409
f8bb523
Thanks @threepointone! - feat: support[wasm_modules]
for service-worker format workersThis lands support for
[wasm_modules]
as defined by Module upload format + custom build commands + durable object support wrangler-legacy#1677.wasm modules can be defined in service-worker format with configuration in wrangler.toml as -
The module will then be available as the global
MYWASM
inside your code. Note that this ONLY makes sense in service-worker format workers (for now).(In the future, we MAY enable wasm module imports in service-worker format (i.e.
import MYWASM from './path/to/my-wasm.wasm'
) and global imports inside modules format workers.)#423
dd9058d
Thanks @petebacondarwin! - feat: add support for managing R2 bucketsThis change introduces three new commands, which manage buckets under the current account:
r2 buckets list
: list information about all the buckets.r2 buckets create
: create a new bucket - will error if the bucket already exists.r2 buckets delete
: delete a bucket.This brings Wrangler 2 inline with the same features in Wrangler 1.
#455
80aa106
Thanks @threepointone! - fix: error when entry doesn't existThis adds an error when we use an entry point that doesn't exist, either for
wrangler dev
orwrangler publish
, and either via cli arg orbuild.upload.main
inwrangler.toml
. By using a common abstraction fordev
andpublish
, This also adds support for usingbuild.config.main
/build.config.dir
forwrangler dev
.[build.upload.main]
/[build.upload.dir]
inwrangler dev
#418