-
-
Notifications
You must be signed in to change notification settings - Fork 395
update op-sqlite for @effect/sql-sqlite-react-native #5500
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 03fc278 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 |
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.
Pull Request Overview
This PR updates the React Native SQLite client to be compatible with newer versions of @op-engineering/op-sqlite
by migrating from the legacy API to the current API structure.
- Updates method calls from
db.execute
todb.executeSync
/db.executeAsync
- Changes result access from
result.rows?._array
toresult.rows
- Raises minimum peer dependency version from 7.1.0 to >=12.0.0
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/sql-sqlite-react-native/src/SqliteClient.ts | Updates API calls to use current op-sqlite methods and result structure |
packages/sql-sqlite-react-native/package.json | Raises minimum version requirement for op-sqlite dependency |
.changeset/short-lamps-vanish.md | Adds changeset entry for the minor version update |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Can the augmentation be directly in the |
ab4f132
to
03fc278
Compare
declare module "@op-engineering/op-sqlite" { | ||
export type OPDB = { | ||
close(): void | ||
executeSync(query: string, params?: Array<unknown>): { rows?: Array<unknown> } | ||
executeAsync(query: string, params?: Array<unknown>): Promise<{ rows?: Array<unknown> }> | ||
} | ||
|
||
export function open(options: { | ||
name: string | ||
location?: string | ||
encryptionKey?: string | ||
}): OPDB | ||
} |
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.
✅ DONE: move temporary declare module
into packages/sql-sqlite-react-native/src/SqliteClient.ts
✅ DONE: Land upstream PR: OP-Engineering/op-sqlite#324
☑️ TODO: Release @op-engineering/op-sqlite@^15.0.4
(not blocking this PR)
Type
Description
This PR updates our React Native SQLite client to align with the newer
@op-engineering/op-sqlite
API. The prior implementation was valid for older peerdependency versions; this is a routine refactor plus a dependency floor
adjustment.
db.execute
and readrows?._array
, which belongedto older versions. The current API returns results via
QueryResult.rows
.db.executeSync
for the sync path anddb.executeAsync
for the async path, and to consumeQueryResult.rows
.Sqlite.open
moduleResolution: "NodeNext"
, TypeScript omits star re‑exports frominternal subpaths not exposed in the package
exports
map, hidingopen
/openSync
/openRemote
in@op-engineering/op-sqlite
types.src/op-sqlite-augmentation.d.ts
to surfaceopen
and a narrowDB
type sothis package type‑checks in NodeNext environments.
Changes
executeSync
/executeAsync
and consumeQueryResult.rows
src/op-sqlite-augmentation.d.ts
to exposeopen
for NodeNext@op-engineering/op-sqlite
toImpact
Related