Skip to content

Commit 54ad1bc

Browse files
committed
fix
1 parent d3d8c2f commit 54ad1bc

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

docs/migrate-v1-to-v2.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ export default {
150150
};
151151
```
152152
153+
> `Array.fromAsync()` requires Node.js 22+.
154+
153155
### Optional `selfsigned` peer dependency
154156
155157
`selfsigned` is no longer bundled as a direct dependency of `@rspack/dev-server`.

tests/e2e/watch-files.test.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ const watchDir = path.resolve(
1212
'../fixtures/watch-files-config/public',
1313
);
1414

15+
async function collectAsyncIterable(iterable) {
16+
const items = [];
17+
18+
for await (const item of iterable) {
19+
items.push(item);
20+
}
21+
22+
return items;
23+
}
24+
1525
describe('watchFiles option', () => {
1626
describe('should work with string and path to file', () => {
1727
const file = path.join(watchDir, 'assets/example.txt');
@@ -165,7 +175,7 @@ describe('watchFiles option', () => {
165175
let consoleMessages;
166176

167177
beforeEach(async () => {
168-
const watchFiles = await Array.fromAsync(
178+
const watchFiles = await collectAsyncIterable(
169179
glob(
170180
path.posix.join(
171181
watchDir.split(path.sep).join(path.posix.sep),

0 commit comments

Comments
 (0)