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

Missing *Sync synchronous functions #1

Open
EthanThatOneKid opened this issue Apr 1, 2024 · 3 comments
Open

Missing *Sync synchronous functions #1

EthanThatOneKid opened this issue Apr 1, 2024 · 3 comments

Comments

@EthanThatOneKid
Copy link

Is it within the scope of this project to expose the synchronous versions of the fs functions?

@Hexagon
Copy link
Member

Hexagon commented Apr 1, 2024

I see the *Sync as a legacy from the past, to simplify callback/promise-hell before async/await (and top level await) arrived etc. But If there are good use cases, we should of course include them 👍

@EthanThatOneKid
Copy link
Author

EthanThatOneKid commented Apr 2, 2024

Accessing these functions in synchronous contexts can still be convenient in some situations. Could the *Sync functions be exported by a separate repository to prevent clutter in @cross/fs?

Whether or not *Sync becomes part of @cross, I'm curious if we can achieve the same cross-runtime support on jsr.io importing from node:fs.

@Hexagon
Copy link
Member

Hexagon commented Apr 4, 2024

@EthanThatOneKid Yep, *Sync from node:fs seems to be working fine in all of Node, Deno and Bun 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants