refactor(wrangler): switch getPlatformProxy() to use Miniflare's dev registry implementation#10060
refactor(wrangler): switch getPlatformProxy() to use Miniflare's dev registry implementation#10060edmundhung merged 3 commits intomainfrom
getPlatformProxy() to use Miniflare's dev registry implementation#10060Conversation
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: |
🦋 Changeset detectedLatest commit: 88c583b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
21a2b9e to
e6ee2b6
Compare
82f443f to
7a47644
Compare
getPlatformProxy() to use Miniflare's dev registry implementation
4418341 to
bedb0c5
Compare
| async function setupPlatformProxy(config: string, devRegistryPath?: string) { | ||
| vi.stubEnv("WRANGLER_REGISTRY_PATH", devRegistryPath); | ||
| try { | ||
| // @ts-expect-error It works |
There was a problem hiding this comment.
Hmm. Can we have a more accurate comment here?
Is it that TS complains that the import will have type any?
There was a problem hiding this comment.
haha 😅 I wrote this when I am trying very hard to figure out the deadlock issue.
Fixed in 88c583b
| return proxy; | ||
| } finally { | ||
| // Unset the environment variable to avoid affecting other tests | ||
| vi.stubEnv("WRANGLER_REGISTRY_PATH", undefined); |
There was a problem hiding this comment.
Shouldn't stub env automatically revert the change?
There was a problem hiding this comment.
Or if not, perhaps call vi.unstubAllEnvs() in the onTestFinished() hook
There was a problem hiding this comment.
Called vi.unstubAllEnvs() in the onTestFinished() hook in 88c583b
|
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the Depending on your changes, running Notes:
|
Fixes DEVX-2122