Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The esbuild dynamic-require shim in the ESM Node bundles had no real
`require` to delegate to at chunk-init, so any runtime `require("tty")`
/ `require("os")` from the `file-type` → `debug` → `supports-color`
chain threw "Dynamic require of \"tty\" is not supported". This made
the `file` command crash for every consumer importing just-bash as ESM
and for the `just-bash` CLI binary.
Provide `createRequire(import.meta.url)` via the build banner for
`build:lib`, `build:cli`, and `build:shell`. CJS and browser bundles
are unchanged.
Add regression tests covering both the bundled CLI binary and the ESM
library bundle running the `file` command.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Deployment failed with the following error: |
Merged
ezzabuzaid
pushed a commit
to JanuaryLabs/deepagents
that referenced
this pull request
May 24, 2026
…ption createSqlCommand now exposes only `sql run` and `sql validate` as just-bash customCommands. Bootstrap (schema indexing) belongs on the host — callers should invoke `text2Sql.index()` directly before sandbox construction. instructions() only teaches the LLM `sql run` / `sql validate` anyway. Replaces the local SqlCommandError class with one that extends BashException per the codebase convention (see sql-transform-plugins.ts:54). The class carries the subcommand name and exitCode; format() returns a properly- prefixed `sql <subcommand>: <msg>\n` CommandResult. runHandler catches BashException locally and calls format() because just-bash's Bash.exec intercepts throws from customCommand handlers and rewrites them to a generic exit-1 string — BashException.format() is only honored when the throw reaches withBashExceptionCatch at the sandbox decorator layer, which requires catching inside the handler first. Also bumps just-bash ^3.0.0 -> ^3.0.1 across the workspace. 3.0.1 patches a `Dynamic require of "tty"` crash in the file-type -> debug ESM chain (vercel-labs/just-bash#238); catch site for customCommand throws is unchanged across versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The esbuild dynamic-require shim in the ESM Node bundles had no real
requireto delegate to at chunk-init, so any runtimerequire("tty")/require("os")from thefile-type→debug→supports-colorchain threw "Dynamic require of "tty" is not supported". This made thefilecommand crash for every consumer importing just-bash as ESM and for thejust-bashCLI binary.Provide
createRequire(import.meta.url)via the build banner forbuild:lib,build:cli, andbuild:shell. CJS and browser bundles are unchanged.Add regression tests covering both the bundled CLI binary and the ESM library bundle running the
filecommand.