Skip to content

[deploy-helpers] Expose dedicated workflow entry points - #16624

Open
petebacondarwin wants to merge 9 commits into
codex/miniflare-runtime-free-helpersfrom
codex/deploy-helpers-workflow-entries
Open

petebacondarwin wants to merge 9 commits into
codex/miniflare-runtime-free-helpersfrom
codex/deploy-helpers-workflow-entries

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Relates to cloudflare/cf#390. Stacked on #16623; merge that PR first.

Expose @cloudflare/deploy-helpers/deploy, /versions-upload, /triggers, and /preview so CLI commands can import their workflow without pulling in the package's other workflows. Existing root exports remain available, and all entry points share the context initialized through /context.

With the shared workers-utils helpers and Miniflare v5 export removal from #16623, each workflow entry point can be imported without loading Miniflare's runtime or resolving workerd. Startup profiling remains behind the existing /startup-profile entry point and the lazy upload-error diagnostics path.

Validation after refreshing the parent PR: all 297 deploy-helpers tests pass, including built-package import guards that reject Miniflare's main entry and workerd, entry-point identity checks, and a trigger dry run using the shared context. Package builds, source/test type checks, type-aware lint, and formatting pass. Full root pnpm check passes after an unfiltered pnpm install --frozen-lockfile: all 204 tasks succeeded. The earlier missing tinyglobby failure was a local filtered-install omission and required no repository change.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: these internal package entry points are documented in the package README.
@changeset-bot

changeset-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b6c8d98

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

This PR includes changesets to release 2 packages
Name Type
@cloudflare/deploy-helpers Minor
@cloudflare/remote-bindings Patch

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 Nov 1, 2026
@workers-devprod
workers-devprod requested review from a team and edmundhung and removed request for a team November 1, 2026 09:03
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/focused-deployment-entry-points.md: [@cloudflare/wrangler]
  • packages/deploy-helpers/README.md: [@cloudflare/wrangler]
  • packages/deploy-helpers/package.json: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/deploy/index.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/preview/index.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/triggers/index.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/src/versions-upload.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tests/package-imports.test.ts: [@cloudflare/wrangler]
  • packages/deploy-helpers/tsup.config.ts: [@cloudflare/wrangler]

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 potential issue.

Devin Review

Comment on lines 49 to +53
const helpers = await import("@cloudflare/deploy-helpers");
for (const [entry, name] of [["deploy", "deploy"], ["versions-upload", "versionsUpload"], ["triggers", "triggersDeploy"], ["preview", "previewBuildOutput"]]) {
const workflow = await import("@cloudflare/deploy-helpers/" + entry);
assert.equal(workflow[name], helpers[name]);
}

@devin-ai-integration devin-ai-integration Bot Nov 1, 2026 •

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.

🔍 Import guard misses cross-workflow loading

The root import loads every workflow before the dedicated entries run. These checks verify export identity and runtime avoidance, but cannot detect whether a dedicated entry loads other workflows.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@ask-bonk

ask-bonk Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Superseded by the review of a049c6d5.

This review, of 60785cb9

💬 Approved with comments — The entry points are wired up correctly and tested. The only finding is an INFO about a comment in tsup.config.ts that describes too many entry points as sharing the context.

Findings: 1 info

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📝 Documentation: 💬 1 info

A tsup config comment describes too many entry points as sharing the context

Recommendation: 💬 Optional Nits

  • [INFO] The tsup.config.ts comment says all entry points share context.ts, but create-worker-upload-form and startup-profile don't import it. Narrow the comment to the entry points that use the context. (packages/deploy-helpers/tsup.config.ts:7)
View full review

The comment at packages/deploy-helpers/tsup.config.ts:7-10 says all entry points share context.ts. create-worker-upload-form and startup-profile do not import it. The comment would be more accurate if it said that the entry points which use the context share its singleton.


✅ All other checks passed

🚀 Release: ✅ LGTM

Risk: Low. The changeset covers the new entry points, and the existing root exports are unchanged.


🔒 Security: ✅ LGTM

No security concerns in these entry-point and packaging changes.


📖 AGENTS.md: ✅ LGTM

No conflicts with the repository's guidance.


📋 Code Quality: ✅ LGTM

The new src/deploy/index.ts, src/triggers/index.ts and src/preview/index.ts re-export existing modules. The subpath exports in package.json and the tsup.config.ts entries match. The dry-run test's assertion matches triggersDeploy's behaviour when it is called with dryRun: true and validated: true.


⚡ Performance: ✅ LGTM

No performance concerns. Each focused entry point lets a command import its own workflow without loading the package's other workflows.


Reviewed commit: 60785cb9

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Superseded by the review of 82ece831.

This review, of a049c6d5

💬 Approved with comments — The entry points are wired up correctly and tested. The only open finding is an INFO: a comment and a README sentence say all entry points share the context, when only the workflow entry points do.

Findings: 1 info

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📝 Documentation: 💬 1 info

The tsup comment and the README say all entry points share the context, but only the workflow entry points do.

Recommendation: 💬 Optional Nits

  • [INFO] The tsup.config.ts comment (and README.md:16-17) says all entry points share context.ts, but create-worker-upload-form and startup-profile don't import it. Limit the wording to the entry points that use the context. (packages/deploy-helpers/tsup.config.ts:7)
View full review
  • packages/deploy-helpers/tsup.config.ts:7 says "All entry points share context.ts as a singleton". packages/deploy-helpers/README.md:16-17 says "All entry points share the same context". Neither the create-worker-upload-form nor the startup-profile entry point imports the context. Limit both statements to the entry points that use it.

✅ All other checks passed

🚀 Release: ✅ LGTM

Risk: Low. The changeset documents the new entry points, and the existing root exports are unchanged.


🔒 Security: ✅ LGTM

No security concerns in these entry-point and packaging changes.


📖 AGENTS.md: ✅ LGTM

No conflicts with the repository's guidance.


📋 Code Quality: ✅ LGTM

The package.json subpath exports match the tsup.config.ts entry names. src/deploy/index.ts, src/triggers/index.ts and src/preview/index.ts re-export the same modules as src/index.ts, which is why the identity checks in the test hold. The conflict resolution in package-imports.test.ts is consistent with the rest of the diff.


⚡ Performance: ✅ LGTM

No performance concerns. With the dedicated entry points, a command can import its own workflow without loading the package's other workflows.


Reviewed commit: a049c6d5

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Superseded by the review of 2a5ccace.

This review, of 82ece831

✅ Approved — No new findings. The subpath exports match the build entries, and the identity and import-guard tests cover the new workflow entry points. One earlier wording note on the shared-context comment is left to the author.

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

Risk: Low. The changeset documents the new entry points as a minor bump, which matches the repository's policy for new features. The existing root exports are unchanged.


🔒 Security: ✅ LGTM

No security concerns in these entry-point and packaging changes.


📖 AGENTS.md: ✅ LGTM

No conflicts with the repository's guidance.


📋 Code Quality: ✅ LGTM

The package.json subpath exports match the entry names in tsup.config.ts. The new entry-point modules re-export the same modules as src/index.ts, so the identity checks in the test hold. The updated built-package guard in package-imports.test.ts matches the rest of the diff.


⚡ Performance: ✅ LGTM

No performance concerns. With the dedicated entry points, a command can import its own workflow without loading the package's other workflows.


📝 Documentation: ✅ LGTM

No new documentation issues. The earlier note about the "all entry points share the context" wording at tsup.config.ts:7 and README.md:16-17 is still open and left to the author.


Reviewed commit: 82ece831

…-helpers-workflow-entries

# Conflicts:
#	packages/deploy-helpers/tests/package-imports.test.ts

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Superseded by the review of 27b2b251.

This review, of 2a5ccace

✅ Approved — No new findings. The subpath exports match the build entries, and the identity and import-guard tests cover the new workflow entry points. One earlier wording note on the shared-context comment is left to the author.

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

Risk: Low. The changeset documents the new entry points as a minor bump, which matches the repository's policy for new features. The existing root exports are unchanged.


🔒 Security: ✅ LGTM

No security concerns in these entry-point and packaging changes.


📖 AGENTS.md: ✅ LGTM

No conflicts with the repository's guidance.


📋 Code Quality: ✅ LGTM

The package.json subpath exports match the entry names in tsup.config.ts. The new entry-point modules re-export the same modules as src/index.ts, so the identity checks in the test hold. The updated built-package guard in package-imports.test.ts matches the rest of the diff.


⚡ Performance: ✅ LGTM

No performance concerns. With the dedicated entry points, a command can import its own workflow without loading the package's other workflows.


📝 Documentation: ✅ LGTM

No new documentation issues. The earlier note about the "all entry points share the context" wording at tsup.config.ts:7 and README.md:16-17 is still open and left to the author.


Reviewed commit: 2a5ccace — same changes as 82ece831, so this is that commit's review (no new review was run; line numbers are as of 82ece831)

@pkg-pr-new

pkg-pr-new Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@16624

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@16624

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@16624

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@16624

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@16624

create-cloudflare

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

@cloudflare/deploy-helpers

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@16624

@cloudflare/pages-shared

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

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@16624

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@16624

@cloudflare/workers-auth

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: b6c8d98

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Superseded by the review of b6c8d985.

This review, of 27b2b251

✅ Approved — No new findings. The subpath exports match the build entries, and the identity and import-guard tests cover the new workflow entry points. One earlier wording note on the shared-context comment is left to the author.

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

Risk: Low. The changeset documents the new entry points as a minor bump, which matches the repository's policy for new features. The existing root exports are unchanged.


🔒 Security: ✅ LGTM

No security concerns in these entry-point and packaging changes.


📖 AGENTS.md: ✅ LGTM

No conflicts with the repository's guidance.


📋 Code Quality: ✅ LGTM

The package.json subpath exports match the entry names in tsup.config.ts. The new entry-point modules re-export the same modules as src/index.ts, so the identity checks in the test hold. The updated built-package guard in package-imports.test.ts matches the rest of the diff.


⚡ Performance: ✅ LGTM

No performance concerns. With the dedicated entry points, a command can import its own workflow without loading the package's other workflows.


📝 Documentation: ✅ LGTM

No new documentation issues. The earlier note about the "all entry points share the context" wording at tsup.config.ts:7 and README.md:16-17 is still open and left to the author.


Reviewed commit: 27b2b251 — same changes as 82ece831, so this is that commit's review (no new review was run; line numbers are as of 82ece831)

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Approved — No new findings. The subpath exports match the build entries, and the identity and import-guard tests cover the new workflow entry points. One earlier wording note on the shared-context comment is left to the author.

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

Risk: Low. The changeset documents the new entry points as a minor bump, which matches the repository's policy for new features. The existing root exports are unchanged.


🔒 Security: ✅ LGTM

No security concerns in these entry-point and packaging changes.


📖 AGENTS.md: ✅ LGTM

No conflicts with the repository's guidance.


📋 Code Quality: ✅ LGTM

The package.json subpath exports match the entry names in tsup.config.ts. The new entry-point modules re-export the same modules as src/index.ts, so the identity checks in the test hold. The updated built-package guard in package-imports.test.ts matches the rest of the diff.


⚡ Performance: ✅ LGTM

No performance concerns. With the dedicated entry points, a command can import its own workflow without loading the package's other workflows.


📝 Documentation: ✅ LGTM

No new documentation issues. The earlier note about the "all entry points share the context" wording at tsup.config.ts:7 and README.md:16-17 is still open and left to the author.


Reviewed commit: b6c8d985 — same changes as 82ece831, so this is that commit's review (no new review was run; line numbers are as of 82ece831)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants