Skip to content
New issue

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

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

Already on GitHub? # to your account

🛠 Repo: Replace fs-extra with newer fs built-ins #5266

Closed
5 tasks done
JoshuaKGoldberg opened this issue Dec 4, 2024 · 4 comments · Fixed by #5284
Closed
5 tasks done

🛠 Repo: Replace fs-extra with newer fs built-ins #5266

JoshuaKGoldberg opened this issue Dec 4, 2024 · 4 comments · Fixed by #5284
Labels
area: repository tooling concerning ease of contribution status: accepting prs Mocha can use your help with this one!

Comments

@JoshuaKGoldberg
Copy link
Member

Tooling Suggestion Checklist

Overview

I ran eslint-plugin-depend on the Mocha repo. It had two reports about fs-extra:

/Users/josh/repos/mocha/test/integration/helpers.js
  5:12  error  "fs-extra" should be replaced with an alternative package. Read more here: https://github.com/es-tooling/module-replacements/blob/main/docs/modules/fs-extra.md  depend/ban-dependencies

/Users/josh/repos/mocha/test/integration/options/watch.spec.js
  3:12  error  "fs-extra" should be replaced with an alternative package. Read more here: https://github.com/es-tooling/module-replacements/blob/main/docs/modules/fs-extra.md  depend/ban-dependencies

Per https://github.com/es-tooling/module-replacements/blob/main/docs/modules/fs-extra.md:

fs-extra adds some file system methods that previously were not included in the native fs module and added Promise support to the fs methods.
Many of the fs-extra modules have since been implemented natively by Node.

Proposal: let's switch to native node:fs / node:fs/promises.

Additional Info

Note that both are within test/integration. This shouldn't impact users.

@JoshuaKGoldberg JoshuaKGoldberg added area: repository tooling concerning ease of contribution status: in triage a maintainer should (re-)triage (review) this issue labels Dec 4, 2024
@ericcornelissen
Copy link
Contributor

Hey - first time contributor here. I liked the idea of this kind of maintenance work and figured I could do this without reading the Contributing Guidelines but then I noticed the status: accepting prs1 requirement.

Since this issue doesn't have that label yet but I already did the work, I'll just leave the changeset here: main...ericcornelissen:mocha:5266-fs-extra. Happy to open a PR if that's wanted 🙂

Footnotes

  1. the link of which here seems to be incorrect btw. The text says status: accepting prs but points to the help-wanted label instead (which no longer exists)

@JoshuaKGoldberg
Copy link
Member Author

Thanks @ericcornelissen, much appreciated! I'd put it in status: in triage in case someone else from @mochajs/maintenance-crew has time to review and wants to put their own thoughts forward. They've both been pretty slammed with other things this year so I wouldn't be surprised if in a week or two this just defaults to status: accepting prs. At which point 👍 to your draft changeset becoming a PR.

the link of which here seems to be incorrect btw. The text says status: accepting prs but points to the help-wanted label instead (which no longer exists)

Ha, good catch. Up for sending a PR? I think we can skip filing an issue for a quick docs typo like that. 🙂

@ericcornelissen
Copy link
Contributor

[...] I wouldn't be surprised if in a week or two this just defaults to status: accepting prs. At which point 👍 to your draft changeset becoming a PR.

Thanks for clarifying the process. I'll keep an eye out for that and submit a PR when it switched 👍

Ha, good catch. Up for sending a PR? I think we can skip filing an issue for a quick docs typo like that. 🙂

Will do in just a moment 🙂

@JoshuaKGoldberg
Copy link
Member Author

Ok @ericcornelissen I think we're good to go. Accepting PRs! 🚀

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Mocha can use your help with this one! and removed status: in triage a maintainer should (re-)triage (review) this issue labels Jan 2, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area: repository tooling concerning ease of contribution status: accepting prs Mocha can use your help with this one!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants