From ffa1e8524f68bc65ad1204d0cb9eb16a44b77f30 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Tue, 10 Nov 2026 12:06:24 +0100 Subject: [PATCH] docs: announce 10.3.0 with the ESM-only breaking change Release-As: 10.3.0 Co-Authored-By: Claude Opus 5.5 --- docs/releases/v10.3.0.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/releases/v10.3.0.md diff --git a/docs/releases/v10.3.0.md b/docs/releases/v10.3.0.md new file mode 100644 index 00000000..54e0604a --- /dev/null +++ b/docs/releases/v10.3.0.md @@ -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.