Skip to content

Commit d6c92ea

Browse files
committed
fix: unpacking amical/smart-whisper dep
1 parent 8781981 commit d6c92ea

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ jobs:
6666
- name: Setup Node.js
6767
uses: actions/setup-node@v4
6868
with:
69-
node-version: '24'
69+
# 24.2 to at least 24.6 (atm of writing this) has issues with symlink deref in nested directories
70+
node-version: '24.1.0'
7071
cache: 'pnpm'
7172

7273
- name: Log Node.js architecture and platform

apps/desktop/forge.config.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const config: ForgeConfig = {
149149

150150
// Copy the package
151151
console.log(`Copying ${dep}...`);
152-
cpSync(rootDepPath, localDepPath, { recursive: true });
152+
cpSync(rootDepPath, localDepPath, { recursive: true, dereference: true, force: true });
153153
console.log(`✓ Successfully copied ${dep}`);
154154
} catch (error) {
155155
console.error(`Failed to copy ${dep}:`, error);
@@ -169,7 +169,7 @@ const config: ForgeConfig = {
169169

170170
// Read where the symlink points to
171171
const symlinkTarget = readlinkSync(localDepPath);
172-
const absoluteTarget = join(localNodeModules, dep, "..", symlinkTarget);
172+
const absoluteTarget = join(localDepPath, "..", symlinkTarget);
173173
const sourcePath = normalize(absoluteTarget);
174174

175175
console.log(` Symlink points to: ${sourcePath}`);
@@ -314,6 +314,7 @@ const config: ForgeConfig = {
314314
icon: "./assets/logo", // Path to your icon file
315315
appBundleId: "com.amical.desktop", // Proper bundle ID
316316
extraResource: [
317+
`${process.platform === "win32" ? "../../packages/native-helpers/windows-helper/bin" : "../../packages/native-helpers/swift-helper/bin"}`,
317318
"./src/db/migrations",
318319
// Only include the platform-specific node binary
319320
`./node-binaries/${process.platform}-${process.arch}/node${
@@ -398,15 +399,17 @@ const config: ForgeConfig = {
398399
}
399400

400401
// Handle scoped packages: if dep is @scope/package, also keep @scope/ directory
402+
// But not for our workspace packages
401403
if (dep.includes("/") && dep.startsWith("@")) {
402404
const scopeDir = dep.split("/")[0]; // @libsql/client -> @libsql
403405
// for workspace packages only keep the actual package
404406
if (scopeDir === "@amical") {
405-
if (filePath.startsWith(`/node_modules/${dep}/`)) {
407+
if (filePath.startsWith(`/node_modules/${dep}`) ||
408+
filePath === `/node_modules/${scopeDir}`) {
406409
KEEP_FILE.keep = true;
407410
KEEP_FILE.log = true;
408411
}
409-
break;
412+
continue;
410413
}
411414
if (
412415
filePath === `/node_modules/${scopeDir}/` ||

0 commit comments

Comments
 (0)