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 2020extern "C" {
2121#endif
2222
23- #define CLOUDSYNC_VERSION "0.8.61 "
23+ #define CLOUDSYNC_VERSION "0.8.62 "
2424
2525int sqlite3_cloudsync_init (sqlite3 * db , char * * pzErrMsg , const sqlite3_api_routines * pApi );
2626
You can’t perform that action at this time.
0 commit comments