History

fix build (#1859)

Julius Marminge committed 7 months ago

Commit 8a2f1431 parent 86ab8743 files · +20 −0Browse files

Showing the changes to scripts (1 of 3 files). Show all

Unified · Split

scripts/build-desktop-artifact.ts+16−0
@@ -182,6 +182,7 @@ interface StagePackageJson { · 181 unmodified lines
182182 readonly devDependencies: {
183183 readonly electron: string;
184184 };
185+ readonly overrides: Record<string, unknown>;
185186 }
186187
187188 const AzureTrustedSigningOptionsConfig = Config.all({
@@ -570,6 +571,20 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( · 382 unmodified lines
570571 });
571572 }
572573
574+ const resolvedOverrides = yield* Effect.try({
575+ try: () =>
576+ resolveCatalogDependencies(
577+ rootPackageJson.overrides,
578+ rootPackageJson.workspaces.catalog,
579+ "apps/desktop",
580+ ),
581+ catch: (cause) =>
582+ new BuildScriptError({
583+ message: "Could not resolve overrides from package.json.",
584+ cause,
585+ }),
586+ });
587+
573588 const resolvedServerDependencies = yield* Effect.try({
574589 try: () =>
575590 resolveCatalogDependencies(
@@ -677,6 +692,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( · 101 unmodified lines
677692 devDependencies: {
678693 electron: electronVersion,
679694 },
695+ overrides: resolvedOverrides,
680696 };
681697
682698 const stagePackageJsonString = yield* encodeJsonString(stagePackageJson);