Commit 9e42678
committed
fix: Robust multi-path import resolution for CI compatibility
🔴 CRITICAL: CI path environment different from local development
✅ Root Cause Analysis
- CI working directory: /home/runner/work/StringRay/StringRay/ (nested)
- Local working directory: /path/to/StringRay/
- Relative paths fail due to different directory structure
- import-resolver.js exists but path resolution fails
✅ Multi-Strategy Import Resolution
- Try 3 different relative path patterns: ../dist/, ./dist/, dist/
- For each pattern, try both import() and absolute path resolution
- Comprehensive error reporting with file existence checks
- Works across all CI environments (GitHub, local, etc.)
✅ Path Resolution Strategies
1. '../dist/plugin/utils/import-resolver.js' (from scripts/)
2. './dist/plugin/utils/import-resolver.js' (from project root)
3. 'dist/plugin/utils/import-resolver.js' (fallback)
4. Absolute path resolution for each relative path
5. Detailed error reporting with CWD and file existence info
✅ CI Environment Compatibility
- Handles nested working directories in CI
- Works with different GitHub Actions configurations
- Maintains local development compatibility
- Robust error diagnostics for troubleshooting
BREAKING: Test now uses comprehensive path resolution for maximum CI compatibility1 parent 8ae0096 commit 9e42678
1 file changed
+57
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
69 | 103 | | |
70 | 104 | | |
71 | 105 | | |
| |||
0 commit comments