Commit 5da7705
authored
feat: allow aggregate to output to specific file (#22)
# Add transitive dependency support to formatjs_aggregate
### TL;DR
Added support for transitive message aggregation and improved documentation for cross-platform compatibility.
### What changed?
- Added a new `out` attribute to `formatjs_aggregate` rule to specify custom output file names
- Created a new `transitive_messages` example that demonstrates proper traversal of the dependency graph
- Added comprehensive documentation about platform support (macOS, Linux, Windows)
- Improved documentation with details about cross-platform builds, output groups, and usage patterns
- Added a fixture file to verify transitive dependency resolution works correctly
### How to test?
1. Build the new transitive messages example:
```bash
bazel build //examples/aggregate/app:transitive_messages
```
2. Verify that messages from module1 are included even though it's only a transitive dependency:
```bash
bazel test //examples/aggregate/app:aggregation_test
```
3. Test on different platforms to verify consistent output across macOS, Linux, and Windows
### Why make this change?
This change ensures that the formatjs_aggregate rule properly handles transitive dependencies, which is crucial for large monorepos where message dependencies might be nested several levels deep. The improved documentation makes it clear that the rules work across all major platforms without special configuration, which helps users understand the cross-platform capabilities of the toolchain.1 parent 5ef109d commit 5da7705
3 files changed
Lines changed: 125 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
9 | 20 | | |
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| 25 | + | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
17 | 36 | | |
18 | 37 | | |
19 | 38 | | |
| |||
105 | 124 | | |
106 | 125 | | |
107 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
108 | 136 | | |
109 | 137 | | |
110 | 138 | | |
| |||
120 | 148 | | |
121 | 149 | | |
122 | 150 | | |
| 151 | + | |
123 | 152 | | |
124 | 153 | | |
125 | 154 | | |
| |||
133 | 162 | | |
134 | 163 | | |
135 | 164 | | |
136 | | - | |
137 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
138 | 173 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 174 | + | |
142 | 175 | | |
143 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
144 | 181 | | |
145 | 182 | | |
146 | 183 | | |
| |||
167 | 204 | | |
168 | 205 | | |
169 | 206 | | |
170 | | - | |
| 207 | + | |
171 | 208 | | |
172 | 209 | | |
173 | 210 | | |
| |||
202 | 239 | | |
203 | 240 | | |
204 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
205 | 245 | | |
206 | 246 | | |
207 | 247 | | |
| |||
229 | 269 | | |
230 | 270 | | |
231 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
232 | 282 | | |
233 | 283 | | |
234 | 284 | | |
235 | 285 | | |
236 | 286 | | |
237 | 287 | | |
238 | 288 | | |
| 289 | + | |
239 | 290 | | |
240 | 291 | | |
241 | 292 | | |
| |||
365 | 416 | | |
366 | 417 | | |
367 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
368 | 432 | | |
369 | 433 | | |
370 | 434 | | |
| |||
0 commit comments