Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 6c26329 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7023aa6 to
bef6085
Compare
76d2b5f to
a3192a5
Compare
bef6085 to
3e7f420
Compare
a3192a5 to
3ad0320
Compare
10e434a to
dfdb627
Compare
769c96e to
c662cdc
Compare
dfdb627 to
5c23bdf
Compare
| packages: ["passport"], | ||
| name: "Passport.js", | ||
| docsUrl: "https://clerk.com/docs/migrations/overview", | ||
| docsUrl: "https://clerk.com/docs/guides/development/migrating/custom-source", |
There was a problem hiding this comment.
clerk init now sends Passport and Kinde users to the custom-source docs page, but clerk migrate sources and the custom-source errors still link the GitHub README (CUSTOM_SOURCES_URL in sources/load-custom.ts). Move that to the docs page too, so both point at one guide?
There was a problem hiding this comment.
Already done in 08d4197, which hadn't been pushed when you reviewed. CUSTOM_SOURCES_URL now points at https://clerk.com/docs/guides/development/migrating/custom-source, so clerk init, clerk migrate sources, the --source help and every custom-source error link the same guide.
| const names = result.completions.map((c) => c.name); | ||
| expect(names).toContain("supabase"); | ||
| expect(names).toContain("workos"); | ||
| }); |
There was a problem hiding this comment.
With gate.test.ts gone, nothing checks that completion offers migrate or its subcommands. Maybe add one like the security test?
| }); | |
| }); | |
| test("completes migrate subcommands", () => { | |
| expect(completionNames("")).toContain("migrate"); | |
| expect(completionNames("migrate", "")).toEqual( | |
| expect.arrayContaining(["import", "export", "undo", "runs", "sources"]), | |
| ); | |
| }); |
|
|
||
| Make `clerk migrate` available without `CLERK_EXPERIMENTAL=migrate`: it now shows in `clerk --help` and shell completion. | ||
|
|
||
| - `clerk migrate export` gets users out of Clerk, Supabase, Firebase, Auth0, WorkOS, Better Auth or Auth.js into a run, and `clerk migrate import` checks every user against your instance, asks before it writes, and continues a run that stopped partway. |
There was a problem hiding this comment.
[Nit] Oxford comma before "or Auth.js"? Same for "passwords, MFA and metadata" in migrate-custom-sources.md.
| - `clerk migrate export` gets users out of Clerk, Supabase, Firebase, Auth0, WorkOS, Better Auth or Auth.js into a run, and `clerk migrate import` checks every user against your instance, asks before it writes, and continues a run that stopped partway. | |
| - `clerk migrate export` gets users out of Clerk, Supabase, Firebase, Auth0, WorkOS, Better Auth, or Auth.js into a run, and `clerk migrate import` checks every user against your instance, asks before it writes, and continues a run that stopped partway. |
| pasted unencoded (`#`, `@`, `/` and the like) is percent-encoded for you. | ||
| pasted unencoded (`#`, `@`, `/` and the like) is percent-encoded for you. A libsql | ||
| token comes from `?authToken=` on the URL, or from `TURSO_AUTH_TOKEN` / | ||
| `LIBSQL_AUTH_TOKEN`, and is redacted like a password. |
There was a problem hiding this comment.
[Nit] Active voice reads a little clearer here.
| `LIBSQL_AUTH_TOKEN`, and is redacted like a password. | |
| `LIBSQL_AUTH_TOKEN`, and the CLI redacts it like a password. |
| @@ -1,27 +0,0 @@ | |||
| /** | |||
There was a problem hiding this comment.
Thoughts on keeping lib/experimental.ts instead of deleting it? migrate was its only user, but I doubt it's the last thing we'll want to gate. Keeping it means the next one is a couple of lines, not a dig through git history. Not a blocker either way.
| ``` | ||
| clerk migrate export [source] [-o <path>] [--json] | ||
| clerk migrate import <file|export-run-id> [--source <source>] [--dry-run] [--allow-partial] [--new-run] [--yes] [--json] | ||
| clerk migrate export [platform] [-o <path>] [--json] |
There was a problem hiding this comment.
[Nit] Everywhere else in --help, "source" means the import-side mapper (--source, clerk migrate sources). Maybe drop it from export's description (export/index.ts:99), e.g. "Export users from an auth platform, ready for clerk migrate import", so it only ever means one thing?
Remove the CLERK_EXPERIMENTAL=migrate gate. `clerk migrate` now registers like every other command, so it shows in `clerk --help` and completion and runs without an env var. Drops lib/experimental.ts, the experiment_disabled error code, the gate test, and the env setup in tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add `migrate` to the root README's help output. In the migrate README, show `export [platform]` and `import [file|export-run-id]` as optional the way `--help` does, say `sources` takes no `--runs-dir`, match the export `-y` wording, and restore the libsql token sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er changesets None of them has shipped, and this slice makes migrate generally available, so the release notes would have said "still experimental" beside the entry announcing it. Lands only with the flip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`clerk init`'s auth-library scan and `clerk migrate export workos` linked to the old `/docs/migrations/*` pages or the migration overview. They now link to the guide for each platform under `/docs/guides/development/migrating/`: authjs, auth0, supabase, firebase, better-auth and workos. Passport.js and Kinde have no built-in source, so they link to the custom-source guide. URL strings only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`CUSTOM_SOURCES_URL` linked to the "Custom sources" section of the CLI's README on GitHub. Errors from a source you wrote, `clerk migrate sources`, and the `--source` help now link to the custom-source guide under /docs/guides/development/migrating/, which covers the same validation errors and hook signatures for someone migrating, not developing the CLI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
08d4197 to
6c26329
Compare
PR 14 of 14 for
clerk migrate(plan:slice-prs.mdon #479). Stacked on #531: review that first, then this one, which shows only its own diff. It removes theCLERK_EXPERIMENTAL=migrategate, soclerk migrateshows inclerk --helpand completion.These commits were the start of #531 until it was split; they're unchanged.
Try it
What it does
lib/experimental.ts, the gate stub,ERROR_CODE.EXPERIMENT_DISABLED, and everyCLERK_EXPERIMENTALsetup in tests.migrateto the root README's help output.commands/migrate/README.mdagainst every subcommand's--helpand fixes the drift.clerk migrate, and drops "still experimental" from the earlier migrate changesets that haven't shipped yet.clerk migrateand its guides. It merges after this ships.Tests
bun run testcovers the unit and integration tests.pnpm test:migrate:slice6) runs an import and its undo withCLERK_EXPERIMENTALunset.🤖 Generated with Claude Code