Releases: cloudflare/workers-sdk
@cloudflare/pages-shared@0.11.2
Patch Changes
- Updated dependencies [
1b348782
]:- miniflare@3.20231030.2
wrangler@3.17.1
Patch Changes
-
#4474
382ef8f5
Thanks @mrbbot! - fix: open browser to correct url pressingb
in--remote
modeThis change ensures Wrangler doesn't try to open
http://*
when*
is used as the dev server's hostname. Instead, Wrangler will now openhttp://127.0.0.1
. -
#4488
3bd57238
Thanks @RamIdeas! - Changes the default directory for log files to workaround frameworks that are watching the entire.wrangler
directory in the project root for changesAlso includes a fix for commands with
--json
where the log file location message would cause stdout to not be valid JSON. That message now goes to stderr.
wrangler@3.17.0
Minor Changes
-
#4341
d9908743
Thanks @RamIdeas! - Wrangler now writes all logs to a .log file in the.wrangler
directory. Set a directory or specific .log filepath to write logs to withWRANGLER_LOG_PATH=../Desktop/my-logs/
orWRANGLER_LOG_PATH=../Desktop/my-logs/my-log-file.log
. When specifying a directory or using the default location, a filename with a timestamp is used.Wrangler now filters workerd stdout/stderr and marks unactionable messages as debug logs. These debug logs are still observable in the debug log file but will no longer show in the terminal by default without the user setting the env var
WRANGLER_LOG=debug
.
Patch Changes
-
#4469
d5e1966b
Thanks @mrbbot! - fix: report correct line and column numbers when source mapping errors withwrangler dev --remote
-
#4455
1747d215
Thanks @rozenmd! - fix: make it possible to ignore hyperdrive warnings -
#4456
805d5241
Thanks @dario-piotrowicz! - add warnings about ai and verctorize bindings not being supported locally -
#4478
7b54350b
Thanks @penalosa! - Don't log sensitive data to the Wrangler debug log file by default. This includes API request headers and responses. -
Updated dependencies [
be2b9cf5
,d9908743
]:- miniflare@3.20231030.1
miniflare@3.20231030.1
Minor Changes
-
#4348
be2b9cf5
Thanks @mrbbot! - feat: add support for wrapped bindingsThis change adds a new
wrappedBindings
worker option for configuring
workerd
's wrapped bindings.
These allow custom bindings to be written as JavaScript functions accepting an
env
parameter of "inner bindings" and returning the value to bind. For more
details, refer to the API docs. -
#4341
d9908743
Thanks @RamIdeas! - Added ahandleRuntimeStdio
which enables wrangler (or any other direct use of Miniflare) to handle thestdout
andstderr
streams from the workerd child process. By default, if this option is not provided, the previous behaviour is retained which splits the streams into lines and callsconsole.log
/console.error
.
create-cloudflare@2.7.1
Patch Changes
-
#4441
01d34f21
Thanks @dependabot! - C3: Bumpedcreate-svelte
from5.1.1
to5.2.0
-
#4461
fe1e6d8a
Thanks @dependabot! - C3: Bumped@angular/create
from17.0.0-rc.4
to17.0.1
-
#4462
144a431a
Thanks @dependabot! - C3: Bumpedcreate-next-app
from13.4.19
to14.0.3
-
#4292
75c3d4a7
Thanks @dario-piotrowicz! - Only commit the changes if the repository was generated (directly or not) by C3(This follows what CLI tools seems to generally do, avoids weird corner case
behaviors users might have for example when running C3 inside monorepos and avoids commits
when people don't want or expect them)
@cloudflare/pages-shared@0.11.1
create-cloudflare@2.7.0
Minor Changes
- #4280
a6cd9aff
Thanks @alan-agius4! - Update Angular template to use version 17
Patch Changes
- #4399
789491bd
Thanks @petebacondarwin! - ci: move the Angular framework out of the C3 e2e test quarantine.
- #4242
a1c9f43f
Thanks @dependabot! - C3: Bumpednuxi
from3.9.0
to3.9.1
- #4275
e4aff81a
Thanks @dependabot! - C3: Bumpedcreate-astro
from4.3.0
to4.4.1
- #4288
b7d91bb5
Thanks @dependabot! - C3: Bumpedcreate-qwik
from1.2.14
to1.2.15
- #4313
18612851
Thanks @dependabot! - C3: Bumpedgatsby
from5.12.8
to5.12.9
- #4316
3caa7860
Thanks @dependabot! - C3: Bumpedcreate-remix
from2.1.0
to2.2.0
- #4317
db8b5fe5
Thanks @dependabot! - C3: Bumpedcreate-docusaurus
from2.4.3
to3.0.0
- #4334
bde0a1bd
Thanks @dependabot! - C3: Bumpedcreate-qwik
from1.2.15
to1.2.16
- #4335
c1223c53
Thanks @dependabot! - C3: Bumpedcreate-solid
from0.3.8
to0.3.9
- #4346
71eff285
Thanks @dependabot! - C3: Bumpedcreate-qwik
from1.2.16
to1.2.17
- #4431
c0d70bf5
Thanks @dependabot! - C3: Bumpedcreate-astro
from4.4.1
to4.5.1
- #4311
35be4594
Thanks @jculvey! - Changes c3 to usenpx
for running framework creation tools when it is invoked withyarn
. This is
needed since yarn can'tyarn create some-package@some-particular-version
.
- #4226
5810f815
Thanks @jculvey! - Relax empty directory check. Directories containing certain common config files and/or files created by an ide will be exempt from the pre-flight check
- #4249
b18a2c0f
Thanks @dario-piotrowicz! - correct error message for unrecognized application type
- #4403
cb8ec90e
Thanks @petebacondarwin! - test: fix C3 e2e tests for Angular
- #4249
b18a2c0f
Thanks @dario-piotrowicz! - improve help message by adding more detailed descriptions about the various CLI options
also let the user know that more information is available in the Cloudflare docs
- #4339
33bd75dc
Thanks @alan-agius4! - Remove redundant polyfills from the Angular template
@cloudflare/pages-shared@0.11.0
Minor Changes
-
#4051
4578d647
Thanks @taoky! - fix: remove extension name check when generating responseCurrent regex logic to check whether a pathname is a file (has file extension) is causing trouble for some websites, and now ${pathname}/index.html is always checked before returning notFound().
Patch Changes
wrangler@3.16.0
Minor Changes
- #4347
102e15f9
Thanks @Skye-31! - Feat(unstable_dev): Provide an option for unstable_dev to perform the check that prompts users to update wrangler, defaulting to false. This will prevent unstable_dev from sending a request to NPM on startup to determine whether it needs to be updated.
-
#4179
dd270d00
Thanks @matthewdavidrodgers! - Simplify secret:bulk api via script settingsFiring PUTs to the secret api in parallel has never been a great solution - each request independently needs to lock the script, so running in parallel is at best just as bad as running serially.
Luckily, we have the script settings PATCH api now, which can update the settings for a script (including secret bindings) at once, which means we don't need any parallelization. However this api doesn't work with a partial list of bindings, so we have to fetch the current bindings and merge in with the new secrets before PATCHing. We can however just omit the value of the binding (i.e. only provide the name and type) which instructs the config service to inherit the existing value, which simplifies this as well. Note that we don't use the bindings in your current wrangler.toml, as you could be in a draft state, and it makes sense as a user that a bulk secrets update won't update anything else. Instead, we use script settings api again to fetch the current state of your bindings.
This simplified implementation means the operation can only fail or succeed, rather than succeeding in updating some secrets but failing for others. In order to not introduce breaking changes for logging output, the language around "${x} secrets were updated" or "${x} secrets failed" is kept, even if it doesn't make much sense anymore.
Patch Changes
-
#4402
baa76e77
Thanks @rozenmd! - This PR adds a fetch handler that usespage
, assumingresult_info
provided by the endpoint containspage
,per_page
, andtotal
This is needed as the existing
fetchListResult
handler for fetching potentially paginated results doesn't work for endpoints that don't implementcursor
.Fixes #4349
-
#4337
6c8f41f8
Thanks @Skye-31! - Improve the error message when a script isn't exported a Durable Object classPreviously, wrangler would error with a message like
Uncaught TypeError: Class extends value undefined is not a constructor or null
. This improves that messaging to be more understandable to users.
- #4307
7fbe1937
Thanks @jspspike! - Change local dev server default ip to*
instead of0.0.0.0
. This will cause the dev server to listen on both ipv4 and ipv6 interfaces
- #4222
f867e01c
Thanks @tmthecoder! - Support for hyperdrive bindings in local wrangler dev
- #4219
0453b447
Thanks @maxwellpeterson! - Allows uploads with both cron triggers and smart placement enabled
miniflare@3.20231030.0
Minor Changes
-
#4324
16cc2e92
Thanks @penalosa! - Update to latestworkerd@1.20231030.0
-
#4322
8a25b7fb
Thanks @dario-piotrowicz! - addunsafeEvalBinding
optionAdd option to leverage the newly introduced
UnsafeEval
workerd binding API,
such API is used to evaluate javascript code at runtime via the providedeval
andnewFunction
methods.The API, for security reasons (as per the workers docs), is not to be use in production but it is intended for local purposes only such as local testing.
To use the binding you need to specify a string value for the
unsafeEvalBinding
, such will be the name of theUnsafeEval
bindings that will be made available in the workerd runtime.For example the following code shows how to set the binding with the
UNSAFE_EVAL
name and evaluate the1+1
string:const mf = new Miniflare({ log, modules: true, script: ` export default { fetch(req, env, ctx) { const two = env.UNSAFE_EVAL.eval('1+1'); return new Response('two = ' + two); // returns 'two = 2' } } `, unsafeEvalBinding: "UNSAFE_EVAL", });
Patch Changes
-
#4397
4f8b3420
Thanks @mrbbot! - fix: rejectMiniflare#ready
promise ifMiniflare#dispose()
called while waiting -
#4428
3637d97a
Thanks @mrbbot! - fix: addminiflare
bin
entryMiniflare 3 doesn't include a CLI anymore, but should log a useful error stating this when running
npx miniflare
. We had a script for this, but it wasn't correctly hooked up. 🤦 This change makes sure the requiredbin
entry exists. -
#4321
29a59d4e
Thanks @mrbbot! - fix: ensureMutex
doesn't report itself as drained if lockedPreviously, Miniflare's
Mutex
implementation would report itself as drained
if there were no waiters, regardless of the locked state. This bug meant that
if you called but didn'tawait
Miniflare#setOptions()
, future calls to
Miniflare#dispatchFetch()
(or any other asynchronousMiniflare
method)
wouldn't wait for the options update to apply and the runtime to restart before
sending requests. This change ensures we wait until the mutex is unlocked before
reporting it as drained. -
#4307
7fbe1937
Thanks @jspspike! - Only output ipv4 addresses when starting -
#4400
76787861
Thanks @mrbbot! - fix: cleanup temporary directory after shutting downworkerd
Previously on exit, Miniflare would attempt to remove its temporary directory
before shutting downworkerd
. This could lead toEBUSY
errors on Windows.
This change ensures we shutdownworkerd
before removing the directory.
Since we can only clean up on a best effort basis when exiting, it also catches
any errors thrown when removing the directory, in case the runtime doesn't
shutdown fast enough.