new config miniflare attempt 3 - #14994
Conversation
🦋 Changeset detectedLatest commit: 1c14de0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
UnknownError: ProviderInitError |
|
@emily-shen Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
|
|
| entrypoint: z.string().optional(), | ||
| props: z.record(z.string(), z.unknown()).optional(), |
There was a problem hiding this comment.
entrypoint and props were on this in the old miniflare config, and used, but i don't see any public mention of this and it isn't in any user facing config
|
|
||
| const MiniflareWorkflowBindingSchema = z.strictObject({ | ||
| type: z.literal("workflow"), | ||
| name: z.string(), |
There was a problem hiding this comment.
TODO: remove name and compat flag from the binding config.
compat flag was due to old plugin config isolation, it needs the user workers compat flags
| // The miniflare-extended schemas below replace these base `@cloudflare/config` | ||
| // binding schemas (which have optional `id`/`name`) with variants that require | ||
| // those fields. | ||
| const OVERRIDDEN_BASE_BINDING_SCHEMAS = [ |
There was a problem hiding this comment.
below is a bunch of horrible stuff just to make id required in miniflare. couldn't figure out a better way
17612e4 to
1c14de0
Compare
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
Config:
All plugins now get the full config, and are responsible for filtering down the relevant config themselves - previously miniflare plugins each declared a schema of what config it needed, and then each plugin would only receive that.
There is probably a lot of tidying up we can do in miniflare to strip out more unused bits, but trying to avoid too much in this PR.
A large chunk of the diff is in tests, where we call
new Miniflarea lot. Inside miniflare this is migrated to the new config directly, outside miniflare we use the conversion helper.As discussed the v4 to v5 conversion happens right before passing options to miniflare, meaning the new config format is not exposed in any public APIs (well other than miniflare's obviously).
A picture of a cute animal (not mandatory, but encouraged)