Fix CLI discovery in Bun-compiled workspace apps - #1060
Conversation
|
The changes in this PR will be included in the next version bump.
|
📦 Bundle size
dist/ only; native binaries are versioned separately and not counted here. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | fd80556 | Commit Preview URL Branch Preview URL |
Sep 03 2026, 05:42 AM |
There was a problem hiding this comment.
Important
Restrict executable-relative discovery to the compiled Bun case so ordinary runtime lookup keeps selecting the project-local CLI.
Reviewed changes in f496fa3c, covering the CLI fallback search, its regression test, Bun deployment documentation, and the release entry.
- Executable-relative discovery: Adds
process.execPathas a search origin for bundled modules whosecallerDiris inside Bun's virtual filesystem. - Regression coverage: Simulates a compiled workspace executable and verifies selection of its package-local
node_modules/.bin/varlock. - Runtime documentation: Explains how compiled Bun applications retain or launch the separate Varlock CLI.
- Release metadata: Adds a patch changeset for the corrected discovery behavior.
azure/gpt-5.6-sol | 𝕏
varlock
@varlock/native-helper-darwin
@varlock/native-helper-linux-arm64
@varlock/native-helper-linux-x64
@varlock/native-helper-win32-x64
@varlock/aws-sigv4-plugin
commit: |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review, focused on the executable lookup correction and its regression coverage.
- Restricted executable lookup: Gated the
process.execPathsearch origin onBun.isStandaloneExecutable, preserving project-local CLI selection in Node and ordinary Bun processes. - Expanded regression coverage: Marked the compiled-app fixture as standalone and added a negative test proving ordinary runtimes skip executable-relative discovery.
azure/gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes since the prior Pullfrog review, focused on the revised compiled Bun deployment guidance.
- Clarified runtime requirements: Documented that the installed
varlockpackage and its dependencies must accompany a compiled application when it resolves configuration at startup. - Explained discovery layout: Added a concrete workspace example and clarified that executable-relative discovery walks upward through parent directories for
node_modules/.bin/varlock. - Covered deployment pruning: Explained where to declare the production dependency and retained the standalone-binary alternative for executable-only deployments.
azure/gpt-5.6-sol | 𝕏



Summary
/$bunfsfilesystemWhy
A compiled Bun application can run from a package such as
/app/apps/server/dist/serverwhileimport.meta.dirnamepoints into/$bunfsand the process working directory is/app. In an isolated workspace install, the CLI remains at/app/apps/server/node_modules/.bin/varlock, so the existing search paths miss it.