Feature/dependency validation#53
Merged
Merged
Conversation
- Implement isCommandAvailable function to check if commands are in PATH - Add getStackDependencies mapping for each stack - Create validateStackDependencies for complete validation - Integrate validation in init command before dependency installation - Add i18n messages for warnings and installation instructions - Handle errors gracefully when dependencies are missing - Allow user to continue even without installed dependencies Fixes crashes with 'spawn ENOENT' when tools like go, composer, mvn were not installed.
- Add comprehensive dependency validation section to ARCHITECTURE.md - Update STACKS.md with validation overview and dependency table - Enhance CONTRIBUTING.md with validation requirements for new stacks - Update README.md to highlight intelligent dependency validation - Add API documentation for new validation functions in core README - Update Portuguese documentation (pt-BR/STACKS.md) - Include validation workflow diagrams and examples Documents the new system that validates required tools before project creation, provides installation guidance, and allows graceful continuation when dependencies are missing.
- Add JSDoc documentation to core utility functions in packages/core/src/utils.ts - Add class and method docstrings to CLI commands in packages/cli/src/commands/init.ts - Add comprehensive documentation to VSCode extension commands and providers - Add docstrings to GitMonitor class for repository detection and Git workflow - Add documentation to DashboardProvider for webview interface management - Standardize documentation format using English JSDoc conventions - Improve code maintainability and developer experience with clear API documentation Enhances codebase professionalism with comprehensive inline documentation that explains the purpose and usage of key functions and classes.
- Add validateStackDependencies mock to CLI init test suite - Configure mock to return valid dependencies state for test scenarios - Fix failing test that was missing the new validation function - Apply code formatting with Prettier on Portuguese documentation Ensures all tests pass and maintains code quality standards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Description
This PR implements a comprehensive dependency validation system for StackCode that prevents crashes when required tools are missing during project initialization. The system validates dependencies before attempting installation, provides clear installation guidance, and allows graceful continuation when tools are unavailable.
🔗 Related Issue
Fixes #(issue) - ENOENT spawn errors when running
npx stc initfor Go, PHP, React/Vue.js stacks🧪 Type of Change
📝 How Has This Been Tested?
📷 Screenshots (if applicable)
N/A - CLI tool with terminal output
✅ Checklist
🔄 Dependencies
No new external dependencies added. Uses existing Node.js built-in modules.
📚 Additional Notes
Key Features Implemented:
which/wherecommands for tool detectionTechnical Implementation:
isCommandAvailable(),getStackDependencies(), andvalidateStackDependencies()functionsStack Support:
gocommand)composer,phpcommands)mvn,javacommands)pip,pythoncommands)npmcommand)The system now provides intelligent dependency validation that enhances user experience and prevents crashes during project initialization.