Skip to content

re-export ConfigSchema and convertToWranglerConfig from deploy-helpers#14265

Merged
emily-shen merged 5 commits into
mainfrom
emily/reexport
Jun 12, 2026
Merged

re-export ConfigSchema and convertToWranglerConfig from deploy-helpers#14265
emily-shen merged 5 commits into
mainfrom
emily/reexport

Conversation

@emily-shen

@emily-shen emily-shen commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

We're not ready to publish @cloudflare/config, but we need a few bits from that package to use in cf.

I've had to add a new entrypoint to @cloudflare/config to avoid an unsupported-dynamic-import warning and bundling unrelated config-loading code.

Also makes @cloudflare/deploy-helpers actually installable - previously that depended on workers/containers-shared, were not public and also not bundled..


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: re-exporting something
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: re-exporting something for internal use

A picture of a cute animal (not mandatory, but encouraged)


Open in Devin Review

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 61d0578

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/deploy-helpers Minor

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

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Jun 11, 2026
@workers-devprod workers-devprod requested review from a team and dario-piotrowicz and removed request for a team June 11, 2026 15:54
@workers-devprod

workers-devprod commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

✅ All changesets look good

@ask-bonk

ask-bonk Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

The main index re-exports loadConfig, registerConfigHooks etc. which likely use dynamic imports (the config-loading code). So creating a slim /cf entrypoint that only re-exports ConfigSchema and convertToWranglerConfig is justified. The PR rationale holds.

Now let me consider the most plausible real issue: the external/noExternal interaction in tsup. The order in esbuild: when a path matches both external and noExternal, esbuild's tsup plugin gives noExternal precedence (it's checked first via an onResolve plugin). But subpath matching — does noExternal: ["@cloudflare/config"] (without /cf) match the import @cloudflare/config/cf? tsup matches noExternal by checking if the import starts with the entry. The author added both "@cloudflare/config" and "@cloudflare/config/cf" explicitly to be safe, which covers it. Good.

I've examined the change thoroughly. The change is small and well-reasoned:

  • New slim /cf entrypoint avoids dynamic-import warnings — justified
  • noExternal correctly bundles config into deploy-helpers despite the /^@cloudflare\// external regex (noExternal takes precedence)
  • Type wrappers intentionally decouple from zod types
  • Changeset targets the right published package; config is private so needs none
  • Dependencies declared correctly (@cloudflare/config as devDependency since it's bundled)

The only minor observations (weakened unknown/never types, unused bare @cloudflare/config noExternal entry) are intentional design choices to avoid leaking internal types, not bugs. These are not actionable issues worth flagging.

LGTM

github run

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@14265

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@14265

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@14265

miniflare

npm i https://pkg.pr.new/miniflare@14265

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@14265

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@14265

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@14265

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@14265

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@14265

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@14265

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@14265

wrangler

npm i https://pkg.pr.new/wrangler@14265

commit: 61d0578

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@emily-shen emily-shen marked this pull request as draft June 11, 2026 16:55
@emily-shen emily-shen requested review from jamesopstad and penalosa and removed request for dario-piotrowicz June 11, 2026 17:13
@emily-shen emily-shen marked this pull request as ready for review June 12, 2026 08:46
Comment thread packages/config/src/cf.ts Outdated

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jun 12, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@emily-shen emily-shen merged commit e3fce14 into main Jun 12, 2026
62 checks passed
@emily-shen emily-shen deleted the emily/reexport branch June 12, 2026 15:55
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants