File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11import { resolve } from 'node:path' ;
22import { existsSync } from 'node:fs' ;
3+ import { createRequire } from 'node:module' ;
34import {
45 getCurrentPlatform ,
56 getPlatformPackageName ,
67 getBinaryName ,
78 type Platform
89} from './platform.js' ;
910
11+ // Create a require function that works in both CommonJS and ESM
12+ const require = createRequire ( import . meta. url ) ;
13+
1014/**
1115 * Error thrown when the SQLite Sync extension cannot be found
1216 */
@@ -25,8 +29,6 @@ function tryLoadPlatformPackage(): string | null {
2529 try {
2630 const packageName = getPlatformPackageName ( ) ;
2731
28- // Try to dynamically import the platform package
29- // This works in both CommonJS and ESM
3032 const platformPackage = require ( packageName ) ;
3133
3234 if ( platformPackage ?. path && typeof platformPackage . path === 'string' ) {
Original file line number Diff line number Diff line change 1717extern "C" {
1818#endif
1919
20- #define CLOUDSYNC_VERSION "0.9.8 "
20+ #define CLOUDSYNC_VERSION "0.9.81 "
2121#define CLOUDSYNC_MAX_TABLENAME_LEN 512
2222
2323#define CLOUDSYNC_VALUE_NOTSET -1
You can’t perform that action at this time.
0 commit comments