Skip to content
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

Prioritize support for fs.openDir / fs.openDirSync #16552

Closed
tinovyatkin opened this issue Jan 20, 2025 · 3 comments
Closed

Prioritize support for fs.openDir / fs.openDirSync #16552

tinovyatkin opened this issue Jan 20, 2025 · 3 comments
Labels
enhancement New feature or request node:fs

Comments

@tinovyatkin
Copy link

What is the problem this feature would solve?

The popular fs-extra library (over 100 million weekly downloads) recently released version 11.3.0, which now relies on fs.opendir for its copy method. Because Bun currently lacks an implementation of fs.opendir, this update breaks compatibility for Bun users.

Given how widely fs-extra is used—and the fact that many projects pin it using a caret range—this issue is likely to affect a large number of users.

What is the feature you are proposing to solve the problem?

Please consider prioritizing the implementation of fs.opendir in Bun to maintain compatibility with the latest fs-extra releases. Thank you for your time and consideration!

What alternatives have you considered?

No response

@tinovyatkin tinovyatkin added the enhancement New feature or request label Jan 20, 2025
@paperclover
Copy link
Member

will be a part of my giant node:fs compatibility pr

@190n
Copy link
Contributor

190n commented Jan 24, 2025

As @paperclover mentioned, we did ship a lot of node:fs improvements in 1.2. I tried a small example using fs-extra version 11.3.0's copy function on Bun v1.2 and it seems to work fine. But it also worked for me in older Bun versions, so maybe there is a particular edge case in copy that didn't work.

Could you share a minimal example program using copy that doesn't work in older Bun versions, and tell us whether it has been fixed in Bun v1.2? Even if your use case works now, it's worth ensuring that this is in our test suite so that we don't regress this behavior in the future.

@paperclover
Copy link
Member

copy in the mentioned library was very recently updated to use opendir. but 1.2 includes support for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request node:fs
Projects
None yet
Development

No branches or pull requests

4 participants