Repository navigation
feat(cli)!: distribute the cli through pnpm - #135
Conversation
Vitus Larrieu (vitus-dedalus)
left a comment
There was a problem hiding this comment.
Requesting changes for the installation-ownership regression described inline: npm global installations under Homebrew's prefix are now classified as Homebrew-owned, so upgrade and uninstall select the wrong manager.
Validation: build, all 112 installed-package tests, workflow generation, and a Homebrew-style package installation passed. The actual Homebrew sandbox and live publishing were not tested.
|
|
||
| const path = resolvedPath(executable); | ||
| const compiled = runsCompiled(executable, binaryName); | ||
| const path = resolvedPath(compiled ? executable : process.argv[1] ?? ''); |
There was a problem hiding this comment.
[P2] Preserve npm ownership under Homebrew's prefix
Applying the existing Homebrew path check to the Node script also matches npm global installations at /opt/homebrew/lib/node_modules/dedalus-cli/dist/esm/bin.js, a standard location when Node is installed through Homebrew. That path contains /homebrew/ but is not owned by the Dedalus formula. I reproduced dedalus upgrade printing brew update && brew upgrade dedalus without updating the npm package, and dedalus uninstall recommending brew uninstall dedalus. For Node packages, require a formula-owned Cellar/Caskroom path before classifying the installation as Homebrew; otherwise retain package-manager detection. Please add a regression case for an npm installation under /opt/homebrew/lib/node_modules alongside the new Cellar test.
Vitus Larrieu (vitus-dedalus)
left a comment
There was a problem hiding this comment.
lgtm
The installer could fail before the CLI starts because the standalone executable has an invalid macOS signature. Distribute the existing Node CLI through pnpm instead of compiling native executables.
Breaking installation change: new releases require Node.js 20 or newer and no longer publish native executable archives. pnpm is the primary installation method; Homebrew supplies Node. Existing direct-download users must migrate to the package installation. A new release is required; previous release assets remain unchanged.
Validation: all 115 tests pass against an installed pnpm-built package. Type checking, generated workflow checks, actionlint, ShellCheck, and the Homebrew formula's Ruby syntax check pass. Real pnpm global and Homebrew-style installs launch on Apple Silicon. The compatibility installer installs the published Node package and preserves an older command path. The pnpm registry publish dry run succeeds without publishing. Three ownership regressions fail before the fix and pass afterward, covering npm under the shared Homebrew prefix, npm under the Node formula, and pnpm global installs.