From 04e3c9484e7621bef9c55344b414fc2fe68d0ee2 Mon Sep 17 00:00:00 2001 From: Faraazuddin Mohammed Date: Sun, 10 May 2026 02:10:11 -0400 Subject: [PATCH] fix(cli): chmod +x dist/index.js so npx invocation works on Linux The published `dist/index.js` was emitted by tsc without an execute bit (`-rw-r--r--`). On macOS, npm-install side-loads +x for entries listed in `bin`. On Linux runners, the symlink at `node_modules/.bin/tokenometer` points at a non-executable target, so: $ npx --yes tokenometer@0.1.0 --version sh: 1: tokenometer: not found (Caught by the smoke-test job in the v0.1.0 release workflow.) Build script now chains `chmod +x dist/index.js` after `tsc -b`. The bit lands in the published tarball, npx invocation works on every platform. Includes a `patch` changeset so the next release workflow opens a Version Packages PR for v0.1.1. Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/cli-bin-executable.md | 9 +++++++++ packages/cli/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/cli-bin-executable.md diff --git a/.changeset/cli-bin-executable.md b/.changeset/cli-bin-executable.md new file mode 100644 index 0000000..586e1cc --- /dev/null +++ b/.changeset/cli-bin-executable.md @@ -0,0 +1,9 @@ +--- +"tokenometer": patch +"@tokenometer/core": patch +--- + +Fix `tokenometer` CLI not invokable via `npx` on Linux. The published +`dist/index.js` had no execute bit, so `npx --yes tokenometer@` on +Linux runners failed with `sh: 1: tokenometer: not found`. Build script +now chmods +x after tsc emit. diff --git a/packages/cli/package.json b/packages/cli/package.json index 42ce7bb..185aaf8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -75,7 +75,7 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { - "build": "tsc -b", + "build": "tsc -b && chmod +x dist/index.js", "clean": "rm -rf dist" }, "dependencies": {