From a693a5f66f64d7c39ce4296300dc555fb0b03096 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Wed, 18 Nov 2026 15:29:54 +0100 Subject: [PATCH] ui: llama-chat publish drops the registry check, bin paths without ./ (#32543) * ui: llama-chat publish waits for the registry, bin paths without ./ The first publish of @ggml-org/llama-chat took about four minutes to show up on the registry, so the 60 seconds the check after publishing waited failed a release that had gone through. It now waits up to ten minutes. npm normalizes "./bin/cli.js" to "bin/cli.js" on publish and warns that the bin was "invalid and removed", which reads as if the command was dropped. Both package.json files now give the paths as npm writes them. Assisted-by: Claude (Opus 5.5 Medium) * ui: drop the registry check after llama-chat publishes npm publish already fails when the registry refuses a package, and the check after it only failed a release that had gone through, while npm was still processing it. Nothing waits on the registry any more. Assisted-by: Claude (Opus 5.5 Medium) --- .github/workflows/ui-chat-publish.yml | 19 ------------------- ui/apps/chat/alias/package.json | 2 +- ui/apps/chat/package.json | 2 +- ui/apps/chat/tests/unit/cli.test.ts | 2 +- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ui-chat-publish.yml b/.github/workflows/ui-chat-publish.yml index 2de0907b9..193aa375f 100644 --- a/.github/workflows/ui-chat-publish.yml +++ b/.github/workflows/ui-chat-publish.yml @@ -145,25 +145,6 @@ jobs: run: npm publish --access public --provenance --ignore-scripts --tag "$TAG" working-directory: ${{ env.ALIAS_DIR }} - - name: Verify they landed - if: github.ref == 'refs/heads/master' && (steps.app.outputs.should_publish == 'true' || steps.alias.outputs.should_publish == 'true') && inputs.dry_run != true - env: - VERSION: ${{ steps.app.outputs.version }} - run: | - # the registry can serve a new version some time after publish returns - for name in @ggml-org/llama-chat llama-chat; do - for try in 1 2 3 4 5 6; do - if [ "$(npm view "$name@$VERSION" version 2>/dev/null || true)" = "$VERSION" ]; then - echo "$name@$VERSION is on npm" - continue 2 - fi - echo "$name@$VERSION not visible yet (attempt $try of 6)" - sleep 10 - done - echo "::error::$name@$VERSION published without error but is not visible on the registry. Check npm before publishing again." - exit 1 - done - - name: Report if: always() # values reach the shell through env, so a name from a PR's package.json cannot inject here diff --git a/ui/apps/chat/alias/package.json b/ui/apps/chat/alias/package.json index 8dd541ed4..8de00aa8c 100644 --- a/ui/apps/chat/alias/package.json +++ b/ui/apps/chat/alias/package.json @@ -19,7 +19,7 @@ "bugs": "https://github.com/ggml-org/llama.cpp/issues", "type": "module", "bin": { - "llama-chat": "./cli.js" + "llama-chat": "cli.js" }, "files": [ "cli.js" diff --git a/ui/apps/chat/package.json b/ui/apps/chat/package.json index ee0e9aafa..0586429d8 100644 --- a/ui/apps/chat/package.json +++ b/ui/apps/chat/package.json @@ -19,7 +19,7 @@ "bugs": "https://github.com/ggml-org/llama.cpp/issues", "type": "module", "bin": { - "llama-chat": "./bin/cli.js" + "llama-chat": "bin/cli.js" }, "exports": { "./cli": "./bin/cli.js", diff --git a/ui/apps/chat/tests/unit/cli.test.ts b/ui/apps/chat/tests/unit/cli.test.ts index fc573064c..d55be9a8f 100644 --- a/ui/apps/chat/tests/unit/cli.test.ts +++ b/ui/apps/chat/tests/unit/cli.test.ts @@ -71,7 +71,7 @@ describe('llama-chat packages', () => { const alias = await read('../../alias/package.json'); expect(app.private).toBeUndefined(); - expect(app.bin['llama-chat']).toBe('./bin/cli.js'); + expect(app.bin['llama-chat']).toBe('bin/cli.js'); expect(alias.version).toBe(app.version); expect(alias.dependencies[app.name]).toBe(app.version); });