Skip to content

Publish the npm binaries as versions of @funky-dev/cli - #6

Merged
jinxi97 merged 1 commit into
mainfrom
jinxi97/npm-single-package
Oct 29, 2026
Merged

jinxi97 merged 1 commit into
mainfrom
jinxi97/npm-single-package

Conversation

@jinxi97

@jinxi97 jinxi97 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What

Ships the npm binaries the way @openai/codex does: as versions of the one package instead of six separate @funky-dev/cli-<platform> packages.

  • Each platform's binary is published as @funky-dev/cli@<version>-<platform> (for example 0.1.1-darwin-arm64, with os/cpu set). Each goes on a per-platform dist-tag (darwin-arm64, …), so none of them becomes latest, and the tag list stays at 6 + latest/next however many releases there are.
  • @funky-dev/cli@<version> lists them as aliased optional dependencies: "@funky-dev/cli-darwin-arm64": "npm:@funky-dev/cli@0.1.1-darwin-arm64". npm installs only the matching one, under the same folder name as before, so bin/funky.js is unchanged apart from its comment.
  • The "already published?" check no longer prints npm's E404 for versions that aren't out yet. It made a successful run look like it failed.

Why: one package to own, one trusted-publisher setup instead of seven, and one package on npm. Installs work exactly as before.

After this ships (v0.1.1), the six @funky-dev/cli-* packages that 0.1.0 uses get deprecated with a pointer to @funky-dev/cli.

Testing

Against a local Verdaccio registry, using the real v0.1.0 release binaries:

  • node npm/publish.mjs (with --provenance removed, which only works in CI) publishes the 6 platform versions and then the main one. Dist-tags: latest: 0.1.0 plus one per platform. A second run skips all 7 as already published.
  • npm install -g @funky-dev/cli on macOS arm64 installs cli + cli-darwin-arm64 (2 packages), and funky --version prints 0.1.0. npx @funky-dev/cli --version works too.
  • npm install --os/--cpu for linux/x64, linux/arm64, win32/arm64 and darwin/x64 each installs only its own build (0.1.0-<platform>).
  • pnpm 11 and bun install it and run funky --version.

🤖 Generated with Claude Code

Instead of six @funky-dev/cli-<platform> packages, each platform's binary
is now published as a version of @funky-dev/cli itself
(0.1.1-darwin-arm64, …, each on its own platform dist-tag so none becomes
latest), and the main version depends on them through npm aliases
(@funky-dev/cli-darwin-arm64: npm:@funky-dev/cli@0.1.1-darwin-arm64), the
way @openai/codex ships. Installs are unchanged, and there is one package
to own, configure trusted publishing for, and show on npm.

The already-published check no longer prints npm's 404 for versions that
aren't out yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jinxi97
jinxi97 merged commit 589e8ac into main Oct 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant