Commit 48853d6
[node-core-library] Add createReadStream/createWriteStream to FileSystem (#5757)
* Add createReadStream/createWriteStream to FileSystem in node-core-library and update consumers to use FileSystem instead of fs directly
Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/5ad20d4d-c9a4-4855-bb13-8dd9e2c1350b
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
* Add ensureFolderExists option to FileSystem.createWriteStream
Agent-Logs-Url: https://github.com/microsoft/rushstack/sessions/199d4b3e-1f3f-44e1-9fc6-7b4a0e027c7e
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
* Expand FileSystem.createWriteStream.
* fixup! Add createReadStream/createWriteStream to FileSystem in node-core-library and update consumers to use FileSystem instead of fs directly
Wrap FileSystem stream methods in _wrapException for consistent error handling
* fixup! Add createReadStream/createWriteStream to FileSystem in node-core-library and update consumers to use FileSystem instead of fs directly
* Add unit tests for FileSystem.createReadStream/createWriteStream
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address PR feedback: use async APIs, deterministic paths, and async iteration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f0d5171 commit 48853d6
5 files changed
Lines changed: 269 additions & 18 deletions
File tree
- common
- changes/@rushstack/node-core-library
- reviews/api
- libraries/node-core-library/src
- test
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| 176 | + | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| |||
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
228 | 234 | | |
229 | 235 | | |
230 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
231 | 240 | | |
232 | 241 | | |
233 | 242 | | |
| |||
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
339 | 352 | | |
340 | 353 | | |
341 | 354 | | |
342 | 355 | | |
343 | 356 | | |
344 | 357 | | |
345 | | - | |
| 358 | + | |
346 | 359 | | |
347 | | - | |
348 | 360 | | |
349 | 361 | | |
350 | 362 | | |
| |||
367 | 379 | | |
368 | 380 | | |
369 | 381 | | |
370 | | - | |
371 | | - | |
| 382 | + | |
372 | 383 | | |
373 | 384 | | |
374 | 385 | | |
| |||
377 | 388 | | |
378 | 389 | | |
379 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
380 | 396 | | |
381 | 397 | | |
382 | 398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
| |||
44 | 62 | | |
45 | 63 | | |
46 | 64 | | |
47 | | - | |
48 | 65 | | |
49 | 66 | | |
50 | | - | |
| 67 | + | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
58 | 81 | | |
59 | 82 | | |
60 | 83 | | |
| |||
95 | 118 | | |
96 | 119 | | |
97 | 120 | | |
98 | | - | |
| 121 | + | |
99 | 122 | | |
100 | 123 | | |
101 | 124 | | |
| |||
113 | 136 | | |
114 | 137 | | |
115 | 138 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 139 | | |
123 | 140 | | |
124 | 141 | | |
| |||
258 | 275 | | |
259 | 276 | | |
260 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
261 | 284 | | |
262 | 285 | | |
263 | 286 | | |
| |||
750 | 773 | | |
751 | 774 | | |
752 | 775 | | |
753 | | - | |
| 776 | + | |
| 777 | + | |
754 | 778 | | |
755 | 779 | | |
756 | | - | |
| 780 | + | |
757 | 781 | | |
758 | 782 | | |
759 | 783 | | |
| |||
796 | 820 | | |
797 | 821 | | |
798 | 822 | | |
799 | | - | |
| 823 | + | |
| 824 | + | |
800 | 825 | | |
801 | 826 | | |
802 | 827 | | |
| |||
956 | 981 | | |
957 | 982 | | |
958 | 983 | | |
959 | | - | |
| 984 | + | |
| 985 | + | |
960 | 986 | | |
961 | 987 | | |
962 | | - | |
| 988 | + | |
963 | 989 | | |
964 | 990 | | |
965 | 991 | | |
| |||
1237 | 1263 | | |
1238 | 1264 | | |
1239 | 1265 | | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
1240 | 1321 | | |
1241 | 1322 | | |
1242 | 1323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
0 commit comments