-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version Packages #5006
Version Packages #5006
Conversation
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-wrangler-5006 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5006/npm-package-wrangler-5006 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-wrangler-5006 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-create-cloudflare-5006 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-cloudflare-kv-asset-handler-5006 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-miniflare-5006 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-cloudflare-pages-shared-5006 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7935024366/npm-package-cloudflare-vitest-pool-workers-5006 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5006 +/- ##
==========================================
+ Coverage 70.33% 70.37% +0.04%
==========================================
Files 297 297
Lines 15458 15458
Branches 3966 3966
==========================================
+ Hits 10872 10879 +7
+ Misses 4586 4579 -7 |
b680a67
to
c245065
Compare
b224d77
to
5f09083
Compare
5f09083
to
9ed4a58
Compare
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
create-cloudflare@2.12.0
Minor Changes
#4996
246512c8
Thanks @jculvey! - feature: AddgetBindingsProxy
support tonuxt
template vianitro-cloudflare-dev
module.The
nuxt
template now uses the default dev command fromcreate-nuxt
instead of usingwrangler pages dev
on build output in order to improve the developer workflow.nitro-cloudflare-dev
is a nitro module that leveragesgetBindingsProxy
and allows bindings to work in nitro commands.#5027
a751489f
Thanks @jculvey! - feature: Improve bindings support in Svelte template.C3 will now create Svelte projects with a hook that uses
getPlatformProxy
to proxy bindings in development mode. Awrangler.toml
file will also be added where bindings can be added to be used in conjunction withgetPlatformProxy
.Along with this change, projects will use the default vite-based dev command from
create-svelte
instead of usingwrangler pages dev
on build output.When Typescript is used, the
app.d.ts
will be updated to add type definitions forcf
andctx
to thePlatform
interface from the@cloudflare/workers-types
package. Types for bindings onplatform.env
can be re-generated with a newly addedbuild-cf-types
script.Patch Changes
#5001
efe8b444
Thanks @dependabot! - chore: Bumpedcreate-hono
from0.3.2
to0.4.0
#5011
89482d44
Thanks @dependabot! - chore: Bumpedcreate-qwik
from1.4.4
to1.4.5
#5019
f939ed73
Thanks @dependabot! - chore: Bumped@angular/create
from17.1.3
to17.2.0
#5020
0e74c743
Thanks @dependabot! - chore: Bumpednuxi
from3.10.0
to3.10.1
#5021
ae1ef47c
Thanks @dependabot! - chore: Bumpedcreate-astro
from4.7.2
to4.7.3
#5009
1e263694
Thanks @dario-piotrowicz! - chore: update Next.js templateUpdate the C3 Next.js template so that it uses the latest
@cloudflare/next-on-pages
tooling (i.e.setupDevPlatform
andgetRequestContext
)#4996
246512c8
Thanks @jculvey! - feature: Add an emptywrangler.toml
file to qwik and nuxt templates.#4999
ce6d4bc4
Thanks @dario-piotrowicz! - fix: make sure not to wrongly ask users if they want to use typescriptcurrently if a CLI invoked by C3 asks the user if they want to use
typescript and the user opted out of it, C3 could actually again offer
typescript to the user afterwords, make sure that this does not happen
#5010
9f787042
Thanks @dario-piotrowicz! - chore: update qwik template to usegetPlatformProxy
update the C3 Qwik template to use the
getPlatformProxy
utility instead of the deprecatedgetBindingsProxy
oneminiflare@3.20240129.3
Minor Changes
#4795
027f9719
Thanks @mrbbot! - feat: passMiniflare
instance as argument to custom service binding handlersThis change adds a new
Miniflare
-typed parameter to function-valued service binding handlers. This provides easy access to the correct bindings when re-using service functions across instances.#4795
027f9719
Thanks @mrbbot! - feat: allowURL
s to be passed inhyperdrives
Previously, the
hyperdrives
option only acceptedstring
s as connection strings. This change allowsURL
objects to be passed too.#4795
027f9719
Thanks @mrbbot! - feat: add support for custom root pathsMiniflare has lots of file-path-valued options (e.g.
scriptPath
,kvPersist
,textBlobBindings
). Previously, these were always resolved relative to the current working directory before being used. This change adds a newrootPath
shared, and per-worker option for customising this behaviour. Instead of resolving relative to the current working directory, Miniflare will now resolve path-valued options relative to the closestrootPath
option. Paths are still resolved relative to the current working directory if norootPath
s are defined. Worker-levelrootPath
s are themselves resolved relative to the sharedrootPath
if defined.#4795
027f9719
Thanks @mrbbot! - feat: allow easy binding to current workerPreviously, if you wanted to create a service binding to the current Worker, you'd need to know the Worker's name. This is usually possible, but can get tricky when dealing with many Workers. This change adds a new
kCurrentWorker
symbol that can be used instead of a Worker name inserviceBindings
.kCurrentWorker
always points to the Worker with the binding.Patch Changes
#4954
7723ac17
Thanks @mrbbot! - fix: allow relativescriptPath
/modulesRoot
s to break out of current working directoryPreviously, Miniflare would resolve relative
scriptPath
s againstmoduleRoot
multiple times resulting in incorrect paths and module names. This would lead tocan't use ".." to break out of starting directory
workerd
errors. This change ensures Miniflare usesscriptPath
as is, and only resolves it relative tomodulesRoot
when computing module names. Note this bug didn't affect service workers. This allows you to reference a modulesscriptPath
outside the working directory with something like:Fixes 🐛 BUG: "can't use ".." to break out of starting directory" when using Service Bindings in monorepo #4721
#4795
027f9719
Thanks @mrbbot! - fix: return non-WebSocket responses for failed WebSocket upgradingfetch()
esPreviously, Miniflare's
fetch()
would throw an error if theUpgrade: websocket
header was set, and a non-WebSocket response was returned from the origin. This change ensures the non-WebSocket response is returned fromfetch()
instead, withwebSocket
set tonull
. This allows the caller to handle the response as they see fit.#4795
027f9719
Thanks @mrbbot! - fix: ensureMiniflareOptions
,WorkerOptions
, andSharedOptions
types are correctMiniflare uses Zod for validating options. Previously, Miniflare inferred
*Options
from the output types of its Zod schemas, rather than the input types. In most cases, these were the same. However, thehyperdrives
option has different input/output types, preventing these from being type checked correctly.@cloudflare/pages-shared@0.11.13
Patch Changes
7723ac17
,027f9719
,027f9719
,027f9719
,027f9719
,027f9719
,027f9719
]:wrangler@3.28.3
Patch Changes
#5026
04584722
Thanks @dario-piotrowicz! - fix: make suregetPlatformProxy
produces a production-likecaches
objectmake sure that the
caches
object returned togetPlatformProxy
behavesin the same manner as the one present in production (where calling unsupported
methods throws a helpful error message)
note: make sure that the unsupported methods are however not included in the
CacheStorage
type definition#5030
55ea0721
Thanks @mrbbot! - fix: don't suggest reporting user errors to GitHubWrangler has two different types of errors: internal errors caused by something going wrong, and user errors caused by an invalid configuration. Previously, we would encourage users to submit bug reports for user errors, even though there's nothing we can do to fix them. This change ensures we only suggest this for internal errors.
#4900
3389f2e9
Thanks @OilyLime! - feature: allow hyperdrive users to set local connection string as environment variableWrangler dev now supports the HYPERDRIVE_LOCAL_CONNECTION_STRING environmental variable for connecting to a local database instance when testing Hyperdrive in local development. This environmental variable takes precedence over the localConnectionString set in wrangler.toml.
#5033
b1ace91b
Thanks @mrbbot! - fix: wait for actual port before opening browser with--port=0
Previously, running
wrangler dev --remote --port=0
and then immediately pressingb
would openlocalhost:0
in your default browser. This change queues up opening the browser until Wrangler knows the port the dev server was started on.#5026
04584722
Thanks @dario-piotrowicz! - fix: relax thegetPlatformProxy
's' cache request/response typesprior to these changes the caches obtained from
getPlatformProxy
would use
unknown
s as their types, this proved too restrictiveand incompatible with the equivalent
@cloudflare/workers-types
types, we decided to use
any
s instead to allow for more flexibilitywhilst also making the type compatible with workers-types
Updated dependencies [
7723ac17
,027f9719
,027f9719
,027f9719
,027f9719
,027f9719
,027f9719
]:@cloudflare/vitest-pool-workers@0.0.2
Patch Changes
7723ac17
,027f9719
,027f9719
,027f9719
,027f9719
,027f9719
,027f9719
]: