feat(wrangler): Support disabling state persistence in unstable_startWorker()#12815
feat(wrangler): Support disabling state persistence in unstable_startWorker()#12815
unstable_startWorker()#12815Conversation
|
✅ All changesets look good |
unstable_startWorker()unstable_startWorker()
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
|
OK so it's re-exported as Now let me think about whether there are any actual issues with this PR:
Everything looks correct. The types, the runtime behavior, the tests, and the changeset all align properly. The implementation is clean and handles all edge cases. LGTM |
🦋 Changeset detectedLatest commit: 0adc313 The changes in this PR will be included in the next version bump. 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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
petebacondarwin
left a comment
There was a problem hiding this comment.
Can we ditch the null option and just have string|false?
I think that would be clearer for the user, and simpler to implement.
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Fixes #3652.
As mentioned in the issue above, a nice QoL improvement would be having the ability to disable persistence entirely, which is especially helpful when running tests. This change adds support to both
startWorker()andunstable_dev()to be able to set thepersistoption tofalseornull.Note
This only applies to state persistence.
.wrangler/tmpwill still be required for module bundling.startWorker()is still marked as "unstable" in the docs so individual property documentation has not been added yet.A picture of a cute animal (not mandatory, but encouraged)