Skip to content

Clerk package parity#59

Draft
zdburrage wants to merge 1 commit into
mainfrom
feat/clerk-package-parity
Draft

Clerk package parity#59
zdburrage wants to merge 1 commit into
mainfrom
feat/clerk-package-parity

Conversation

@zdburrage
Copy link
Copy Markdown
Collaborator

@zdburrage zdburrage commented May 6, 2026

Summary

Phase 13 of the provider-parity execution plan. Clerk transformer now writes a migration package alongside the legacy single-CSV path.

  • New src/transformers/clerk/package-exporter.ts reads the Clerk dashboard CSV plus optional org and role mapping files and emits the canonical layout: users.csv, organizations.csv, organization_memberships.csv, role_definitions.csv, user_role_assignments.csv, workos_upload/, manifest, warnings, skipped-user sidecars.
  • Package and upload-compat files use the same Clerk id and org_external_id so import-package resolves users/orgs from either projection.
  • Unsupported password hashers (non-bcrypt) become structured unsupported_password_hasher warnings rather than dropping users.
  • transform-clerk CLI gains --package and --output-dir. Existing --output flow is unchanged.
  • Tests: org/role merge, unsupported hasher warning, no-email skip, manifest validation, and the no-mapping baseline.
  • README leads with the package flow and points at import-package for the next step.

Test Plan

  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npm run build
  • npm test — 271 passing across 24 suites.

🤖 Generated with Claude Code

Phase 13 of the provider-parity plan. Adds package mode to the Clerk
transformer alongside the existing single-CSV path.

- New \`src/transformers/clerk/package-exporter.ts\` reads the Clerk
  dashboard CSV plus optional org and role mapping files and emits the
  canonical package layout: \`users.csv\`,
  \`organizations.csv\`, \`organization_memberships.csv\`,
  \`role_definitions.csv\`, \`user_role_assignments.csv\`,
  \`workos_upload/\`, manifest, warnings, and skipped-user sidecars.
- Package and upload-compatible files use the same Clerk \`id\` and
  \`org_external_id\` so \`import-package\` can resolve users/orgs from
  either projection.
- Unsupported password hashers (anything other than bcrypt) are
  recorded as structured \`unsupported_password_hasher\` warnings so
  the package import does not lose users to algorithm mismatch.
- \`transform-clerk\` CLI gains \`--package\` and \`--output-dir\`
  flags. Existing \`--output\` flow is unchanged.
- Tests cover: org/role mapping merge, unsupported hasher warning,
  no-email skip, manifest validation, and the no-mapping baseline.
- README leads with the package flow and points at \`import-package\`
  for next steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant