This directory contains realistic Aurelia 1 application code that demonstrates various patterns the au-rogue migration tool can handle.
- main.ts - Bootstrap configuration with plugins, features, and environment-specific setup
- app.ts - Root component with router configuration, computed properties, and DI
- pages/user-details.ts - Route component with lifecycle methods, NavigationInstruction usage
- components/user-card.ts - Custom element with decorators, computed properties, compat patterns
- components/user-list.ts/.html - Component with templates showing event handlers
- services/user-service.ts - Service with HTTP client and PLATFORM usage
- value-converters/date-format.ts - Value converter with DI
# From the examples directory
./run-migration.sh# Run from the au-rogue root directory
pnpm run build
# Dry run to see what would change (recommended first)
node dist/cli.js --sources "examples/**/*.ts" --templates "examples/**/*.html" --dry
# Actually apply the transformations
node dist/cli.js --sources "examples/**/*.ts" --templates "examples/**/*.html"
# With compat mode suggestions
node dist/cli.js --sources "examples/**/*.ts" --templates "examples/**/*.html" --compat --dryThis will show you:
- Bootstrap migration guidance for main.ts
- Router configuration analysis for app.ts and user-details.ts
- PLATFORM.moduleName() removal from multiple files
- @computedFrom removal from components
- DI transformation for @autoinject usage
- Lifecycle method analysis in route components
- Template event handler analysis in HTML files
- Compatibility package suggestions for advanced decorators
- Detects Aurelia 1 bootstrap patterns
- Provides Aurelia 2 equivalent code
- Maps plugins to v2 equivalents
- Warns about unknown plugins
- Analyzes configureRouter() methods
- Detects router lifecycle method usage
- Identifies NavigationInstruction patterns
- Suggests migration strategies
- Removes PLATFORM.moduleName() wrapper calls
- Preserves the inner module path
- Works in various contexts (imports, routes, etc.)
- Converts @autoinject to constructor parameter decorators
- Handles both simple and complex injection scenarios
- Removes @computedFrom decorators
- Provides guidance on getter dependencies
- Analyzes event handlers for preventDefault needs
- Identifies patterns that may behave differently in v2
- Detects v1 lifecycle methods
- Suggests v2 equivalents
- Identifies anti-patterns
- Detects patterns that benefit from @aurelia/compat-v1
- Suggests installation when needed