Skip to content

Conversation

@Adammatthiesen
Copy link
Member

Changes

  • What does this change?
  • Be short and concise. Bullet points can help!
  • Before/after screenshots can help as well.
  • Don't forget a changeset! pnpm exec changeset

Now that Astro Studio has sunset, db.transaction() which has been previously un-typed, can now once again be typed. this PR removes the Omit<> that removes the transaction type from the DB client.

Testing

No functional changes have been made, only type changes

Docs

No docs are needed as there is no functional change, but could be included now that transactions are properly typed.

@changeset-bot
Copy link

changeset-bot bot commented May 12, 2025

🦋 Changeset detected

Latest commit: a244304

The changes in this PR will be included in the next version bump.

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

@Adammatthiesen Adammatthiesen changed the title feat(db): Re-enable transaction types feat(db): Enable transaction types May 12, 2025
@ematipico
Copy link
Member

Do we expose the type to users?

@Adammatthiesen
Copy link
Member Author

Adammatthiesen commented May 12, 2025

Do we expose the type to users?

its the user-facing db client type from the astro:db virtual module. when using db.transaction() currently its 100% un-typed but works. this would re-add the type back to the function making it easier to build standard drizzle transactions.

@ematipico ematipico merged commit 1609044 into withastro:main May 12, 2025
14 checks passed
@astrobot-houston astrobot-houston mentioned this pull request May 12, 2025
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants