Skip to content

Conversation

@gpanders
Copy link
Member

Move parseImageName out of wrangler and into containers-shared, and parse the hostname separately from the name of the image. See the new test cases for examples.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: not a public facing API
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not a patch change

@gpanders gpanders requested review from a team as code owners October 20, 2025 20:29
@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2025

🦋 Changeset detected

Latest commit: bc5043c

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 20, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: bc5043c

Move `parseImageName` out of `wrangler` and into `containers-shared`,
and parse the hostname separately from the name of the image. See the
new test cases for examples.
Comment on lines +2 to +3
"@cloudflare/containers-shared": minor
"wrangler": minor
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"@cloudflare/containers-shared": minor
"wrangler": minor
"@cloudflare/containers-shared": patch
"wrangler": patch

Copy link
Member Author

@gpanders gpanders Oct 20, 2025

Choose a reason for hiding this comment

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

Since this deletes an exported function from wrangler shouldn't it be a new minor version?

Or perhaps we should keep a stub for parseImageName in Wrangler that just calls the one in containers-shared to avoid any breaking changes.

Copy link
Member

@nikitassharma nikitassharma Oct 20, 2025

Choose a reason for hiding this comment

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

I thought we were keeping containers changes as patches since it's still beta, but I'm not certain. @emily-shen might know?

I don't see any reason to keep the stub, I like the way it's structured currently, it feels like this belongs in containers-shared

Copy link
Contributor

Choose a reason for hiding this comment

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

its only importable from within wrangler, it was never exposed as part of wranglers public api. so no breaking changes :)

} {
const matches = value.match(imageRe);
if (matches === null) {
throw new Error(
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we added a UserError to containers shared (prevents the error showing up in wrangler's sentry)

Copy link
Contributor

@emily-shen emily-shen left a comment

Choose a reason for hiding this comment

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

should we also be using this parsing in resolveImageName

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

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants