Create polished demo videos without editing skills. Mac/Windows/Linux
chore(ci): address quality review feedback
wiiiii1234e56bd6763ea
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.ymlindex 3b8169b8..45e5f651 100644--- a/.github/workflows/quality.yml+++ b/.github/workflows/quality.yml@@ -47,6 +47,11 @@ jobs:if: ${{ !cancelled() && steps.install.outcome == 'success' }}run: npm run lint+ - name: Check formatting (advisory)+ if: ${{ !cancelled() && steps.install.outcome == 'success' }}+ continue-on-error: true+ run: npm run format:check+- name: Testif: ${{ !cancelled() && steps.install.outcome == 'success' }}run: npm testdiff --git a/electron/ipc/paths/binaries.test.ts b/electron/ipc/paths/binaries.test.tsindex 5b89d957..36186173 100644--- a/electron/ipc/paths/binaries.test.ts+++ b/electron/ipc/paths/binaries.test.ts@@ -27,6 +27,14 @@ describe("Windows native helper path resolution", () => {await fs.rm(tempRoot, { recursive: true, force: true });});+ it("resolves a requested platform tag independently of the host platform", async () => {+ const { getNativeArchTag } = await import("./binaries");++ expect(getNativeArchTag("win32")).toBe(+ process.arch === "arm64" ? "win32-arm64" : "win32-x64",+ );+ });+it("prefers the branch-staged helper over a stale local CMake build in dev", async () => {const buildOutputPath = path.join(appPath,diff --git a/electron/ipc/paths/binaries.ts b/electron/ipc/paths/binaries.tsindex a95a79cf..3e15f332 100644--- a/electron/ipc/paths/binaries.ts+++ b/electron/ipc/paths/binaries.ts@@ -29,31 +29,33 @@ export function getNativeCaptureHelperSourcePath(): string {return resolveUnpackedAppPath("electron", "native", "ScreenCaptureKitRecorder.swift");}-export function getNativeArchTag(): string {- if (process.platform === "darwin") {+export function getNativeArchTag(platform: NodeJS.Platform = process.platform): string {+ if (platform === "darwin") {return process.arch === "arm64" ? "darwin-arm64" : "darwin-x64";}- if (process.platform === "win32") {+ if (platform === "win32") {return process.arch === "arm64" ? "win32-arm64" : "win32-x64";}- if (process.platform === "linux") {+ if (platform === "linux") {return process.arch === "arm64" ? "linux-arm64" : "linux-x64";}- return `${process.platform}-${process.arch}`;+ return `${platform}-${process.arch}`;}-export function getPrebundledNativeHelperPath(binaryName: string): string {- return resolveUnpackedAppPath("electron", "native", "bin", getNativeArchTag(), binaryName);+export function getPrebundledNativeHelperPath(+ binaryName: string,+ archTag = getNativeArchTag(),+): string {+ return resolveUnpackedAppPath("electron", "native", "bin", archTag, binaryName);}export function resolvePreferredWindowsNativeHelperPath(helperDirectory: string,binaryName: string,): string {- const windowsArchTag = process.arch === "arm64" ? "win32-arm64" : "win32-x64";const buildOutputPath = resolveUnpackedAppPath("electron","native",@@ -62,13 +64,7 @@ export function resolvePreferredWindowsNativeHelperPath("Release",binaryName,);- const prebundledPath = resolveUnpackedAppPath(- "electron",- "native",- "bin",- windowsArchTag,- binaryName,- );+ const prebundledPath = getPrebundledNativeHelperPath(binaryName, getNativeArchTag("win32"));if (app.isPackaged && existsSync(prebundledPath)) {return prebundledPath;