| ... | @@ -278,8 +278,22 @@ interface StagePackageJson { | ... | @@ -278,8 +278,22 @@ interface StagePackageJson { |
| 278 | | 278 | |
| 279 | export function createStagePnpmConfig( | 279 | export function createStagePnpmConfig( |
| 280 | patchedDependencies: Record<string, string>, | 280 | patchedDependencies: Record<string, string>, |
| | 281 | dependencies: Record<string, unknown>, |
| 281 | ): StagePackageJson["pnpm"] | undefined { | 282 | ): StagePackageJson["pnpm"] | undefined { |
| 282 | return Object.keys(patchedDependencies).length > 0 ? { patchedDependencies } : undefined; | 283 | const stagePatchedDependencies = Object.fromEntries( |
| | 284 | Object.entries(patchedDependencies).filter(([patchKey]) => |
| | 285 | Object.hasOwn(dependencies, getPatchedDependencyPackageName(patchKey)), |
| | 286 | ), |
| | 287 | ); |
| | 288 | |
| | 289 | return Object.keys(stagePatchedDependencies).length > 0 |
| | 290 | ? { patchedDependencies: stagePatchedDependencies } |
| | 291 | : undefined; |
| | 292 | } |
| | 293 | |
| | 294 | function getPatchedDependencyPackageName(patchKey: string): string { |
| | 295 | const versionSeparator = patchKey.lastIndexOf("@"); |
| | 296 | return versionSeparator > 0 ? patchKey.slice(0, versionSeparator) : patchKey; |
| 283 | } | 297 | } |
| 284 | | 298 | |
| 285 | const AzureTrustedSigningOptionsConfig = Config.all({ | 299 | const AzureTrustedSigningOptionsConfig = Config.all({ |
| ... | @@ -878,7 +892,11 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( | ... | @@ -878,7 +892,11 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( |
| 878 | // electron-builder is filtering out stageResourcesDir directory in the AppImage for production | 892 | // electron-builder is filtering out stageResourcesDir directory in the AppImage for production |
| 879 | yield* fs.copy(stageResourcesDir, path.join(stageAppDir, "apps/desktop/prod-resources")); | 893 | yield* fs.copy(stageResourcesDir, path.join(stageAppDir, "apps/desktop/prod-resources")); |
| 880 | | 894 | |
| 881 | const stagePnpmConfig = createStagePnpmConfig(workspacePatchedDependencies); | 895 | const stageDependencies = { |
| | 896 | ...resolvedServerDependencies, |
| | 897 | ...resolvedDesktopRuntimeDependencies, |
| | 898 | }; |
| | 899 | const stagePnpmConfig = createStagePnpmConfig(workspacePatchedDependencies, stageDependencies); |
| 882 | const stagePackageJson: StagePackageJson = { | 900 | const stagePackageJson: StagePackageJson = { |
| 883 | name: "t3code", | 901 | name: "t3code", |
| 884 | version: appVersion, | 902 | version: appVersion, |
| ... | @@ -897,10 +915,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( | ... | @@ -897,10 +915,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( |
| 897 | options.mockUpdates, | 915 | options.mockUpdates, |
| 898 | options.mockUpdateServerPort, | 916 | options.mockUpdateServerPort, |
| 899 | ), | 917 | ), |
| 900 | dependencies: { | 918 | dependencies: stageDependencies, |
| 901 | ...resolvedServerDependencies, | | |
| 902 | ...resolvedDesktopRuntimeDependencies, | | |
| 903 | }, | | |
| 904 | devDependencies: { | 919 | devDependencies: { |
| 905 | electron: electronVersion, | 920 | electron: electronVersion, |
| 906 | }, | 921 | }, |