Skip to content

v0.8.7

Choose a tag to compare

@mavdol mavdol released this 14 Apr 08:24
· 18 commits to main since this release
393a9f4

Path resolution, polyfills, and large argument support

Note

This release bundles several improvements made since v0.8.0 (versions 0.8.1 to 0.8.6 were internal steps).

Core Improvements

  • --args-file option: Bypass inline argument limits by passing arguments via a file.
capsule run main.ts --args-file /tmp/tmp-file.txt # avoid inline limit

With this improvement, the run() function now handles large inputs more reliably.

  • Virtual CWD support : process.chdir() now works inside the sandbox. Relative paths resolve correctly against the virtual working directory. Useful to have a real CWD system for the --mount option.
process.chdir('hello-folder')   // _virtualCwd = 'hello-folder'
fs.readdirSync('.')             // '.' → 'hello-folder' → matches preopen 
fs.readFileSync('file.txt')     // 'file.txt' → 'hello-folder/file.txt'

TypeScript Improvements

Improved compatibility for Node.js built‑ins and made imports more reliable. This makes Capsule work smoothly with alternative package managers like pnpm.