Skip to content

fs: make processReadResult() and readSyncRecursive() private #58672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

LiviaMedeiros
Copy link
Member

These two methods are for internal use only. They alter dir's internal state and don't return anything, i.e. can't be used in userland in meaningful way.
Unless there are objections, these can be unexposed without deprecation cycle.

Closes: #58671
Refs: #41439

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Jun 11, 2025
@LiviaMedeiros LiviaMedeiros added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 11, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 11, 2025
@nodejs-github-bot

This comment was marked as outdated.

Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.14%. Comparing base (bb99171) to head (5483950).
Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58672      +/-   ##
==========================================
- Coverage   90.17%   90.14%   -0.03%     
==========================================
  Files         636      636              
  Lines      188060   188060              
  Branches    36898    36898              
==========================================
- Hits       169579   169526      -53     
- Misses      11229    11285      +56     
+ Partials     7252     7249       -3     
Files with missing lines Coverage Δ
lib/internal/fs/dir.js 94.56% <100.00%> (ø)

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but can you do a GitHub code search check and see if anyone is in fact publicly using these methods?

@LiviaMedeiros
Copy link
Member Author

I did that, couldn't find anything except copies of lib/internal/fs/dir.js itself.

@Ethan-Arrowood
Copy link
Contributor

Excellent, then I fully support landing this as a fix instead of a breaking change.

@jasnell
Copy link
Member

jasnell commented Jun 11, 2025

I'm not entirely sure we can just remove these. Would like to get some other opinions from @nodejs/tsc ... In the meantime I've also opened an alternative that runtime deprecates them See #58679

@targos
Copy link
Member

targos commented Jun 11, 2025

I don't see the problem. I haven't verified it but I don't remember that our deprecation policy applies to undocumented internals.

Copy link
Member

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I don't think an entire runtime deprecation cycle for an undocumented API is necessary.

However, I would prefer to see this change highlighted in the changelog to make Node.js upgrades easier for people who might be relying on this privately, which won't show up on GitHub search.

Can we land it as semver-major PRs that contain breaking changes and should be released in the next major version. or mark this as a notable-change PRs with changes that should be highlighted in changelogs. ? I'm fine with both.

@jasnell jasnell added tsc-agenda Issues and PRs to discuss during the meetings of the TSC. semver-major PRs that contain breaking changes and should be released in the next major version. and removed tsc-agenda Issues and PRs to discuss during the meetings of the TSC. labels Jun 12, 2025
@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 14, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 14, 2025
@nodejs-github-bot nodejs-github-bot merged commit 823ca69 into nodejs:main Jun 14, 2025
77 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 823ca69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fs.Dir methods not documented
9 participants