Skip to content

Commit 63bdf9d

Browse files
github-actions[bot]simolus3
authored andcommitted
Version Packages
1 parent aa90aa0 commit 63bdf9d

File tree

6 files changed

+42
-52
lines changed

6 files changed

+42
-52
lines changed

.changeset/hungry-spiders-perform.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/khaki-years-design.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/seven-fireants-boil.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

.changeset/wet-cooks-dress.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/node/CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# @powersync/node
22

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+
344
## 0.11.1
445

546
### Patch Changes

packages/node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@powersync/node",
3-
"version": "0.11.1",
3+
"version": "0.12.0",
44
"publishConfig": {
55
"registry": "https://registry.npmjs.org/",
66
"access": "public"

0 commit comments

Comments
 (0)