Skip to content

bug: refactor npm tarballs include compiled native binaries #2258

Description

@aidandaly24

Description

On the refactor branch, the npm package's files allowlist includes all of dist. Packing a workspace after compiling native binaries therefore includes dist/bin and any other stale build output in the npm tarball.

Reproduction

bun install --frozen-lockfile
bun run build
bun run compile:linux-x64
bun pm pack --ignore-scripts
tar -tzf aws-agentcore-*.tgz

No publishing is needed to reproduce this.

Actual Behavior

The tarball includes dist/bin/agentcore-linux-x64. In a local reproduction, adding just this binary increased the compressed package from 1.44 MB to 40.37 MB. Other files left under dist, such as source maps, logs, and old build directories, are also included.

The automated release currently packs before compilation, which avoids the binaries on a fresh runner, but the package metadata does not enforce that separation for manual packaging or a reused build directory.

Expected Behavior

Publish only the Node launcher, Node bundle, runtime assets, and standard package metadata to npm. Keep standalone native binaries as separate GitHub release assets, regardless of build/pack order.

Environment

  • Branch: refactor
  • Base commit: 4fe2c108
  • Bun: 1.4.0
  • Platform: Linux x64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions