Skip to content

Publish @cloudflare/cli-shared-helpers and @cloudflare/workers-utils to npm#13651

Merged
emily-shen merged 13 commits intomainfrom
publish-cli-shared-helpers-and-workers-utils
Apr 24, 2026
Merged

Publish @cloudflare/cli-shared-helpers and @cloudflare/workers-utils to npm#13651
emily-shen merged 13 commits intomainfrom
publish-cli-shared-helpers-and-workers-utils

Conversation

@penalosa
Copy link
Copy Markdown
Contributor

Publish @cloudflare/cli-shared-helpers (renamed from @cloudflare/cli) and @cloudflare/workers-utils to npm via changesets.

Changes

  • Rename @cloudflare/cli@cloudflare/cli-shared-helpers — the old name was too generic for npm. All 147 consumer files across wrangler, miniflare, and create-cloudflare have been updated.
  • Add tsdown build pipeline to cli-shared-helpers — adds tsdown.config.ts, proper exports/files fields, and "build": "tsdown" script so the package produces importable ESM + .d.mts type declarations. All runtime deps (including ci-info) are bundled.
  • Mark both packages as non-private — removes "private": true from both @cloudflare/cli-shared-helpers and @cloudflare/workers-utils so changesets can publish them to npm.
  • Update deployment validation tests — adjusts validate-package-dependencies and validate-changesets test expectations for the rename and public status change.

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: this is a rename + packaging change; build and type-check pass locally, existing tests cover consumer imports
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal tooling packages, no public docs required

…to npm

- Rename @cloudflare/cli to @cloudflare/cli-shared-helpers
- Add tsdown build pipeline and package exports for cli-shared-helpers
- Mark both cli-shared-helpers and workers-utils as non-private
- Update all consumer imports across wrangler, miniflare, and create-cloudflare
- Update deployment validation tests for the rename
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

🦋 Changeset detected

Latest commit: 16942a2

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

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Apr 23, 2026
@penalosa penalosa changed the title [cli][workers-utils] Publish @cloudflare/cli-shared-helpers and @cloudflare/workers-utils to npm Publish @cloudflare/cli-shared-helpers and @cloudflare/workers-utils to npm Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Changeset Review

Summary

✅ All changesets look good

Detailed Review

1. publish-cli-shared-helpers-and-workers-utils.md

  • Version Type: minor ✅ (Publishing new packages is a new feature)
  • Changelog Quality: Clear description ✅
  • Markdown Headers: None ✅

2. vite-plugin-cf-registry-support.md

  • Version Type: patch ✅ (Bug fix - previously crashed)
  • Changelog Quality: Good explanation of before/after ✅
  • Markdown Headers: None ✅

3. silent-bananas-shop.md

  • Version Type: patch ✅ (Bug fix for compatibility date behavior)
  • Changelog Quality: Clear explanation of the issue and fix ✅
  • Markdown Headers: None ✅

4. ninety-doors-sit.md

  • Version Type: patch ✅ (Peer dependency range change affects users)
  • Changelog Quality: Brief but acceptable ✅
  • Markdown Headers: None ✅

5. sour-bears-shake.md

  • Version Type: patch ✅ (Internal simplification with behavioral change)
  • Changelog Quality: Brief but clear ✅
  • Markdown Headers: None ✅

6. vitest-pool-workers-reset-helper.md

  • Version Type: minor ✅ (New features)
  • Changelog Quality: Excellent with code example ✅
  • Markdown Headers: None ✅

7. stream-local-video-serving.md

  • Version Type: minor ✅ (New features)
  • Changelog Quality: Comprehensive description ✅
  • Markdown Headers: None ✅

8. dependabot-update-13633.md

  • Version Type: patch ✅ (Dependency update)
  • Changelog Quality: Good with version table ✅
  • Markdown Headers: None ✅

9. fix-vite-config-denylist.md

  • Version Type: patch ✅ (Bug fix)
  • Changelog Quality: Clear ✅
  • Markdown Headers: None ✅

10. dev-registry-windows-polling.md

  • Version Type: patch ✅ (Bug fix for Windows reliability)
  • Changelog Quality: Good technical explanation ✅
  • Markdown Headers: None ✅

11. sour-paws-thank.md

  • Version Type: patch ✅ (Bug fix)
  • Changelog Quality: Clear ✅
  • Markdown Headers: None ✅

12. update-clack-to-v1.md

  • Version Type: patch ✅ (Dependency update)
  • Changelog Quality: Good explanation of changes ✅
  • Markdown Headers: None ✅

13. dependabot-update-13645.md

  • Version Type: patch ✅ (Dependency update)
  • Changelog Quality: Good with version table ✅
  • Markdown Headers: None ✅

14. detect-waf-block-response.md

  • Version Type: patch ✅ (Improvement to error handling)
  • Changelog Quality: Excellent explanation of user impact ✅
  • Markdown Headers: None ✅

15. angry-bears-count.md

  • Version Type: minor ✅ (New feature - new fields)
  • Changelog Quality: Clear description of new fields ✅
  • Markdown Headers: None ✅

16. dependabot-update-13657.md

  • Version Type: patch ✅ (Dependency update)
  • Changelog Quality: Good with version table ✅
  • Markdown Headers: None ✅

17. fix-nonretryable-error-message.md

  • Version Type: patch ✅ (Bug fix behind compatibility flag)
  • Changelog Quality: Clear explanation ✅
  • Markdown Headers: None ✅

18. ai-search-inherit-display.md

  • Version Type: patch ✅ (Bug fix)
  • Changelog Quality: Clear explanation of the fix ✅
  • Markdown Headers: None ✅

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 23, 2026

I'm Bonk, and I've done a quick review of your PR.

Renames @cloudflare/cli to @cloudflare/cli-shared-helpers, adds a tsdown build pipeline, and marks both cli-shared-helpers and workers-utils as public for npm publication.

  1. workers-utils repository.directory is wrongpackages/workers-utils/package.json line 14 says "directory": "packages/worker-utils" (missing the s) but the actual directory is packages/workers-utils. This is pre-existing, but since this PR makes the package public, the incorrect metadata will appear on npmjs.com (the "Repository" link will 404 on GitHub). Suggest fixing it in this PR:
-		"directory": "packages/worker-utils"
+		"directory": "packages/workers-utils"

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 23, 2026

I'm Bonk, and I've done a quick review of your PR.

Renames @cloudflare/cli to @cloudflare/cli-shared-helpers, adds a tsdown build pipeline, and marks both cli-shared-helpers and workers-utils as public for npm publication.

  1. workers-utils repository.directory is wrongpackages/workers-utils/package.json line 14 says "directory": "packages/worker-utils" (missing the s) but the actual directory is packages/workers-utils. This is pre-existing, but since this PR makes the package public, the incorrect metadata will appear on npmjs.com (the "Repository" link will 404 on GitHub). I posted a comment on the PR with a suggested fix.

github run

The lint-turbo check requires any package with a build script to declare
turbo build outputs.
Avoids createRequire(import.meta.url) shims that break when C3's
esbuild re-bundles the output as CJS.
@penalosa penalosa marked this pull request as ready for review April 23, 2026 17:11
@workers-devprod workers-devprod requested review from a team and edmundhung and removed request for a team April 23, 2026 17:11
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Apr 23, 2026

Codeowners approval required for this PR:

  • @cloudflare/d1
  • ✅ @cloudflare/cloudchamber
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/wrangler/src/d1/execute.ts: [@cloudflare/d1]
  • packages/wrangler/src/d1/export.ts: [@cloudflare/d1]

devin-ai-integration[bot]

This comment was marked as resolved.

With unbundle: true, all imports remain as bare specifiers in dist output.
Runtime dependencies must be in dependencies (not devDependencies) so npm
consumers can resolve them. Also adds scripts/deps.ts for the dependency
validation check.
Comment thread packages/workers-utils/package.json Outdated
@emily-shen
Copy link
Copy Markdown
Contributor

do we want to add a 'intended for internal workers-sdk use' or is it fine if external users start depending on it?

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

create-cloudflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/create-cloudflare@13651

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/kv-asset-handler@13651

miniflare

npm i https://pkg.pr.new/cloudflare/workers-sdk/miniflare@13651

@cloudflare/pages-shared

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/pages-shared@13651

@cloudflare/unenv-preset

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/unenv-preset@13651

@cloudflare/vite-plugin

npm i https://pkg.pr.new/cloudflare/workers-sdk/@cloudflare/vite-plugin@13651

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

npm i https://pkg.pr.new/cloudflare/workers-sdk/wrangler@13651

commit: 16942a2

Both packages are published for internal consumption across the
workers-sdk ecosystem. The description warns external users that
APIs may change without notice. cli-shared-helpers is reset to
0.0.0 (changesets will bump to 0.1.0).
@penalosa
Copy link
Copy Markdown
Contributor Author

do we want to add a 'intended for internal workers-sdk use' or is it fine if external users start depending on it?

I've added a disclaimer and made sure they're both 0.x versioned

The dialog and metrics tests imported collectCLIOutput from the cli
package's internal test-util, which used relative imports to streams.
With the exports map, the mocked streams module and the source
streams are different module instances. Move the helpers into C3's
own test helpers file, importing via the package specifier so they
use the same mocked module as the production code.
penalosa and others added 4 commits April 24, 2026 00:59
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Codeowners Bypass

Bypassing D1 approval as this is an infrastructure change - not product.

Copy link
Copy Markdown
Contributor

@workers-devprod workers-devprod left a comment

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 Apr 24, 2026
@emily-shen emily-shen merged commit 47ac63f into main Apr 24, 2026
59 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 24, 2026
@emily-shen emily-shen deleted the publish-cli-shared-helpers-and-workers-utils branch April 24, 2026 10:11
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.

5 participants