-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(db): isolate AstroDbError from core utils #10646
Conversation
🦋 Changeset detectedLatest commit: 55342ea 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 |
!preview 10646 |
Snapshots have been released for the following packages:
Publish Log
Build Log
|
@@ -3,7 +3,7 @@ import { type SQL, sql } from 'drizzle-orm'; | |||
import type { LibSQLDatabase } from 'drizzle-orm/libsql'; | |||
import { SQLiteAsyncDialect } from 'drizzle-orm/sqlite-core'; | |||
import { type DBTables } from '../core/types.js'; | |||
import { AstroDbError } from '../utils.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I'm surprised this would cause an issue. utils.js
is at the project root, not in the core
directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Ah, I just noticed that root file exports the core db integration file. Guess I've found the edge case in our eslint rule barring core modules. Thanks for finding this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hadn't considered that src/utils
exposes core utilities, making this unsafe and uncaught by our eslint rule. Good reason to avoid shared files in src
I suppose. Even if this does not resolve the issue, I approve of the change. Thanks for utelling us
Changes
pnpm exec changeset
Testing
Docs