Skip to content

fix: Node.js compatibility for file upload and status bar#32

Merged
MiniMax-AI-Dev merged 1 commit intoMiniMax-AI:mainfrom
raylanlin:fix/nodejs-compat
Apr 6, 2026
Merged

fix: Node.js compatibility for file upload and status bar#32
MiniMax-AI-Dev merged 1 commit intoMiniMax-AI:mainfrom
raylanlin:fix/nodejs-compat

Conversation

@raylanlin
Copy link
Copy Markdown
Collaborator

@raylanlin raylanlin commented Apr 6, 2026

Summary

Two fixes for Node.js compatibility:

1. file/upload.ts — Replace Bun-specific APIs

  • Bun.file(path).arrayBuffer()fs/promises.readFile()
  • path.split("/").pop()path.basename()

This allows the CLI to run in pure Node.js 18+ environments without Bun.

2. status-bar.ts — Export resetStatusBar()

The module-level printed state variable caused test pollution between runs (Issue #9).

Exporting resetStatusBar() lets tests reset state cleanly between test cases.

- Replace Bun.file() with fs/promises.readFile() in file/upload.ts
- Export resetStatusBar() function to fix test state pollution (Issue #9)

These changes make the CLI work in pure Node.js environments without Bun.
@MiniMax-AI-Dev MiniMax-AI-Dev merged commit 765bb74 into MiniMax-AI:main Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants