Skip to content

Conversation

@gsmlg
Copy link
Collaborator

@gsmlg gsmlg commented Oct 15, 2025

Summary

  • Add complete Deno runtime implementation alongside existing Bun runtime
  • Implement comprehensive configuration management and validation
  • Add monitoring, health checks, and performance metrics
  • Support both development and production deployment modes
  • Include security validations and error handling

Changes

  • New Deno Runtime: Full implementation with process management and file watching
  • Configuration System: Centralized config with validation for all runtime parameters
  • Monitoring: Health checks, metrics collection, and performance tracking
  • Build Tools: Mix tasks for bundling components for both runtimes
  • Security: Input validation, path traversal prevention, and secure defaults
  • Testing: Comprehensive test suite with 54 passing tests

Features

  • Runtime switching via configuration or environment variables
  • Automatic component bundling for production releases
  • File watching with debouncing for development
  • Graceful shutdown and error recovery
  • HTTP client integration for runtime communication
  • Support for JSX components in both runtimes

- Add Phoenix.React.Runtime.Deno module with full Bun feature parity
- Implement Deno 2.x compatible bundling using deno compile
- Add development mode with source files and hot reloading
- Add production mode with standalone binary compilation
- Support JSX file extensions for proper React parsing
- Implement npm package support via --node-modules-dir flag
- Add comprehensive test suite (17 test cases)
- Update documentation and README with Deno configuration
- Add environment variable switching between Bun and Deno runtimes
- Fix import path resolution for relative module imports
- Update react_demo to support both runtimes via REACT_RUNTIME env var
- Add common module to extract shared functionality between Bun and Deno runtimes
- Implement centralized configuration system with validation
- Add monitoring and metrics collection for runtime health
- Fix HTTP client initialization and request formatting issues
- Add proper React import to server template
- Standardize error handling patterns across all modules
- Fix compiler warnings and syntax errors
- Improve test reliability with smaller content and increased timeouts
- Add comprehensive integration tests for both runtimes
- Enhance security with restricted Deno permissions and better process monitoring
- Optimize performance with async file operations and reduced code duplication

This completes the optimization of the Deno runtime implementation with
enhanced security, performance, and maintainability.

Signed-off-by: Gao <gao@Workspace/gsmlg-dev>
- Fix FileWatcher to handle FileSystem.start_link returning :ignore when inotify-tools are missing
- Change runtime integration test to skip gracefully when Deno is not available instead of failing
- Add proper error handling and logging for file system watcher failures

Resolves CI test failures in GitHub Actions.
- Add proper setup block to skip all Deno runtime tests when Deno executable is missing
- Remove inline :skip return which doesn't work correctly in test context
- Use ExUnit's recommended approach for conditional test skipping

This ensures tests pass in CI environments where Deno is not installed.
- Replace setup block with ExUnit's exclude mechanism for conditional test skipping
- Add :skip_if_no_deno tag to Deno runtime integration tests
- Configure test_helper.exs to exclude :skip_if_no_deno tests when Deno is not available
- This follows ExUnit best practices for conditional test execution

Resolves CI test failures by properly skipping Deno tests when Deno executable is missing.
- Fix FileWatcher initialization failure when inotify-tools are missing in CI
- Add proper error handling for Bun runtime startup failures
- Implement port retry logic for Bun integration tests to avoid EADDRINUSE conflicts
- Rename server.js.eex to server_bun.eex for better clarity
- Add BUN_PORT environment variable support to Bun server template
- Improve error handling in Bun runtime handle_continue callback

Fixes all CI test failures and ensures reliable runtime startup in various environments.
@gsmlg gsmlg merged commit 2c9d34a into main Oct 16, 2025
1 check passed
@gsmlg gsmlg deleted the feature/implement-deno-runtime branch October 16, 2025 05:01
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.

3 participants