From 5f3f71a5e703f147cfea8a08e4b8a6530efe633c Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 31 Jul 2026 18:13:56 +0000 Subject: [PATCH] test(install): bootstrap e2e CLI via npm pack tarball install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running cli/dist/index.js in-checkout fails after build-npm.sh swaps in the publishable package.json (externals like zod are not linked by pnpm). Pack and npm-install the tarball instead — the same layout npm users get. Co-Authored-By: Claude Fable 5 --- scripts/e2e-install-lifecycle.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/e2e-install-lifecycle.sh b/scripts/e2e-install-lifecycle.sh index d69774bd757..a4a1357b7c2 100755 --- a/scripts/e2e-install-lifecycle.sh +++ b/scripts/e2e-install-lifecycle.sh @@ -72,8 +72,17 @@ if bash scripts/build-npm.sh --skip-checks --skip-typecheck > "$HOME/e2e-bootstr else tail -40 "$HOME/e2e-bootstrap-build.log"; fail_ "1c bootstrap build-npm.sh"; exit 1 fi -BOOTSTRAP_CLI="$BOOT/cli/dist/index.js" -[ -f "$BOOTSTRAP_CLI" ] || { fail_ "1d bootstrap CLI artifact missing"; exit 1; } +# The in-checkout dist resolves externals against the publishable package.json, +# so run the bootstrap exactly the way npm users get it: pack + install the tarball. +TARBALL="$(cd "$BOOT/cli" && npm pack --silent 2>/dev/null | tail -1)" +mkdir -p "$HOME/e2e-bootstrap-cli" +if (cd "$HOME/e2e-bootstrap-cli" && npm install --no-fund --no-audit "$BOOT/cli/$TARBALL" > "$HOME/e2e-bootstrap-npm.log" 2>&1); then + pass "1d bootstrap CLI packed + npm-installed ($TARBALL)" +else + tail -40 "$HOME/e2e-bootstrap-npm.log"; fail_ "1d bootstrap CLI npm install"; exit 1 +fi +BOOTSTRAP_CLI="$HOME/e2e-bootstrap-cli/node_modules/paperclipai/dist/index.js" +node "$BOOTSTRAP_CLI" --version >/dev/null || { fail_ "1e bootstrap CLI smoke"; exit 1; } cd "$HOME" if [ "${E2E_SKIP_CANARY:-0}" != "1" ]; then