Skip to content

doc: deprecate closing fs.Dir on garbage collection#59839

Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom
LiviaMedeiros:fs-deprecate-dir-close-gc-doconly
Sep 12, 2025
Merged

doc: deprecate closing fs.Dir on garbage collection#59839
nodejs-github-bot merged 2 commits intonodejs:mainfrom
LiviaMedeiros:fs-deprecate-dir-close-gc-doconly

Conversation

@LiviaMedeiros
Copy link
Member

Doc-only version of #58850 (runtime deprecation).

The DEP0137 is going to be End-of-Life in the next major release.

I think we should align closing fs.Dir on GC and deprecate it as well. Now that explicit resource management is available, closing dirs properly should become easier for userland.

Note that every time a Dir is closed on GC, it already emits a warning. Alternatively we can make this deprecation runtime right away, I don't have strong opinion on this.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants