Skip to content

fix(core): runtime-neutral legacy credential import - #41607

Open
kitlangton wants to merge 1 commit into
v2from
legacy-credential-import
Open

fix(core): runtime-neutral legacy credential import#41607
kitlangton wants to merge 1 commit into
v2from
legacy-credential-import

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Bun.file crashes at database bootstrap in plain Node and Cloudflare workerd because Bun is undefined, preventing fresh databases from completing migrations.

How

  • Read legacy auth.json with node:fs/promises readFile.
  • Skip import silently when the file is absent or any read fails.
  • Preserve malformed-content failures and the existing importLegacyCredentials(tx, filepath) signature.

Testing

  • bunx tsgo --noEmit in packages/core
  • bun test test/database-migration.test.ts in packages/core (9 passed)
  • Added coverage verifying an absent legacy credential file succeeds without importing rows.

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.

1 participant