Skip to content

feat: integrate Bun compatibility data into warp-analyzer#126

Merged
tervezo-ai[bot] merged 7 commits intomainfrom
feat/integrate-bun-compatibility-data-into-warp-analyzer-u5b1tfqyqkg6hmimww3zey36
Mar 15, 2026
Merged

feat: integrate Bun compatibility data into warp-analyzer#126
tervezo-ai[bot] merged 7 commits intomainfrom
feat/integrate-bun-compatibility-data-into-warp-analyzer-u5b1tfqyqkg6hmimww3zey36

Conversation

@tervezo-ai
Copy link
Copy Markdown
Contributor

@tervezo-ai tervezo-ai bot commented Mar 14, 2026

Summary

Adds Bun as a first-class language target in warp-analyzer, enabling compatibility analysis of Bun projects against the compat-db/bun/results.json database.

  • Bun analyzer module (analyzers/bun.rs): Parses package.json dependencies and detects bun.lockb presence
  • Language detection: bunfig.toml is detected as "bun" with priority over package.json (which remains "typescript")
  • Compat DB integration: evaluate_dependencies() is now language-aware — Bun deps are cross-referenced against compat-db/bun/results.json (embedded at compile time via include_str!)
  • CLI --lang flag: warp convert analyze --lang bun enables explicit language override
  • Exit code 1: Process exits with code 1 when incompatible dependencies are found
  • Bun compatibility table: Report output includes a table with package/version/status/notes columns
  • JSON output: --format json produces valid, parseable JSON

Test plan

  • 7 unit tests for bun::analyze_package_json() (dependency parsing, scoped packages, lockfile detection)
  • 6 unit tests for detect_language() (bunfig.toml detection and priority)
  • 7 unit tests for Bun compat DB (results.json loading, pass/fail mapping, language-aware evaluation)
  • 7 integration tests (t5 fixture analysis, auto-detection, blocker generation, exit code 1, report table, JSON output, --lang override)
  • Manual verification with test-apps/t5-bun-http-postgres

Closes #82

🤖 Generated with Claude Code

nadilas and others added 7 commits March 14, 2026 21:34
Create crates/warp-analyzer/src/analyzers/bun.rs with analyze_package_json()
that parses dependencies/devDependencies from package.json and detects bun.lockb
presence. Includes 7 unit tests covering dependency parsing, scoped packages,
empty/missing files, and lockfile detection.

Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…jects

Add bunfig.toml check before package.json in detect_language(), so Bun
projects are correctly identified. Projects with only package.json continue
to be detected as typescript. Includes 6 unit tests for detection logic.

Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Load compat-db/bun/results.json at compile time via include_str! and use
it when language is "bun". Maps status:"pass" → compatible, status:"fail*"
→ blocker with error/stage details. Includes 7 unit tests for Bun compat
DB loading and language-aware dependency evaluation.

Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "bun" match arm in lib.rs analyze() for Bun dependency analysis
- Add lang_override parameter to analyze() for explicit language selection
- Add --lang flag to `warp convert analyze` CLI command
- Return exit code 1 when incompatible dependencies are found
- Update convert.rs to pass lang override and return blocker status

Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When language is "bun", format_report() now renders a compatibility table
with columns: package, version, status, notes. Status shows pass/fail from
compat-db/bun/results.json with bundle_ok/componentize_ok details.

Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 integration tests covering:
- t5-bun-http-postgres fixture analysis with --lang override
- Auto-detection via bunfig.toml
- Failing dep (marked) produces blocker
- Exit code 1 with blockers
- Bun compatibility table in report output
- JSON output validity
- --lang bun override without bunfig.toml

Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Closes #82

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tervezo-ai tervezo-ai bot merged commit 3852f1e into main Mar 15, 2026
3 of 10 checks passed
@tervezo-ai tervezo-ai bot deleted the feat/integrate-bun-compatibility-data-into-warp-analyzer-u5b1tfqyqkg6hmimww3zey36 branch March 15, 2026 06:21
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.

US-613: Integrate Bun compat data into warp-analyzer

1 participant