From 28e1a9e22ff6203b18744cc0b7a92e9f0a2d5516 Mon Sep 17 00:00:00 2001 From: "Timo K." Date: Tue, 13 Oct 2026 18:48:39 +0200 Subject: [PATCH] Keep the CI sdk package name so main's preview deploy finds it ploy previews run pr-deploy.yaml from main, which downloads build-output-sdk, so a renamed artifact can never be found from a pull request. Keep the package name and point build:sdk:production and build:sdk:development at the CallViewModel bundle the preview is meant to carry. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/build-element-call.yaml | 1 + .github/workflows/build.yaml | 5 ++++- docs/agents/architecture.md | 4 +++- package.json | 4 ++-- sdk-target-based-on-call-view-model/README.md | 7 +++++-- sdk-target-based-on-call-view-model/main.ts | 3 ++- vite-sdk-target-based-on-call-view-model.config.ts | 1 - 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-element-call.yaml b/.github/workflows/build-element-call.yaml index b35948d75..c885a85d7 100644 --- a/.github/workflows/build-element-call.yaml +++ b/.github/workflows/build-element-call.yaml @@ -64,5 +64,6 @@ jobs: with: name: build-output-${{ inputs.package }} path: dist + if-no-files-found: error # We'll only use this in a triggered job, then we're done with it retention-days: 1 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fe10723d..2afe922ab 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -73,7 +73,10 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} build_sdk_element_call: - # Use the embedded package vite build + # The 'sdk' package is the CallViewModel bundle that predates the sdk/ + # package (build:sdk:production, sdk-target-based-on-call-view-model/), not + # the package itself. The name is shared with pr-deploy.yaml, which always + # runs from main, so it stays until the bundle's consumers have moved over. uses: ./.github/workflows/build-element-call.yaml with: package: sdk diff --git a/docs/agents/architecture.md b/docs/agents/architecture.md index 5b765d280..71a6c8215 100644 --- a/docs/agents/architecture.md +++ b/docs/agents/architecture.md @@ -78,7 +78,9 @@ Code that builds in only one is a bug. `pnpm lint:externals`). Interface only so far; the design is `sdk-plan.md`. - `build:sdk-target-based-on-call-view-model` — the SDK demo that predates the package, one bundle of the `CallViewModel`; entry - `sdk-target-based-on-call-view-model/main.ts`. + `sdk-target-based-on-call-view-model/main.ts`. CI's `sdk` package + (`build:sdk:production` / `build:sdk:development`, the Netlify `-sdk` preview) + is still this bundle, not `build:sdk`. - `build:component` — `@element-hq/element-call-component`, sources in `component/` (its own pnpm project; run pnpm from the repo root). Host API is in the README; `pnpm lint:externals` rejects an import of a `react` / `react-dom` / diff --git a/package.json b/package.json index cd75a791b..089ed4b5a 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,9 @@ "build:sdk": "pnpm build:sdk:js && pnpm build:sdk:types", "build:sdk:js": "pnpm build:full --config vite-sdk.config.js", "build:sdk:types": "tsc -p sdk/tsconfig.build.json", - "build:sdk:production": "pnpm build:sdk", - "build:sdk:development": "pnpm build:sdk:js --mode development && pnpm build:sdk:types", "build:sdk-target-based-on-call-view-model": "pnpm build:full --config vite-sdk-target-based-on-call-view-model.config.js", + "build:sdk:production": "pnpm build:sdk-target-based-on-call-view-model", + "build:sdk:development": "pnpm build:sdk-target-based-on-call-view-model --mode development", "build:component": "pnpm build:component:js && pnpm build:component:types", "build:component:js": "pnpm build:full --config vite-component.config.js", "build:component:types": "tsc -p component/tsconfig.build.json", diff --git a/sdk-target-based-on-call-view-model/README.md b/sdk-target-based-on-call-view-model/README.md index 4ead105ae..1715bda8e 100644 --- a/sdk-target-based-on-call-view-model/README.md +++ b/sdk-target-based-on-call-view-model/README.md @@ -23,8 +23,11 @@ pnpm build:sdk-target-based-on-call-view-model in the repository root. (`pnpm build:sdk` builds the `sdk/` package instead.) -It will create `sdk-target-based-on-call-view-model/dist` containing the compiled js -file, `matrixrtc-sdk.js`. +CI's `sdk` package (`build:sdk:production`, `build:sdk:development`, the +`build-output-sdk` artifact and the `pr-sdk` Netlify preview) is still this +bundle, not the `sdk/` package, until its consumers have moved over. + +It will create `dist` containing the compiled js file, `matrixrtc-sdk.js`. This file needs to be hosted. Locally (via `npx serve -l 81234 --cors`) or on a remote server. diff --git a/sdk-target-based-on-call-view-model/main.ts b/sdk-target-based-on-call-view-model/main.ts index 3932d1190..0a4233dc0 100644 --- a/sdk-target-based-on-call-view-model/main.ts +++ b/sdk-target-based-on-call-view-model/main.ts @@ -8,7 +8,8 @@ Please see LICENSE in the repository root for full details. /** * EXPERIMENTAL * - * This file is the entrypoint for the sdk build of element call: `pnpm build:sdk` + * This file is the entrypoint for the sdk build of element call: + * `pnpm build:sdk-target-based-on-call-view-model` * use in widgets. * It exposes the `createMatrixRTCSdk` which creates the `MatrixRTCSdk` interface (see below) that * can be used to join a rtc session and exchange realtime data. diff --git a/vite-sdk-target-based-on-call-view-model.config.ts b/vite-sdk-target-based-on-call-view-model.config.ts index c0cf8f3f0..6e242219f 100644 --- a/vite-sdk-target-based-on-call-view-model.config.ts +++ b/vite-sdk-target-based-on-call-view-model.config.ts @@ -18,7 +18,6 @@ export default defineConfig(() => ({ // Otherwise the developer's own config.json in `public` is copied into the output publicDir: false, build: { - outDir: "sdk-target-based-on-call-view-model/dist", sourcemap: true, manifest: true, lib: {