Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

vfs: promises.watch() resolves `{ done: true }` instead of rejecting with a pre-aborted signal

Đang mở
#66,253 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@trivikr đang làm issue này rồi.

Từ ngày 24/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

vfs
Version

main

Platform
All
Subsystem

vfs

What steps will reproduce the bug?
import { create } from 'node:vfs';

const myVfs = create();
myVfs.writeFileSync('/p.txt', 'a');

const iter = myVfs.promises.watch('/p.txt', {
  signal: AbortSignal.abort()
});
iter.next().then(
  (r) => console.log('resolved:', r),
  (e) => console.log('rejected:', e.code),
);
How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

.next() rejects with AbortError (code: 'ABORT_ERR'), matching native fs.promises.watch(dir, { signal: AbortSignal.abort() }).next(), which rejects with ABORT_ERR.

What do you see instead?
resolved: { done: true, value: undefined }

The iterator silently completes.

Additional information

No response

Ngôn ngữ chính
JavaScript
Star
122k
Fork
37.4k
Merge trung bình
4 ngày 8 giờ
Pull request đã merge (30 ngày)
297

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node

Tất cả issue của nodejs/node

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.