-
Notifications
You must be signed in to change notification settings - Fork 1
Add Rust translation and reorganize codebase #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #146
- Move JavaScript source files from src/ to js/src/ - Update all import paths in tests and examples - Update package.json exports to point to js/src/ - Add Rust translation in rust/ folder: - Complete shell parser with tokenizer - Utility functions (tracing, command results, ANSI handling) - All 21 virtual commands (echo, ls, cat, mkdir, etc.) - ProcessRunner for command execution - Unit tests for all modules - Add case study documentation in docs/case-studies/issue-146/ Note: ESLint warnings are pre-existing in the JS codebase, no new issues introduced. Fixes #146 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 2e3f071.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Root ./tests folder is also related to Ensure all changes are correct, consistent and fully meet the requirements. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-29T12:33:23.493Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
- Move root ./tests folder to ./js/tests as per feedback - Update all import paths from ../js/src/ to ../src/ - Update package.json and bunfig.toml to use js/tests path - Add comprehensive Rust test suite in rust/tests/ mirroring JS tests - Fix Rust compilation errors: - Rename $ function to run ($ is not valid Rust identifier) - Fix shell parser current() method to avoid borrowing issues - Fix ProcessRunner child handle borrowing - Add manual Debug impl for CommandContext - Improve echo command to support -n, -e, -E flags - Improve which command to recognize virtual/builtin commands - Fix eslint warnings (unused catch variables) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update bun test path from tests/ to js/tests/ - Update Node.js compatibility test path from ./src/ to ./js/src/ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add rust/target/ to .gitignore to exclude Rust build artifacts - Format docs/case-studies/issue-146/README.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move examples folder to js/examples for consistency with js/ structure - Update test files to reference js/examples and js/tests paths - Update internal references in examples to use new paths - Fix ls -1 tests/ to ls -1 js/tests/ in text-method.test.mjs - Update eslint config to include js/tests and js/examples patterns 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change ../js/src/ to ../src/ since examples are now at js/examples/ - Fix corrupted quote in test-auth-parse.mjs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update path from examples/ to js/examples/ in script path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
This PR addresses Issue #146 by:
js/folder structureChanges
Codebase Reorganization
src/tojs/src/package.jsonexports to point tojs/src/Rust Translation (
rust/folder)shell_parser.rs): Complete tokenizer and parser supporting&&,||,;,|,(), and redirectionsutils.rs): Tracing, command results, ANSI handling, path utilitiescat,cp,mv,rm,touch,mkdir,lscd,pwdecho,yes,seqsleep,env,which,test,exit,basename,dirname,true,falselib.rs): Main execution engine with:Documentation
docs/case-studies/issue-146/README.md:Test Plan
js/structureNotes
js/src/are pre-existing and were not introduced by this PRFixes #146
🤖 Generated with Claude Code