Skip to content

fix(audience): build @imtbl/audience in publish workflow#2845

Merged
ImmutableJeffrey merged 1 commit intomainfrom
fix/audience-build-in-publish-workflow
Apr 10, 2026
Merged

fix(audience): build @imtbl/audience in publish workflow#2845
ImmutableJeffrey merged 1 commit intomainfrom
fix/audience-build-in-publish-workflow

Conversation

@ImmutableJeffrey
Copy link
Copy Markdown
Contributor

@ImmutableJeffrey ImmutableJeffrey commented Apr 10, 2026

Problem

@imtbl/audience is published to npm but the package is empty — no dist/ folder, just package.json and LICENSE.md. Anything trying to import from it fails at module resolution because the entry point file (dist/node/index.cjs) doesn't exist.

$ npm pack @imtbl/audience@alpha --dry-run --json | jq -r '.[].files[].path'
LICENSE.md
package.json

Cause

The publish workflow runs pnpm build with an explicit list of packages:

"build": "nx run-many -p @imtbl/sdk,@imtbl/checkout-widgets -t build"

@imtbl/audience isn't in the list, so it's never built before the pack step. The pack step then ships an empty tarball because @imtbl/audience/package.json only includes dist/ and there's nothing there.

Fix

Add @imtbl/audience to the build list. Update the workflow step labels so they match what's actually built and packed.

Test plan

  • Trigger the publish workflow via workflow_dispatch with dry_run: true and check the resulting imtbl-audience-*.tgz artifact for files under dist/.
  • Or verify locally:
    pnpm build
    cd packages/audience/sdk && pnpm pack --dry-run
    
    Output should list files under dist/node/, dist/browser/, and dist/types/.

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@ImmutableJeffrey ImmutableJeffrey requested review from a team as code owners April 10, 2026 02:56
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 10, 2026

View your CI Pipeline Execution ↗ for commit ce0a03d

Command Status Duration Result
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-10 03:50:08 UTC

@ImmutableJeffrey ImmutableJeffrey added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit d76c8e2 Apr 10, 2026
20 of 23 checks passed
@ImmutableJeffrey ImmutableJeffrey deleted the fix/audience-build-in-publish-workflow branch April 10, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants