feat: Add enhanced use-bundler with cross-platform environment detection#20
Closed
ronaldtse wants to merge 11 commits into
Closed
feat: Add enhanced use-bundler with cross-platform environment detection#20ronaldtse wants to merge 11 commits into
ronaldtse wants to merge 11 commits into
Conversation
- Add smart environment detection for Ruby, bundler, and Inkscape - Implement cross-platform Inkscape installation (Linux/macOS/Windows) - Add comprehensive error handling and graceful fallbacks - Modernize dependencies: replace node-fetch with native fetch - Update TypeScript configuration for ES2020 and Node 20 - Add 8 new comprehensive tests for environment detection - Professional code structure with separated package manager functions - Enhanced documentation with simplified workflow examples - Add comprehensive cross-platform test workflow BREAKING: use-bundler now provides automatic environment setup - Automatically detects missing tools and installs them - Works across all platforms: ubuntu-latest, macos-latest, windows-latest - Compatible with containers: metanorma/metanorma:latest, ubuntu:latest - Reduces bundler workflow from ~10 lines to 3 lines of setup code
- Fix Ruby version from 3.4 to 3.3 (3.4 doesn't exist yet) - Add metanorma detection to skip installation when already available - Fix container sudo issue for snap installation - Add smart sudo detection for container environments - Update all documentation and tests to use Ruby 3.3 - Fix test expectations for enhanced environment detection - All 13 tests now passing with complete coverage
…ll platforms - Simplify Inkscape installation using metanorma/ci/inkscape-setup-action@main - Remove platform-specific Inkscape installation logic - Update test workflow to use consistent cross-platform action - Remove invalid error handling test for simplified logic - All 12 tests passing with cleaner implementation
- Update test workflow to use metanorma version 1.13.1 - Update unit tests to use realistic version 1.13.1 - Fix version references in all test cases - All 12 tests passing locally with correct version
- Update test workflow: Linux (1.13.6), Windows (1.13.6), macOS (1.13.2) - Update unit tests with realistic platform-specific versions - Create Gemfile with metanorma-cli ~> 1.13.6 for bundler testing - Update documentation with accurate version information - Add platform-specific version notes to README - All 12 tests passing with correct versions
- Update Ruby version from 3.3 to 3.4 in all files - Update setupRubyWithBundler to use Ruby 3.4 - Update setupRubyEnvironment return value to 3.4 - Update README examples to use Ruby 3.4 - Update test workflows to use Ruby 3.4 - Update container setup to use Ruby 3.4 - Update unit test expectations to expect Ruby 3.4 - All 12 tests passing with Ruby 3.4
- Fix Homebrew installation to use official tap instead of local formula files - Fix Snap installation to use --classic flag instead of deprecated channel versions - Add warning messages when specific versions are requested but not supported - Update all test cases to match new installation behavior - Improve error handling and fallback to latest stable versions
- Add conditional Ruby setup in test-bundler-docker.yml - Only run ruby/setup-ruby@v1 for containers that need it (needs-setup: true) - Prevent library conflicts in metanorma/metanorma container which already has Ruby
- Fix Prettier formatting issues in test files that caused lint-and-test to fail - Add comprehensive Development section to README with yarn workflows - Update Platform-Specific Notes to reflect current behavior after fixes - Document yarn usage consistently throughout README - Ensure all code passes formatting checks
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.
🚀 Enhanced use-bundler Feature
This PR implements comprehensive cross-platform environment detection and automatic setup for the
use-bundleroption, making it dramatically simpler to use bundler-based Metanorma workflows.✨ Key Features
Smart Environment Detection
Platform-Specific Installation
metanorma/ci/inkscape-setup-action@mainfor InkscapeProfessional Code Structure
src/installer.ts📊 Testing Matrix
This PR includes a comprehensive test workflow that validates:
🔧 Workflow Simplification
Before (10 lines of setup):
After (3 lines of setup):
🧪 Quality Assurance
🔄 Backward Compatibility
use-bundler: false(default) maintains current behavior📚 Documentation
This enhancement makes Metanorma's bundler workflows as simple to use as the Docker container approach, while providing the flexibility of latest gems and cross-platform compatibility.