You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/seven-fireants-boil.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,28 @@
2
2
'@powersync/node': minor
3
3
---
4
4
5
-
Pre-package all the PowerSync Rust extension binaries for all supported platforms in the NPM package. Install scripts are no longer required to download the PowerSync core.
5
+
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.
6
+
7
+
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.
8
+
9
+
```diff
10
+
+ import { getPowerSyncExtensionFilename } from '@powersync/node/worker.js';
11
+
12
+
function resolvePowerSyncCoreExtension() {
13
+
- const platform = OS.platform();
14
+
- let extensionPath: string;
15
+
- if (platform === 'win32') {
16
+
- extensionPath = 'powersync.dll';
17
+
- } else if (platform === 'linux') {
18
+
- extensionPath = 'libpowersync.so';
19
+
- } else if (platform === 'darwin') {
20
+
- extensionPath = 'libpowersync.dylib';
21
+
- } else {
22
+
- throw 'Unknown platform, PowerSync for Node.js currently supports Windows, Linux and macOS.';
0 commit comments