Skip to content

fix(nodejs): publish @terraphim/autocomplete with its native binaries - #1013

Open
AlexMikhalev wants to merge 3 commits into
mainfrom
task/3556-autocomplete-npm-packaging
Open

AlexMikhalev wants to merge 3 commits into
mainfrom
task/3556-autocomplete-npm-packaging

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

@terraphim/autocomplete@1.3.0 cannot load on any platform: Cannot find module 'terraphim_ai_nodejs-darwin-universal'. Its tarball contains only index.js, package.json and the README.

Causes

  • The workflow copied binaries to npm/, which files excludes from the package.
  • optionalDependencies pinned @terraphim/autocomplete-*@1.0.0, none of which exist, while npm/* used terraphim-ai-nodejs-* names. darwin-x64 and linux-x64-gnu had no directory.
  • The workflow published to GitHub Packages. npmjs only ever received the hand-published 1.3.0.

Changes

  • scripts/prepare-npm-packages.mjs generates the platform packages, pins them to the release version and refuses a partial build.
  • A new job installs the packed tarballs into a clean project on each of the five platforms and runs a real search. Publishing depends on it.
  • Publishing now targets npmjs, platform packages first, then repeats the search from the registry.
  • scripts/publish-to-npmjs.sh now refuses a real publish.

Windows on Arm is no longer declared because it has never been built. npm/win32-arm64-msvc and npm/darwin-universal are now unused and can be removed separately.

Not done by this PR: publishing. After merge, 1.3.1 still needs releasing, and 1.3.0 deprecating.

Refs #3556

🤖 Generated with Claude Code

AlexMikhalev and others added 3 commits November 1, 2026 22:44
Version 1.3.0 cannot load: its tarball has no binary and the platform
packages it needs were never published. The workflow copied binaries to a
directory excluded from the package, pinned dependencies that do not
exist, and published to GitHub Packages rather than npm.

Generate correctly named platform packages, pinned to the release version,
and refuse a partial build. Install the packed tarballs on each platform
and run a search before publishing to npm, then repeat from the registry.
Stop the hand-publish script releasing a single-platform package.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workspace resolves crates from the private terraphim registry, and
rust-toolchain.toml pins 1.96, so targets added to stable were unused.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub runners receive 403 downloading from the private registry, and a
public package should not depend on it. Its own dependencies are all on
crates.io; it only reached the registry as a workspace member. Give it its
own workspace, as the public LSP packages have, and commit its lockfile.

Committed without the pre-commit hook, by agreement: its workspace check
fails on this machine on an unmodified base because the local mirror lacks
a locked crate.

Refs #3556

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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