Skip to content

Conversation

@PatrikKozak
Copy link
Contributor

What?

Separated user serialization concerns from runtime user handling in the export plugin by moving user and userCollection fields out of the base Export type into a new ExportJobInput type, and using a separate user parameter in CreateExportArgs.

Why?

The Export type had user: string which was meant for job queue serialization, but when exports ran directly (without job queue), the full user object was being passed where a string was expected. This created a type mismatch that only worked by accident at runtime.

How?

  • Removed user and userCollection from base Export type
  • Created ExportJobInput type that extends Export with serialization fields
  • Updated CreateExportArgs to accept user?: TypedUser | null as separate parameter
  • Fixed all call sites to pass user separately instead of in input object
  • Added validation to ensure user exists before creating exports
  • Job queue handler now strips serialization fields before passing to createExport

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

📦 esbuild Bundle Analysis for payload

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

JarrodMFlesch
JarrodMFlesch previously approved these changes Dec 2, 2025
@JarrodMFlesch JarrodMFlesch dismissed their stale review December 2, 2025 17:01

Still reviewing

@JarrodMFlesch JarrodMFlesch merged commit 61f5aee into main Dec 2, 2025
94 checks passed
@JarrodMFlesch JarrodMFlesch deleted the fix/plugin-import-export-user-type-consistency branch December 2, 2025 18:11
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🚀 This is included in version v3.66.0

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.

3 participants