Skip to content

fix(plugin-cloud-storage): split client and server utility exports - #17143

Merged
JarrodMFlesch merged 2 commits into
mainfrom
agents/fix-client-server-barrel-exports
Jun 29, 2026
Merged

JarrodMFlesch merged 2 commits into
mainfrom
agents/fix-client-server-barrel-exports

Conversation

@JarrodMFlesch

@JarrodMFlesch JarrodMFlesch commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Separates browser-safe utility imports from server-only utility imports in @payloadcms/plugin-cloud-storage by adding a dedicated ./utilities/client export and moving client upload handlers to use it.

The regression came from mixing resolveSignedURLKey (server-only) into the shared ./utilities barrel, which let client handlers importing getFileKey pull server-only transitive dependencies into client bundling paths.

Fixes #16757

Adds a dedicated `@payloadcms/plugin-cloud-storage/utilities/client` entrypoint for browser-safe utilities and updates client upload handlers to import `getFileKey` from this path. This prevents mixed server/client barrel imports from pulling server-only transitive dependencies into client bundles.

Fixes #16757

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@JarrodMFlesch
JarrodMFlesch requested review from AlessioGr and removed request for denolfe June 29, 2026 15:34
…ient export

Uses the existing `@payloadcms/plugin-cloud-storage/client` entrypoint for `getFileKey` in client upload handlers, and removes the temporary `./utilities/client` subpath export. Also re-exports `getFileKey` and `sanitizePrefix` from the existing client exports file to keep client-safe imports explicit.

Co-authored-by: Copilot <[email protected]>
@JarrodMFlesch
JarrodMFlesch merged commit 9ebb9f0 into main Jun 29, 2026
336 of 338 checks passed
@JarrodMFlesch
JarrodMFlesch deleted the agents/fix-client-server-barrel-exports branch June 29, 2026 17:24
JarrodMFlesch added a commit that referenced this pull request Jul 1, 2026
…17152)

Identical to #17143, back-ported for 3.x.

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

with-cloudflare-d1 template is broken from v3.85.0

2 participants