|
1 | 1 | # @powersync/node |
2 | 2 |
|
| 3 | +## 0.12.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- 688265f: Experimental support for integrating with node:sqlite. |
| 8 | +- 688265f: Support custom better-sqlite3 forks (see an example for encryption in the README). |
| 9 | +- aa90aa0: Pre-package all the PowerSync Rust extension binaries for all supported platforms and architectures in the NPM package `lib` folder. Install scripts are no longer required to download the PowerSync core. |
| 10 | + |
| 11 | + The binary files relevant to a specific architecture now have updated filenames. Custom code which previously referenced binary filenames requires updating. A helper function is available to automatically provide the correct filename. |
| 12 | + |
| 13 | + ```diff |
| 14 | + + import { getPowerSyncExtensionFilename } from '@powersync/node/worker.js'; |
| 15 | + |
| 16 | + function resolvePowerSyncCoreExtension() { |
| 17 | + - const platform = OS.platform(); |
| 18 | + - let extensionPath: string; |
| 19 | + - if (platform === 'win32') { |
| 20 | + - extensionPath = 'powersync.dll'; |
| 21 | + - } else if (platform === 'linux') { |
| 22 | + - extensionPath = 'libpowersync.so'; |
| 23 | + - } else if (platform === 'darwin') { |
| 24 | + - extensionPath = 'libpowersync.dylib'; |
| 25 | + - } else { |
| 26 | + - throw 'Unknown platform, PowerSync for Node.js currently supports Windows, Linux and macOS.'; |
| 27 | + - } |
| 28 | + + const extensionPath = getPowerSyncExtensionFilename(); |
| 29 | + |
| 30 | + // This example uses copy-webpack-plugin to copy the prebuilt library over. This ensures that it is |
| 31 | + // available in packaged release builds. |
| 32 | + let libraryPath = path.resolve(__dirname, 'powersync', extensionPath); |
| 33 | + ``` |
| 34 | + |
| 35 | +- 688265f: Use upstream better-sqlite3 dependency instead of the PowerSync fork. |
| 36 | + |
| 37 | + After upgrading: |
| 38 | + |
| 39 | + 1. Ensure you no longer depend on the `@powersync/better-sqlite3` package: `npm uninstall @powersync/better-sqlite3`. |
| 40 | + 2. Unlike in older versions, the upstream `better-sqlite3` dependency is marked as optional since custom forks |
| 41 | + are supported too. |
| 42 | + Use `npm install better-sqlite3` to install it. |
| 43 | + |
3 | 44 | ## 0.11.1 |
4 | 45 |
|
5 | 46 | ### Patch Changes |
|
0 commit comments