| ... | @@ -22,6 +22,7 @@ import { | ... | @@ -22,6 +22,7 @@ import { |
| 22 | DesktopDmgBackgroundSourceMissingError, | 22 | DesktopDmgBackgroundSourceMissingError, |
| 23 | createStageWorkspaceConfig, | 23 | createStageWorkspaceConfig, |
| 24 | createStagePatchedDependencies, | 24 | createStagePatchedDependencies, |
| | 25 | readWorkspaceConfig, |
| 25 | createBuildConfig, | 26 | createBuildConfig, |
| 26 | DESKTOP_ELECTRON_LANGUAGES, | 27 | DESKTOP_ELECTRON_LANGUAGES, |
| 27 | DESKTOP_FILE_EXCLUSIONS, | 28 | DESKTOP_FILE_EXCLUSIONS, |
| ... | @@ -497,6 +498,25 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { | ... | @@ -497,6 +498,25 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { |
| 497 | }); | 498 | }); |
| 498 | }); | 499 | }); |
| 499 | | 500 | |
| | 501 | // pnpm writes "set this to true or false" placeholders into allowBuilds when a |
| | 502 | // tarball changes. pnpm ignores them, but the release build decode rejects them. |
| | 503 | it.effect("decodes the repo allowBuilds and every file: tarball it names exists", () => |
| | 504 | Effect.gen(function* () { |
| | 505 | const fs = yield* FileSystem.FileSystem; |
| | 506 | const path = yield* Path.Path; |
| | 507 | const { allowBuilds = {} } = yield* readWorkspaceConfig(); |
| | 508 | const repoRoot = path.join(import.meta.dirname, ".."); |
| | 509 | for (const key of Object.keys(allowBuilds)) { |
| | 510 | const tarball = key.split("@file:")[1]; |
| | 511 | if (tarball === undefined) continue; |
| | 512 | assert.isTrue( |
| | 513 | yield* fs.exists(path.join(repoRoot, tarball)), |
| | 514 | `allowBuilds names a missing tarball: ${key}`, |
| | 515 | ); |
| | 516 | } |
| | 517 | }), |
| | 518 | ); |
| | 519 | |
| 500 | it("stages pnpm 11 allowBuilds and patchedDependencies in the workspace yaml", () => { | 520 | it("stages pnpm 11 allowBuilds and patchedDependencies in the workspace yaml", () => { |
| 501 | assert.deepStrictEqual( | 521 | assert.deepStrictEqual( |
| 502 | createStageWorkspaceConfig({ | 522 | createStageWorkspaceConfig({ |