Skip to content

Execute vite with bun, not node.#1293

Merged
kixelated merged 1 commit intomainfrom
bun-bun
Apr 11, 2026
Merged

Execute vite with bun, not node.#1293
kixelated merged 1 commit intomainfrom
bun-bun

Conversation

@kixelated
Copy link
Copy Markdown
Collaborator

No description provided.

@kixelated kixelated enabled auto-merge (squash) April 11, 2026 23:08
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

Walkthrough

This pull request updates three justfiles across the demo directory to modify how Bun and Vite are invoked. The changes add the --bun flag to Bun command invocations in the web, relay, and boy task definitions, directing Bun to use itself as the JavaScript runtime for Vite. Additionally, the --open flag is added to launch the browser window when the web server starts. Existing environment variables and configuration settings are preserved in these modifications.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a pull request description explaining the rationale for executing Vite with Bun instead of Node and any benefits or testing performed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding --bun flag to execute Vite with Bun runtime instead of Node.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bun-bun
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch bun-bun

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@demo/relay/justfile`:
- Around line 18-19: The quoted command string contains a literal newline
splitting the Vite command ("just wait &&
VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd
../web --bun vite\n--open"), causing concurrently to treat "--open" as a
separate command; fix by removing the newline so the string is a single line (or
escape the newline with a backslash) so "--open" remains an argument to vite —
update the quoted command in the justfile accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7d9d4bbd-1af4-4640-ad08-aa3efce05e7f

📥 Commits

Reviewing files that changed from the base of the PR and between 1b6ddbf and 1acf9a3.

📒 Files selected for processing (3)
  • demo/boy/justfile
  • demo/relay/justfile
  • demo/web/justfile

Comment on lines +18 to +19
"just wait && VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd ../web --bun vite
--open"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Inspecting cluster command lines:"
nl -ba demo/relay/justfile | sed -n '12,21p'

echo
python - <<'PY'
from pathlib import Path
p = Path("demo/relay/justfile")
lines = p.read_text().splitlines()
cmd_fragment = "\n".join(lines[17:19])  # Lines 18-19 (1-based)
print("Raw fragment repr:")
print(repr(cmd_fragment))
print("\nPer-line quote counts:")
for ln in (18, 19):
    s = lines[ln-1]
    print(f"Line {ln}: quotes={s.count(chr(34))} text={s}")
PY

Repository: moq-dev/moq

Length of output: 148


🏁 Script executed:

#!/bin/bash

# Read the justfile and show lines around 18-19
echo "=== Lines 12-25 of demo/relay/justfile ==="
head -25 demo/relay/justfile | tail -14 | cat -n

echo ""
echo "=== Raw byte inspection of lines 18-19 ==="
python3 << 'EOF'
from pathlib import Path

p = Path("demo/relay/justfile")
lines = p.read_text().splitlines(keepends=False)

# Show lines 17-19 (indices 16-18 for 0-based)
print(f"Total lines in file: {len(lines)}")
print(f"\nLine 18 (index 17): {repr(lines[17])}")
print(f"Line 19 (index 18): {repr(lines[18])}")

# Check quote balance
content = "\n".join(lines[17:19])
print(f"\nQuote counts:")
print(f"Double quotes: {content.count(chr(34))}")
print(f"Raw multi-line content:\n{repr(content)}")
EOF

Repository: moq-dev/moq

Length of output: 1250


Fix multiline quoted command: newline inside quoted string breaks the concurrently web command.

Lines 18-19 have a literal newline inside the double-quoted string. When concurrently spawns a shell to execute this command, the newline acts as a command separator, causing --open to be treated as a separate command instead of a Vite flag.

🔧 Proposed fix
-		"just wait && VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd ../web --bun vite
-	--open"
+		"just wait && VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd ../web --bun vite --open"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"just wait && VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd ../web --bun vite
--open"
"just wait && VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd ../web --bun vite --open"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@demo/relay/justfile` around lines 18 - 19, The quoted command string contains
a literal newline splitting the Vite command ("just wait &&
VITE_RELAY_URL=http://localhost:4445/demo?jwt=$(cat demo-web.jwt) bun --cwd
../web --bun vite\n--open"), causing concurrently to treat "--open" as a
separate command; fix by removing the newline so the string is a single line (or
escape the newline with a backslash) so "--open" remains an argument to vite —
update the quoted command in the justfile accordingly.

@kixelated kixelated merged commit 724f050 into main Apr 11, 2026
2 checks passed
@kixelated kixelated deleted the bun-bun branch April 11, 2026 23:33
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.

1 participant