Skip to content

Platform packages publish ~116MB of orphaned source maps, tripping the release size gate #1218

Description

@sahrizvi

Problem

Platform packages ship ~116MB of orphaned source maps, which pushed the release tarball to 191MB compressed against the release gate's 190MB threshold — and npm hard-rejects platform tarballs around 200MB with E413.

Bun.build in packages/opencode/script/build.ts compiles with sourcemap: "external", so it writes index.js.map (66MB) and worker.js.map (50MB) next to the binary. But the bundles those maps describe are compiled into the single-file executable, so the published package contained .map files with no .js companion — unusable by any consumer that follows sourceMappingURL, and not read by the binary at runtime (verified: it runs, prints --help, and reports errors normally with them deleted).

Impact

The release was one megabyte from a failing gate and ~9MB from an E413 publish failure, for files nothing can consume.

Fix

files allowlist on the generated platform package.json, keeping the maps emitted for local dist/ debugging but out of what is published.

  • 191MB → 171MB compressed
  • 574MB → 463MB unpacked
  • Both bin/altimate and bin/altimate-code still shipped

Confirmed end-to-end by the Verdaccio sanity suite: a real npm publishnpm install -g with the maps absent from the tarball and the binary resolving correctly.

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