Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docs/releases/v10.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
NitroSQLite 10.3.0 adds a Drizzle ORM driver and queries that return rows as arrays. This minor release changes the package format to ES modules only, which can break Jest setups, so read the breaking change below before upgrading.

## Breaking change: ES modules only

`react-native-nitro-sqlite` no longer ships a CommonJS build. The package now publishes a single ES module build, and both `import` and `require` resolve to it. [#475](https://github.com/margelo/react-native-nitro-sqlite/pull/475)

Jest runs tests as CommonJS and doesn't transform files in `node_modules` by default. If your tests load `react-native-nitro-sqlite` or `react-native-nitro-sqlite/mock`, add the package to the list in your `transformIgnorePatterns` so Jest transforms it:

```js
// jest.config.js
module.exports = {
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?|react-native-nitro-sqlite)/)',
],
}
```

See the [Node.js test mock guide](https://sqlite.margelo.com/docs/guides/node-test-mock) for the full setup.

## Drizzle ORM

The new `react-native-nitro-sqlite-drizzle` package is a Drizzle ORM driver with `drizzle()`, `migrate()`, and a `useMigrations()` hook. See the [Drizzle ORM guide](https://sqlite.margelo.com/docs/integrations/drizzle) for setup, migrations, and transactions. [#448](https://github.com/margelo/react-native-nitro-sqlite/pull/448)

## Rows as arrays

`executeRaw()` and `executeRawAsync()` take the same arguments as `execute()` and `executeAsync()`, but return each row as an array of values in column order. When two columns share a name, as in a join, each keeps its own value. Connections, transactions, and prepared statements all have both methods. See [rows as arrays](https://sqlite.margelo.com/docs/guides/parameters-and-results#rows-as-arrays). [#447](https://github.com/margelo/react-native-nitro-sqlite/pull/447)

## Upgrading

Update `react-native-nitro-sqlite` to 10.3.0, and update `react-native-nitro-sqlite-vec` and `react-native-nitro-sqlite-drizzle` to the same version if you use them. The new query methods change the native module, so install Pods again on Apple platforms and rebuild your native app.