Repository navigation
[vitest-plugin] Remove wrangler dependency - #16174
Conversation
🦋 Changeset detectedLatest commit: 727fc6d 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 |
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
6731b05 to
3719898
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
There was a problem hiding this comment.
Superseded by the review of
401c5751.
This review, of 5238c830
💬 Approved with comments — The extraction into workers-utils and deploy-helpers looks behaviourally equivalent, and Wrangler's unstable_* APIs are kept. Only four non-blocking INFO notes remain from the last review.
Findings: 4 info
Not opened by the correctness review: 1 changed file it was meant to read
packages/wrangler/src/api/integrations/platform/index.ts
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
📋 Code Quality: 💬 4 info
No new issues. The platform/index.ts wrapper change is correct, and four earlier INFO notes remain open.
Recommendation: 💬 Optional Nits
- [INFO] Before init, the default logger drops debug output, so Wrangler's early
.envload diagnostics are lost. (packages/deploy-helpers/src/shared/context.ts:24) - [INFO] The static import of
miniflare-optionsmakes every plugin user load the heavy assets and containers modules, even withoutwrangleroptions. (packages/vitest-plugin/src/pool/config.ts:4) - [INFO]
pages-assets.tsis excluded from type checking, and its exported types live in a hand-maintained duplicate. (packages/deploy-helpers/tsconfig.json:14) - [INFO] The new public
readConfighas no tests in workers-utils, the package that owns it. (packages/workers-utils/src/config/read-config.ts:21)
View full review
The new unstable_getVarsForDev wrapper matches the signature of the shared getVarsForDev. unstable_getMiniflareWorkerOptions now just calls the shared getMiniflareWorkerOptions. The four earlier notes still apply because their code has not changed:
- Lost debug output: Wrangler's early
.envload runs before the deploy-helpers context is initialised, so its debug diagnostics never reach Wrangler's logger. - Eager loading: the Vitest plugin now always loads the
miniflare-optionsmodule, even when thewrangleroption is not set. - No type checking for
pages-assets.ts: the file is excluded from type checking, and its exported types live in a hand-maintained copy. - Untested
readConfig: the new public function has no tests in workers-utils.
✅ All other checks passed
🚀 Release: ✅ LGTM
The changesets cover the Vitest plugin's dependency removal and the new shared helper entry points. Release risk is medium because configuration parsing and the Miniflare and Pages development helpers have moved into shared packages that both Wrangler and the Vitest plugin use.
🔒 Security: ✅ LGTM
This is a refactor that moves existing helpers into shared packages. It adds no new security surface.
📖 AGENTS.md: ✅ LGTM
The packages/vitest-plugin/AGENTS.md update is consistent with the change.
⚡ Performance: ✅ LGTM
No performance issues found.
📝 Documentation: ✅ LGTM
No documentation issues found.
Reviewed commit: 5238c830
There was a problem hiding this comment.
Superseded by the review of
c8cc84f6.
This review, of 60ec0cf2
💬 Approved with comments — The refactor looks behaviourally equivalent, and the pool-scoped logger fix in this round is correct. One INFO note from the last review is still open: readConfig warnings go to the raw console instead of the pool logger.
Findings: 1 info
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
📋 Code Quality: 💬 1 info
One INFO note from the last review is still open: readConfig gets the raw-console logger.
Recommendation: 💬 Optional Nits
- [INFO]
readConfiggets the raw-consoleremoteBindingsLogger, so config warnings skip the pool logger's level filter, prefix and deduplication. (packages/vitest-plugin/src/pool/config.ts:751)
View full review
The latest commits create one logger per pool initializer and pass it through CloudflarePoolWorker into parseProjectOptions(). Warning deduplication is now scoped to each pool, and the new tests cover both deduplication and re-emission.
One note from the last review is still open:
packages/vitest-plugin/src/pool/config.ts:751:readConfigis called with{ logger: remoteBindingsLogger }, which forwards straight toconsole. Config validation warnings and the redirected-config notice therefore skip the pool logger's level filter, prefix andoncededuplication.developmentLoggeris already in scope and is passed tosetDeployHelpersLoggerat line 796.
The rest checks out:
- Wrangler still initialises the deploy-helpers context on its CLI,
DevEnvand API paths. - The
.envearly logging is preserved through the injected logger. - The tsup aliases cover the new entry points.
- The removed
miniflare-cli/assetshas no remaining references.
✅ All other checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. Configuration parsing and the local-development helpers move into shared packages that both Wrangler and the Vitest plugin use. The impact is on local development and test workflows, not deployments.
The changesets cover:
- the new shared entry points;
- the removal of the plugin's
wranglerdependency, including the requirement that projects using the CLI declarewranglerthemselves.
🔒 Security: ✅ LGTM
This pull request moves existing helpers into shared packages and re-exports them from Wrangler. It adds no new inputs, trust boundaries, command execution or credential handling.
📖 AGENTS.md: ✅ LGTM
The packages/vitest-plugin/AGENTS.md update matches the change.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers are still loaded lazily.
📝 Documentation: ✅ LGTM
No documentation issues found.
Reviewed commit: 60ec0cf2
There was a problem hiding this comment.
Superseded by the review of
e0f4b86e.
This review, of c8cc84f6
✅ Approved — The last open note is fixed: config diagnostics now go through the pool-scoped logger, and a test covers it. No new issues were found.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. Configuration parsing and the local-development helpers move into shared packages that both Wrangler and the Vitest plugin use. The impact is on local development and test workflows, not deployments.
The changesets cover:
- the new shared entry points;
- the removal of the plugin's
wranglerdependency, including the requirement that projects using the CLI declarewranglerthemselves.
🔒 Security: ✅ LGTM
This pull request moves existing helpers into shared packages and re-exports them from Wrangler. It adds no new inputs, trust boundaries, command execution or credential handling.
📖 AGENTS.md: ✅ LGTM
The packages/vitest-plugin/AGENTS.md update matches the change.
📋 Code Quality: ✅ LGTM
readConfig is now called with { logger: developmentLogger.once ?? developmentLogger }. It only calls info and warn, and once provides both. The logger is created once per cloudflarePool() call and passed through CloudflarePoolWorker into parseProjectOptions. Warning history is therefore scoped to each pool, and the tests cover both deduplication and re-emission. The Wrangler wiring and tsup aliases are unchanged and correct.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers are still loaded lazily.
📝 Documentation: ✅ LGTM
No documentation issues found.
Reviewed commit: c8cc84f6
There was a problem hiding this comment.
Superseded by the review of
6ea3c324.
This review, of e0f4b86e
✅ Approved — No issues found at this commit. The new @cloudflare/workers-utils/config entry point keeps every name the root entry exported before, as deprecated aliases, and the internal imports move cleanly to it.
Not opened by the correctness review: 166 changed files it was meant to read
packages/autoconfig/src/details/framework-detection.tspackages/autoconfig/src/details/index.tspackages/autoconfig/src/run.tspackages/autoconfig/src/types.tspackages/codemods/src/codemods/wrangler-to-cf/config-converter.tspackages/codemods/src/codemods/wrangler-to-cf/config-reader.tspackages/config/src/convert.tspackages/containers-shared/src/deploy.tspackages/containers-shared/src/dev-options.tspackages/containers-shared/src/limits.tspackages/deploy-helpers/src/deploy/helpers/assets.tspackages/deploy-helpers/src/deploy/helpers/check-remote-secrets-override.tspackages/deploy-helpers/src/deploy/helpers/check-workflow-conflicts.tspackages/deploy-helpers/src/deploy/helpers/config-diffs.tspackages/deploy-helpers/src/deploy/helpers/confirm-latest-deployment-overwrite.tspackages/deploy-helpers/src/deploy/helpers/container-metadata.tspackages/deploy-helpers/src/deploy/helpers/create-worker-upload-form.tspackages/deploy-helpers/src/deploy/helpers/download-worker-config.tspackages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.tspackages/deploy-helpers/src/deploy/helpers/durable.tspackages/deploy-helpers/src/deploy/helpers/environments.tspackages/deploy-helpers/src/deploy/helpers/exports.tspackages/deploy-helpers/src/deploy/helpers/match-tag.tspackages/deploy-helpers/src/deploy/helpers/owned-workflows.tspackages/deploy-helpers/src/deploy/helpers/placement.tspackages/deploy-helpers/src/deploy/helpers/provision-bindings.tspackages/deploy-helpers/src/deploy/helpers/secrets-validation.tspackages/deploy-helpers/src/deploy/helpers/validate-routes.tspackages/deploy-helpers/src/deploy/helpers/validate-worker-props.tspackages/deploy-helpers/src/deploy/helpers/versions-api.tspackages/deploy-helpers/src/deploy/versions-upload.tspackages/deploy-helpers/src/dev/dev-vars.tspackages/deploy-helpers/src/dev/miniflare-options.tspackages/deploy-helpers/src/preview/api.tspackages/deploy-helpers/src/preview/format.tspackages/deploy-helpers/src/preview/preview.tspackages/deploy-helpers/src/preview/shared.tspackages/deploy-helpers/src/shared/partition-routes.tspackages/deploy-helpers/src/shared/types.tspackages/deploy-helpers/src/triggers/deploy.tspackages/deploy-helpers/src/triggers/email-routing.tspackages/deploy-helpers/src/triggers/publish-routes.tspackages/deploy-helpers/src/triggers/queue-consumers.tspackages/deploy-helpers/src/triggers/subdomain.tspackages/deploy-helpers/src/triggers/zones.tspackages/remote-bindings/src/maybe-start-or-update-session.tspackages/remote-bindings/src/start-remote-proxy-session.tspackages/remote-bindings/src/startDevWorker/types.tspackages/vite-plugin-cloudflare/src/miniflare-options.tspackages/vite-plugin-cloudflare/src/plugins/additional-modules.ts- … and 116 more
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. Configuration parsing and the local-development helpers move into shared packages that both Wrangler and the Vitest plugin use. The impact is on local development and test workflows, not deployments.
The changesets cover:
- the new entry points;
- the deprecated compatibility exports that are kept;
- the removal of the plugin's
wranglerdependency.
🔒 Security: ✅ LGTM
This pull request moves existing helpers into shared packages and changes import paths. It adds no new inputs, trust boundaries or credential handling.
- The Pages asset server's path-containment logic is unchanged.
- The new
deploy-helpersdependencies are the same pinned versions Wrangler already uses.
📖 AGENTS.md: ✅ LGTM
The packages/vitest-plugin/AGENTS.md and packages/workers-utils/AGENTS.md updates match the change.
📋 Code Quality: ✅ LGTM
- Deprecated root exports: the root entry of
@cloudflare/workers-utilsnow re-exports./config/legacy. Every value and type it used to export from the config modules (including all theenvironment.tstypes) has a deprecated alias there that points at the canonical export inconfig/public.ts. - Moved code:
miniflare-options.ts,assets.tsandpages-assets.tsindeploy-helpersmatch the logic they replace in Wrangler. The changes are:- logging through the injected or shared logger, with
logger.onceoptional; readConfigtaking an explicit logger;- narrower config types.
- logging through the injected or shared logger, with
- Wrangler's
readConfigwrapper: it still shows the redirected-config message, throws aUserErroron validation errors and honourshideWarnings. - Logging:
loadDotEnvaccepts a logger for Wrangler's early CLI path. The plugin's pool-scoped logger is wired throughsetDeployHelpersLogger. - Build config: the tsup aliases, the new
deploy-helpersentry points, the external-dependency declarations and the lockfile all agree.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers are still loaded lazily. The import-path changes have no runtime cost.
📝 Documentation: ✅ LGTM
The changesets and the workers-utils README and config guide describe the new entry point, the deprecations and the requirement that projects using the CLI declare wrangler themselves.
Reviewed commit: e0f4b86e
There was a problem hiding this comment.
Superseded by the review of
f49b3648.
This review, of 3fe11343
✅ Approved — The earlier blake3-wasm note is fixed, and no correctness, security, performance, documentation or release issues remain at this commit.
Not opened by the correctness review: 172 changed files it was meant to read
packages/autoconfig/src/details/framework-detection.tspackages/autoconfig/src/details/index.tspackages/autoconfig/src/run.tspackages/autoconfig/src/types.tspackages/codemods/src/codemods/wrangler-to-cf/config-converter.tspackages/codemods/src/codemods/wrangler-to-cf/config-reader.tspackages/config/src/convert.tspackages/containers-shared/src/deploy.tspackages/containers-shared/src/dev-options.tspackages/containers-shared/src/limits.tspackages/deploy-helpers/package.jsonpackages/deploy-helpers/scripts/deps.tspackages/deploy-helpers/src/deploy/helpers/assets.tspackages/deploy-helpers/src/deploy/helpers/check-remote-secrets-override.tspackages/deploy-helpers/src/deploy/helpers/check-workflow-conflicts.tspackages/deploy-helpers/src/deploy/helpers/config-diffs.tspackages/deploy-helpers/src/deploy/helpers/confirm-latest-deployment-overwrite.tspackages/deploy-helpers/src/deploy/helpers/container-metadata.tspackages/deploy-helpers/src/deploy/helpers/create-worker-upload-form.tspackages/deploy-helpers/src/deploy/helpers/download-worker-config.tspackages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.tspackages/deploy-helpers/src/deploy/helpers/durable.tspackages/deploy-helpers/src/deploy/helpers/environments.tspackages/deploy-helpers/src/deploy/helpers/exports.tspackages/deploy-helpers/src/deploy/helpers/hash.tspackages/deploy-helpers/src/deploy/helpers/match-tag.tspackages/deploy-helpers/src/deploy/helpers/owned-workflows.tspackages/deploy-helpers/src/deploy/helpers/placement.tspackages/deploy-helpers/src/deploy/helpers/provision-bindings.tspackages/deploy-helpers/src/deploy/helpers/secrets-validation.tspackages/deploy-helpers/src/deploy/helpers/validate-routes.tspackages/deploy-helpers/src/deploy/helpers/validate-worker-props.tspackages/deploy-helpers/src/deploy/helpers/versions-api.tspackages/deploy-helpers/src/deploy/versions-upload.tspackages/deploy-helpers/src/preview/api.tspackages/deploy-helpers/src/preview/format.tspackages/deploy-helpers/src/preview/preview.tspackages/deploy-helpers/src/preview/shared.tspackages/deploy-helpers/src/shared/context.tspackages/deploy-helpers/src/shared/partition-routes.tspackages/deploy-helpers/src/shared/types.tspackages/deploy-helpers/src/triggers/deploy.tspackages/deploy-helpers/src/triggers/email-routing.tspackages/deploy-helpers/src/triggers/publish-routes.tspackages/deploy-helpers/src/triggers/queue-consumers.tspackages/deploy-helpers/src/triggers/subdomain.tspackages/deploy-helpers/src/triggers/zones.tspackages/deploy-helpers/tsup.config.tspackages/dev-helpers/package.jsonpackages/dev-helpers/scripts/deps.ts- … and 122 more
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium.
Configuration handling and the local-development helpers move into shared packages that both Wrangler and the Vitest plugin use. The changesets cover:
- the new entry points;
- the compatibility aliases that are kept;
- the removal of the plugin's
wranglerdependency.
🔒 Security: ✅ LGTM
This pull request moves existing code and changes import paths. It adds no new inputs, trust boundaries or credential handling. The path-containment check in the Pages asset server is unchanged.
📖 AGENTS.md: ✅ LGTM
The package guidance files match the change.
📋 Code Quality: ✅ LGTM
blake3-wasm(fixed): it is gone frompackages/deploy-helpers/package.json,scripts/deps.ts,tsup.config.tsand the deploy-helpers lockfile importer.hash.tsre-exportshashFilefrom@cloudflare/workers-utils/asset-hash.- Ported Miniflare options:
packages/dev-helpers/src/miniflare-options.tsmatches the code it replaces in Wrangler. The only differences are the injected logger and inlined types. - Wrangler wrappers:
readConfig,getVarsForDev,loadDotEnvandunstable_getMiniflareWorkerOptionskeep their previous behaviour and the upgrade hints. - Wrangler bundle aliases: the aliases in
packages/wrangler/tsup.config.tsare ordered so thedev-helpers/*andworkers-utils/configentry points resolve correctly. - Publish order: the
tools/deploymentstest expectations match the new dependency graph.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers are still loaded only when they are used.
📝 Documentation: ✅ LGTM
The changesets and READMEs cover:
- the new
/configentry point; - the deprecated root aliases;
- the dev-helpers package;
- the requirement that projects using the Wrangler CLI declare
wranglerthemselves.
Reviewed commit: 3fe11343
3fe1134 to
f49b364
Compare
There was a problem hiding this comment.
Superseded by the review of
5655e187.
This review, of f49b3648
✅ Approved — No correctness, security, performance, documentation or release issues remain at this commit. The code changed since the last review moves asset option resolution and hashing into workers-utils without changing behaviour, and the earlier notes are all addressed.
Not opened by the correctness review: 153 changed files it was meant to read
packages/autoconfig/src/details/framework-detection.tspackages/autoconfig/src/details/index.tspackages/autoconfig/src/run.tspackages/autoconfig/src/types.tspackages/codemods/src/codemods/wrangler-to-cf/config-converter.tspackages/codemods/src/codemods/wrangler-to-cf/config-reader.tspackages/config/src/convert.tspackages/containers-shared/src/deploy.tspackages/containers-shared/src/dev-options.tspackages/containers-shared/src/limits.tspackages/deploy-helpers/package.jsonpackages/deploy-helpers/src/deploy/helpers/assets.tspackages/deploy-helpers/src/deploy/helpers/check-remote-secrets-override.tspackages/deploy-helpers/src/deploy/helpers/check-workflow-conflicts.tspackages/deploy-helpers/src/deploy/helpers/config-diffs.tspackages/deploy-helpers/src/deploy/helpers/confirm-latest-deployment-overwrite.tspackages/deploy-helpers/src/deploy/helpers/container-metadata.tspackages/deploy-helpers/src/deploy/helpers/create-worker-upload-form.tspackages/deploy-helpers/src/deploy/helpers/download-worker-config.tspackages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.tspackages/deploy-helpers/src/deploy/helpers/durable.tspackages/deploy-helpers/src/deploy/helpers/environments.tspackages/deploy-helpers/src/deploy/helpers/exports.tspackages/deploy-helpers/src/deploy/helpers/hash.tspackages/deploy-helpers/src/deploy/helpers/match-tag.tspackages/deploy-helpers/src/deploy/helpers/owned-workflows.tspackages/deploy-helpers/src/deploy/helpers/placement.tspackages/deploy-helpers/src/deploy/helpers/provision-bindings.tspackages/deploy-helpers/src/deploy/helpers/secrets-validation.tspackages/deploy-helpers/src/deploy/helpers/validate-routes.tspackages/deploy-helpers/src/deploy/helpers/validate-worker-props.tspackages/deploy-helpers/src/deploy/helpers/versions-api.tspackages/deploy-helpers/src/deploy/versions-upload.tspackages/deploy-helpers/src/preview/api.tspackages/deploy-helpers/src/preview/format.tspackages/deploy-helpers/src/preview/preview.tspackages/deploy-helpers/src/preview/shared.tspackages/deploy-helpers/src/shared/context.tspackages/deploy-helpers/src/shared/partition-routes.tspackages/deploy-helpers/src/shared/types.tspackages/deploy-helpers/src/triggers/deploy.tspackages/deploy-helpers/src/triggers/email-routing.tspackages/deploy-helpers/src/triggers/publish-routes.tspackages/deploy-helpers/src/triggers/queue-consumers.tspackages/deploy-helpers/src/triggers/subdomain.tspackages/deploy-helpers/src/triggers/zones.tspackages/deploy-helpers/tsup.config.tspackages/dev-helpers/package.jsonpackages/dev-helpers/scripts/deps.tspackages/dev-helpers/src/dev-vars.ts- … and 103 more
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. Configuration handling and the local-development helpers move into shared packages that both Wrangler and the Vitest plugin use, and the Vitest plugin no longer depends on wrangler. The changesets cover the affected packages and explain the installation change.
🔒 Security: ✅ LGTM
This pull request moves existing code between packages and changes import paths. It adds no new inputs, trust boundaries or credential handling. The lockfile adds only the workspace dev-helpers package and moves hash-wasm between workspace packages.
📖 AGENTS.md: ✅ LGTM
The package guidance files match the change.
📋 Code Quality: ✅ LGTM
- Asset options:
resolveAssetOptionsandgetAssetsOptionsinpackages/workers-utils/src/config/assets.tsmatch the deploy-helpers code they replace line for line. The router config, therun_worker_firstwarning and error, the_redirects/_headershandling and the asset config are all the same; the only difference is the injected logger. Deploy-helpers now wraps these functions with its own context logger and re-exports the validation helpers and error classes. - Logging:
loadDotEnvaccepts an injected logger, and Wrangler's early.check()middleware passes its own logger, so the.envdebug diagnostics are kept. The Vitest plugin creates one logger per pool initializer, so warnings are deduplicated within a pool and a new pool starts with a fresh history. Both behaviours have tests. - Bundling:
@cloudflare/dev-helpersis bundled into the Vitest plugin and still loaded lazily.workers-utilsexplicitly inlines@cloudflare/workers-sharedfor the new/configand/asset-hashentry points, and a test checks the emitted imports. - Wrangler wrappers:
readConfig,getVarsForDev,loadDotEnv,unstable_getMiniflareWorkerOptionsandunstable_generateASSETSBindingkeep their previous signatures and behaviour, including the config-warning upgrade hints.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers are still loaded only when they are used.
📝 Documentation: ✅ LGTM
The changesets and package READMEs cover the new /config entry point, the deprecated root aliases, the dev-helpers package and the new requirement that projects using the Wrangler CLI declare wrangler themselves.
Reviewed commit: f49b3648
There was a problem hiding this comment.
Superseded by the review of
883e666d.
This review, of 5655e187
✅ Approved — No findings at this commit. Since the last approved review, the changes make @cloudflare/dev-helpers private and add an installed-package test that confirms the plugin loads without wrangler or the helper packages.
Not opened by the correctness review: 127 changed files it was meant to read
packages/autoconfig/src/details/framework-detection.tspackages/autoconfig/src/details/index.tspackages/autoconfig/src/run.tspackages/autoconfig/src/types.tspackages/codemods/src/codemods/wrangler-to-cf/config-converter.tspackages/codemods/src/codemods/wrangler-to-cf/config-reader.tspackages/containers-shared/src/dev-options.tspackages/deploy-helpers/src/deploy/helpers/check-remote-secrets-override.tspackages/deploy-helpers/src/deploy/helpers/check-workflow-conflicts.tspackages/deploy-helpers/src/deploy/helpers/config-diffs.tspackages/deploy-helpers/src/deploy/helpers/confirm-latest-deployment-overwrite.tspackages/deploy-helpers/src/deploy/helpers/create-worker-upload-form.tspackages/deploy-helpers/src/deploy/helpers/download-worker-config.tspackages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.tspackages/deploy-helpers/src/deploy/helpers/durable.tspackages/deploy-helpers/src/deploy/helpers/environments.tspackages/deploy-helpers/src/deploy/helpers/exports.tspackages/deploy-helpers/src/deploy/helpers/owned-workflows.tspackages/deploy-helpers/src/deploy/helpers/placement.tspackages/deploy-helpers/src/deploy/helpers/secrets-validation.tspackages/deploy-helpers/src/deploy/helpers/validate-routes.tspackages/deploy-helpers/src/deploy/helpers/versions-api.tspackages/deploy-helpers/src/deploy/versions-upload.tspackages/deploy-helpers/src/preview/api.tspackages/deploy-helpers/src/preview/format.tspackages/deploy-helpers/src/preview/preview.tspackages/deploy-helpers/src/shared/types.tspackages/deploy-helpers/src/triggers/deploy.tspackages/deploy-helpers/src/triggers/email-routing.tspackages/deploy-helpers/src/triggers/publish-routes.tspackages/deploy-helpers/src/triggers/queue-consumers.tspackages/deploy-helpers/src/triggers/subdomain.tspackages/deploy-helpers/src/triggers/zones.tspackages/dev-helpers/src/pages-assets-types.tspackages/dev-helpers/tsconfig.jsonpackages/dev-helpers/tsconfig.pages-assets.jsonpackages/dev-helpers/turbo.jsonpackages/dev-helpers/vitest.config.mtspackages/remote-bindings/src/maybe-start-or-update-session.tspackages/remote-bindings/src/start-remote-proxy-session.tspackages/remote-bindings/src/startDevWorker/types.tspackages/vite-plugin-cloudflare/src/miniflare-options.tspackages/vite-plugin-cloudflare/src/plugins/additional-modules.tspackages/vite-plugin-cloudflare/src/plugins/shortcuts.tspackages/vite-plugin-cloudflare/src/plugins/tunnel.tspackages/vitest-plugin/src/pool/containers.tspackages/workers-auth/src/wrangler/index.tspackages/wrangler/src/agent-memory/client.tspackages/wrangler/src/ai-search/client.tspackages/wrangler/src/ai/listCatalog.ts- … and 77 more
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. Shared configuration and development helpers that both Wrangler and the Vitest plugin use have moved into shared packages, and the Vitest plugin no longer depends on wrangler. The changesets cover the new /config entry point, the deprecated root aliases, and the requirement that projects using the Wrangler CLI declare wrangler themselves. @cloudflare/dev-helpers is private, so it needs no changeset.
🔒 Security: ✅ LGTM
This pull request moves code between packages and changes import paths. It adds no new inputs, trust boundaries or credential handling. The path-traversal guard in the Pages asset serving code is unchanged.
📖 AGENTS.md: ✅ LGTM
The package guidance files match the change.
📋 Code Quality: ✅ LGTM
The new private dev-helpers package declares its dependencies correctly. The installed-package regression test is a valid check that the plugin loads without wrangler or the helper packages. The Wrangler wrappers keep their previous signatures and their config-warning upgrade hints.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers are still loaded only when they are used.
📝 Documentation: ✅ LGTM
The package READMEs and changesets match the change.
Reviewed commit: 5655e187
5655e18 to
883e666
Compare
There was a problem hiding this comment.
Superseded by the review of
727fc6d7.
This review, of 883e666d
✅ Approved — No findings at this commit. The build moves to tsdown and the helper loaders now take an injected logger, without changing the plugin's behaviour or Wrangler's public APIs.
Not opened by the correctness review: 128 changed files it was meant to read
packages/autoconfig/src/details/framework-detection.tspackages/autoconfig/src/details/index.tspackages/autoconfig/src/run.tspackages/autoconfig/src/types.tspackages/codemods/src/codemods/wrangler-to-cf/config-converter.tspackages/codemods/src/codemods/wrangler-to-cf/config-reader.tspackages/containers-shared/src/dev-options.tspackages/deploy-helpers/src/deploy/helpers/check-remote-secrets-override.tspackages/deploy-helpers/src/deploy/helpers/check-workflow-conflicts.tspackages/deploy-helpers/src/deploy/helpers/config-diffs.tspackages/deploy-helpers/src/deploy/helpers/confirm-latest-deployment-overwrite.tspackages/deploy-helpers/src/deploy/helpers/create-worker-upload-form.tspackages/deploy-helpers/src/deploy/helpers/download-worker-config.tspackages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.tspackages/deploy-helpers/src/deploy/helpers/durable.tspackages/deploy-helpers/src/deploy/helpers/environments.tspackages/deploy-helpers/src/deploy/helpers/exports.tspackages/deploy-helpers/src/deploy/helpers/owned-workflows.tspackages/deploy-helpers/src/deploy/helpers/placement.tspackages/deploy-helpers/src/deploy/helpers/secrets-validation.tspackages/deploy-helpers/src/deploy/helpers/validate-routes.tspackages/deploy-helpers/src/deploy/helpers/versions-api.tspackages/deploy-helpers/src/deploy/versions-upload.tspackages/deploy-helpers/src/preview/api.tspackages/deploy-helpers/src/preview/format.tspackages/deploy-helpers/src/preview/preview.tspackages/deploy-helpers/src/shared/types.tspackages/deploy-helpers/src/triggers/deploy.tspackages/deploy-helpers/src/triggers/email-routing.tspackages/deploy-helpers/src/triggers/publish-routes.tspackages/deploy-helpers/src/triggers/queue-consumers.tspackages/deploy-helpers/src/triggers/subdomain.tspackages/deploy-helpers/src/triggers/zones.tspackages/dev-helpers/src/pages-assets-types.tspackages/dev-helpers/tsconfig.jsonpackages/dev-helpers/tsconfig.pages-assets.jsonpackages/dev-helpers/tsdown.config.tspackages/dev-helpers/turbo.jsonpackages/dev-helpers/vitest.config.mtspackages/remote-bindings/src/maybe-start-or-update-session.tspackages/remote-bindings/src/start-remote-proxy-session.tspackages/remote-bindings/src/startDevWorker/types.tspackages/vite-plugin-cloudflare/src/miniflare-options.tspackages/vite-plugin-cloudflare/src/plugins/additional-modules.tspackages/vite-plugin-cloudflare/src/plugins/shortcuts.tspackages/vite-plugin-cloudflare/src/plugins/tunnel.tspackages/vitest-plugin/src/pool/containers.tspackages/workers-auth/src/wrangler/index.tspackages/wrangler/src/agent-memory/client.tspackages/wrangler/src/ai-search/client.ts- … and 78 more
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
Overall risk: Medium. Shared configuration and development helpers that both Wrangler and the Vitest plugin use have moved into shared packages, and the Vitest plugin no longer depends on wrangler. The changesets cover the workers-utils and Vitest plugin releases, including the requirement that projects using the Wrangler CLI declare wrangler themselves. @cloudflare/dev-helpers is private, so it needs no changeset.
🔒 Security: ✅ LGTM
This change moves code between packages and updates imports. It adds no new inputs, trust boundaries or credential handling. dev-helpers is private and has no install scripts, and the tsdown aliases resolve only to source paths inside the repository.
📖 AGENTS.md: ✅ LGTM
The package guidance files match the change.
📋 Code Quality: ✅ LGTM
The readConfig wrapper, the unstable_* wrappers, the logger injection in loadDotEnv and the tsdown entry and alias setup are all consistent with the previous behaviour. Wrangler no longer depends on @cloudflare/pages-shared or dotenv-expand directly; both now come in through the bundled dev-helpers package.
⚡ Performance: ✅ LGTM
Wrangler config conversion and the Pages asset helpers still load only when they are used.
📝 Documentation: ✅ LGTM
The package READMEs and changesets match the change.
Reviewed commit: 883e666d
Move the helpers the Vitest plugin imported from wrangler into shared packages and import them via granular entry points: - workers-utils: readConfig, d1-splitter - deploy-helpers: dev-vars, miniflare-options, pages-assets Wrangler re-exports these to keep its unstable_* APIs unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
883e666 to
727fc6d
Compare
There was a problem hiding this comment.
✅ Approved — No findings at this commit. The changes since the last review only move imports to the new /config entry point and update the lockfile to match.
Not opened by the correctness review: 127 changed files it was meant to read
packages/autoconfig/src/details/framework-detection.tspackages/autoconfig/src/details/index.tspackages/autoconfig/src/run.tspackages/autoconfig/src/types.tspackages/codemods/src/codemods/wrangler-to-cf/config-converter.tspackages/codemods/src/codemods/wrangler-to-cf/config-reader.tspackages/containers-shared/src/dev-options.tspackages/deploy-helpers/src/deploy/helpers/check-remote-secrets-override.tspackages/deploy-helpers/src/deploy/helpers/check-workflow-conflicts.tspackages/deploy-helpers/src/deploy/helpers/config-diffs.tspackages/deploy-helpers/src/deploy/helpers/confirm-latest-deployment-overwrite.tspackages/deploy-helpers/src/deploy/helpers/create-worker-upload-form.tspackages/deploy-helpers/src/deploy/helpers/download-worker-config.tspackages/deploy-helpers/src/deploy/helpers/durable-object-container-applications.tspackages/deploy-helpers/src/deploy/helpers/durable.tspackages/deploy-helpers/src/deploy/helpers/environments.tspackages/deploy-helpers/src/deploy/helpers/exports.tspackages/deploy-helpers/src/deploy/helpers/owned-workflows.tspackages/deploy-helpers/src/deploy/helpers/placement.tspackages/deploy-helpers/src/deploy/helpers/secrets-validation.tspackages/deploy-helpers/src/deploy/helpers/validate-routes.tspackages/deploy-helpers/src/deploy/helpers/versions-api.tspackages/deploy-helpers/src/deploy/versions-upload.tspackages/deploy-helpers/src/preview/api.tspackages/deploy-helpers/src/preview/format.tspackages/deploy-helpers/src/preview/preview.tspackages/deploy-helpers/src/shared/types.tspackages/deploy-helpers/src/triggers/email-routing.tspackages/deploy-helpers/src/triggers/publish-routes.tspackages/deploy-helpers/src/triggers/queue-consumers.tspackages/deploy-helpers/src/triggers/subdomain.tspackages/deploy-helpers/src/triggers/zones.tspackages/dev-helpers/src/pages-assets-types.tspackages/dev-helpers/tsconfig.jsonpackages/dev-helpers/tsconfig.pages-assets.jsonpackages/dev-helpers/tsdown.config.tspackages/dev-helpers/turbo.jsonpackages/dev-helpers/vitest.config.mtspackages/remote-bindings/src/maybe-start-or-update-session.tspackages/remote-bindings/src/start-remote-proxy-session.tspackages/remote-bindings/src/startDevWorker/types.tspackages/vite-plugin-cloudflare/src/miniflare-options.tspackages/vite-plugin-cloudflare/src/plugins/additional-modules.tspackages/vite-plugin-cloudflare/src/plugins/shortcuts.tspackages/vite-plugin-cloudflare/src/plugins/tunnel.tspackages/vitest-plugin/src/pool/containers.tspackages/workers-auth/src/wrangler/index.tspackages/wrangler/src/agent-memory/client.tspackages/wrangler/src/ai-search/client.tspackages/wrangler/src/ai/listCatalog.ts- … and 77 more
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
The changesets cover the workers-utils and Vitest plugin releases. They include the requirement that projects using the Wrangler CLI declare wrangler themselves. @cloudflare/dev-helpers is private and needs no changeset.
🔒 Security: ✅ LGTM
This change moves code into shared packages and rewrites imports. The Pages asset server keeps its path containment check, and no secrets are logged. It adds no new inputs, trust boundaries or credential handling.
📖 AGENTS.md: ✅ LGTM
The package guidance files match the change.
📋 Code Quality: ✅ LGTM
triggers/deploy.ts, triggers-diff.test.ts and Wrangler's triggers.test.ts only move imports to @cloudflare/workers-utils/config. The shared readConfig, the asset-option delegation, the logger injection in dev-vars/dot-env/miniflare-options, and the per-pool logger in the Vitest plugin all keep the previous behaviour.
⚡ Performance: ✅ LGTM
The Wrangler config conversion and Pages asset helpers still load only when they are used.
📝 Documentation: ✅ LGTM
The package READMEs and changesets match the change.
Reviewed commit: 727fc6d7
petebacondarwin
left a comment
There was a problem hiding this comment.
Codeowners bypass
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
## pnpm-workspace.yaml (default) ## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `@cloudflare/vitest-plugin` | 1.8.5 | 1.9.0 | minor | | `@cloudflare/workers-types` | 5.20261120.1 | 5.20261121.1 | minor | | `miniflare` | 5.20261118.0-beta | 5.20261119.0-beta | minor | | `wrangler` | 4.165.0 | 4.166.0 | minor | ## Release Notes <details> <summary><b>@<!---->cloudflare/vitest-plugin</b> (1.8.5 → 1.9.0)</summary> ### Minor Changes - [#16174](cloudflare/workers-sdk#16174) [`629f135`](cloudflare/workers-sdk@629f135) Thanks [@<!---->james-elicx](https://github.com/james-elicx)! - Remove the dependency on `wrangler` The Vitest plugin no longer depends on `wrangler`. Reading the Wrangler configuration file, generating Miniflare options, loading local variables and serving the Pages `ASSETS` binding now use shared workers-sdk packages that are bundled into the plugin. Installing the plugin no longer installs `wrangler` as well. If your project runs the `wrangler` CLI (for example `wrangler types`), add `wrangler` to your own `devDependencies`. ### Patch Changes - [#17031](cloudflare/workers-sdk#17031) [`95fd4c2`](cloudflare/workers-sdk@95fd4c2) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-19 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17043](cloudflare/workers-sdk#17043) [`4f5b118`](cloudflare/workers-sdk@4f5b118) Thanks [@<!---->petebacondarwin](https://github.com/petebacondarwin)! - Update Undici to 7.30.2 to include upstream security fixes This patch includes six upstream security fixes covering caching, redirects, and Subresource Integrity verification. Update the shared Undici dependency and matching types together so affected packages ship the patched version. - [#17035](cloudflare/workers-sdk#17035) [`1b563db`](cloudflare/workers-sdk@1b563db) Thanks [@<!---->petebacondarwin](https://github.com/petebacondarwin)! - Fix remote bindings authentication with API tokens scoped to an individual Worker Remote …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/%40cloudflare/vitest-plugin%401.9.0) </details> <details> <summary><b>miniflare</b> (5.20261118.0-beta → 5.20261119.0-beta)</summary> ### Minor Changes - [#17016](cloudflare/workers-sdk#17016) [`8f45554`](cloudflare/workers-sdk@8f45554) Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - Add `unsafeIntrospectWorkflow()` and `unsafeIntrospectWorkflowInstance()` for exported Workflows They find a Workflow by its Worker's name and its class name, so code running in Node.js can introspect a Workflow on `ctx.exports` that has no `env` binding: ```ts const introspector = await mf.unsafeIntrospectWorkflow( "my-worker", "MyWorkflow" ); ``` ### Patch Changes - [#17034](cloudflare/workers-sdk#17034) [`8712fc5`](cloudflare/workers-sdk@8712fc5) Thanks [@<!---->petebacondarwin](https://github.com/petebacondarwin)! - Fix Local Explorer access through localhost subdomains Miniflare now trusts `*.localhost` in Host and Origin checks for `/cdn-cgi/` requests. This allows Local Explorer to load through localhost subdomains without returning `403 Invalid Origin header` for its module scripts and API requests. - [#17031](cloudflare/workers-sdk#17031) [`95fd4c2`](cloudflare/workers-sdk@95fd4c2) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-19 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17031](cloudflare/workers-sdk#17031) [`95fd4c2`](cloudflare/workers-sdk@95fd4c2) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" The following dependency versions have been updated: | Dependency | From | To | | ----------------------- …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/miniflare%405.20261119.0-beta) </details> <details> <summary><b>wrangler</b> (4.165.0 → 4.166.0)</summary> ### Minor Changes - [#16961](cloudflare/workers-sdk#16961) [`bf7568a`](cloudflare/workers-sdk@bf7568a) Thanks [@<!---->dario-piotrowicz](https://github.com/dario-piotrowicz)! - Show configured trigger targets during experimental `wrangler triggers deploy --dry-run` Dry runs now print a "Would deploy" summary of routes, custom domains, cron schedules, Queue producers and consumers, Workflows, event triggers, and Email Routing addresses instead of exiting without a summary. Explicitly empty cron schedules and Email Routing addresses are shown as removals. The preview makes no API requests or authentication checks; when workers.dev is enabled, it reports that setting without looking up the account's subdomain. - [#16679](cloudflare/workers-sdk#16679) [`be6aa81`](cloudflare/workers-sdk@be6aa81) Thanks [@<!---->mglewis](https://github.com/mglewis)! - Add `images.url_transformations` to the Wrangler configuration The `images` block now accepts a `url_transformations` object for controlling `/cdn-cgi/image/` transformations on requests served by a Worker. `enabled` is required, and `allowed_origins` optionally lists the origins images may be fetched from (use `["*"]` to allow any origin). `binding` is now optional, so `url_transformations` can be configured without an Images binding: ```jsonc { "images": { "url_transformations": { "enabled": true, "allowed_origins": ["images.example.com"] } } } ``` Like the rest of the `images` block, `url_transformations` is not inherited by named environments, and must be specified in each environment that needs it. `cloudflare.config.ts` gains the equivalent setting as a top-level `images` field on the Worker, with the Images binding remaining in `env`: ```ts export default defineConfig({ worker: { name: "my-worker …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.166.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Fixes #16126.
Installing
@cloudflare/vitest-pluginno longer installswrangler. The plugin reads Wrangler configuration files and creates the PagesASSETSbinding through shared packages, while continuing to loadcloudflare.config.tsdirectly through its existingconfigoption.@cloudflare/workers-utils/configfor configuration reading, discovery, types, validation, editing and binding interpretation, with an explicit logger forreadConfig(). Retain existing root configuration exports as deprecated compatibility aliases with shared runtime and type identity; expose the newreadConfig()only through/config. Migrate internal imports to the new entry point to satisfy the repository’s deprecated-API lint rule.@cloudflare/dev-helpersworkspace package, bundled into Wrangler and the Vitest plugin. It is not published or deployed separately, and its runtime and Node.js declarations are built withtsdown. Keeping Wrangler compatibility here means retiring that support does not require a major Miniflare release. Keep deployment transport indeploy-helpers, with shared asset configuration and hashing inworkers-utils..envdebug logging through logger injection, and pass caller-owned loggers explicitly for configuration and local binding warnings, preserving level filtering and warning deduplication within each pool without a shared logger setter.unstable_*APIs and its config-warning upgrade hints through wrappers around the shared implementations.Projects that use the Wrangler CLI must declare their own
wranglerdependency. The plugin's configuration warnings now use its own logger without Wrangler's upgrade hint. D1 SQL splitting and case-insensitive environment handling already use shared helpers onmainand need no further extraction.Validation:
pnpm checkpassed (209 tasks). Tests passed for the Vitest plugin (178 passed, one skipped), workers-utils (1,385 passed, one skipped), dev helpers (5), deploy helpers (308), Vite plugin (275), focused Wrangler regressions (79 passed, one skipped), the Pages integration example (11) and focused release-tooling tests (91). Isolated consumer checks also pass for Wrangler’s built runtime and declarations and the Vite plugin’s declarations. Coverage includes named environments, injected logging and caller isolation, warning overrides/suppression, redirects and validation errors, runtime/type identity and deprecation annotations in published declarations, and emitted bundles that do not import private asset utilities at runtime. The installed-package regression test starts a separate Node process and checks that Wrangler, deploy helpers and dev helpers cannot be resolved from the plugin’s dependency tree.