chore(deps): drop better-sqlite3 and its desktop packaging support
The SQLite write into OpenCode's database was the only consumer of better-sqlite3 in the repository. Everything that existed to ship its native binary went with it: - the dependency in @openchamber/web and @openchamber/electron - the afterPack hook staging better_sqlite3.node into app.asar.unpacked - a dedicated @electron/rebuild pass (onlyModules) and its binary assertion, so desktop packaging now runs one native rebuild instead of two - the bundler external entry and the AppImage required-native-module check Desktop packaging, the AppImage verification tests, and the extension bundle were re-validated after a clean reinstall, so no stale module could satisfy a missed import.
This commit is contained in:
@@ -5,23 +5,6 @@ module.exports = (context) => {
|
||||
const resourcesPath = context.electronPlatformName === 'darwin'
|
||||
? path.join(context.appOutDir, `${context.packager.appInfo.productFilename}.app`, 'Contents', 'Resources')
|
||||
: path.join(context.appOutDir, 'resources');
|
||||
const betterSqliteDir = path.dirname(require.resolve('better-sqlite3/package.json'));
|
||||
const betterSqliteBinary = path.join(betterSqliteDir, 'build', 'Release', 'better_sqlite3.node');
|
||||
if (!fs.existsSync(betterSqliteBinary)) {
|
||||
throw new Error(`Missing rebuilt better-sqlite3 binary at ${betterSqliteBinary}`);
|
||||
}
|
||||
const packagedBetterSqliteBinary = path.join(
|
||||
resourcesPath,
|
||||
'app.asar.unpacked',
|
||||
'node_modules',
|
||||
'better-sqlite3',
|
||||
'build',
|
||||
'Release',
|
||||
'better_sqlite3.node',
|
||||
);
|
||||
fs.mkdirSync(path.dirname(packagedBetterSqliteBinary), { recursive: true });
|
||||
fs.copyFileSync(betterSqliteBinary, packagedBetterSqliteBinary);
|
||||
|
||||
if (context.electronPlatformName !== 'darwin') return;
|
||||
|
||||
const sourceAssetsPath = path.join(__dirname, '..', 'resources', 'icons', 'Assets.car');
|
||||
|
||||
Reference in New Issue
Block a user