From ce0a03d1333b1dcf5f8aaed6a661ec30a7f840dd Mon Sep 17 00:00:00 2001 From: ImmutableJeffrey Date: Fri, 10 Apr 2026 12:55:49 +1000 Subject: [PATCH] fix(audience): build @imtbl/audience in publish workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The publish workflow's build step (`pnpm build`) runs nx with an explicit project list — `@imtbl/sdk,@imtbl/checkout-widgets`. `@imtbl/audience` was missing, so its `dist/` was never produced before `pnpm pack-npm-packages` ran. Because `@imtbl/audience/package.json` declares `"files": ["dist"]`, `npm pack` then shipped tarballs containing only `package.json` and `LICENSE.md` — no compiled output. Symptom on the registry today: - `@imtbl/audience@0.0.1-alpha.0` and `@imtbl/audience@2.15.0-alpha.21` both install successfully but contain no `dist/`. Anything trying to `import { Audience } from '@imtbl/audience'` fails at module resolution because `package.json#main` points at `dist/node/index.cjs` and the file doesn't exist. PR #2843 added `@imtbl/audience` to the version-seeding step, so it gets version-bumped on every publish — but the build step was never updated in lockstep. Add it here, and rename the workflow step labels so they match what's actually being built/packed. After this lands, the next publish should produce a real tarball. Verify locally with: pnpm build cd packages/audience/sdk && pnpm pack --dry-run The dry-run output should list files under `dist/node/`, `dist/browser/`, and `dist/types/`. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/publish.yaml | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 79ed76b5ab..cf954fd204 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -104,10 +104,10 @@ jobs: - name: Setup new package versions run: pnpm nx release version --specifier ${{ env.RELEASE_TYPE }} $( ${{ env.DRY_RUN }} && echo "--dry-run" || echo "") - - name: Build SDK & Checkout Widgets + - name: Build SDK, Checkout Widgets & Audience run: pnpm build - - name: Pack SDK & Checkout Widgets packages and dependencies + - name: Pack SDK, Checkout Widgets & Audience packages and dependencies run: pnpm pack-npm-packages # ! Do NOT remove any of these attestation subject paths - this will cause a Sev 0 incident ! diff --git a/package.json b/package.json index 42fb672f32..3ad1504eb7 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "responselike": "^2.0.0" }, "scripts": { - "build": "nx run-many -p @imtbl/sdk,@imtbl/checkout-widgets -t build", + "build": "nx run-many -p @imtbl/sdk,@imtbl/checkout-widgets,@imtbl/audience -t build", "build:examples": "pnpm --recursive --filter '@examples/**' build", "build:onlysdk": "NODE_OPTIONS=--max-old-space-size=14366 nx run-many --target=build --projects=@imtbl/sdk && pnpm syncpack:format", "dev": "FORCE_COLOR=1 pnpm --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run transpile && pnpm --parallel --filter @imtbl/sdk... --filter @imtbl/checkout-widgets... run transpile --watch",