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

Replace fs-ext with equivalent native fs when possible #8605

Closed
11 tasks done
juanjoDiaz opened this issue Dec 10, 2020 · 11 comments
Closed
11 tasks done

Replace fs-ext with equivalent native fs when possible #8605

juanjoDiaz opened this issue Dec 10, 2020 · 11 comments

Comments

@medikoo
Copy link
Contributor

medikoo commented Dec 11, 2020

@juanjoDiaz Thanks for opening that. Yes, we definitely can rely on fs in that case.

Fact that in those places fs-extra is used, I believe is purely for convenience of using one fs collection in module. Note that fs-extra aliases all fs functions. It's like fs with extras, such usage is actually advertised in fs-extra documentation.

Anyway I'm totally after relying on fs.promises directly instead (with exclusion of sync variants and createWriteStream, as those are not promise returning functions)

PR is welcome!

@sdas13
Copy link
Contributor

sdas13 commented Jan 18, 2021

Hello,
Can I work on some of the areas?

@medikoo
Copy link
Contributor

medikoo commented Jan 18, 2021

@sdas13 definitely! PR's welcome

@pgrzesik
Copy link
Contributor

Hello @sdas13 👋 Looks like all refactors from the list has been covered thanks to your contributions 🙇 Do you see any other potential refactorings from fse that could be replaced by native utilities?

@sdas13
Copy link
Contributor

sdas13 commented Aug 31, 2021

Hey @pgrzesik 😃
Couple of async fse functions that can be refactored are access and readFile. There are few fse functions like ensureFile, ensureDir, readJson, remove, mkdirs which are not fs native. Although remove and mkdirs can be replaced by rm and mkdir respectively. Also all the sync counterparts can be refactored.

@medikoo
Copy link
Contributor

medikoo commented Aug 31, 2021

Also all the sync counterparts can be refactored.

That is in scope of #8604

@pgrzesik
Copy link
Contributor

@sdas13 I think that the functions that don't have a direct native replacement are okay to stay, what do you think? cc @medikoo

@medikoo
Copy link
Contributor

medikoo commented Aug 31, 2021

@sdas13 I think that the functions that don't have a direct native replacement are okay to stay, what do you think? cc @medikoo

yes definitely I wouldn't touch them (there's no goal to get rid of fs-extra completely)

Therefore it appears that fse.access and fse.readFile are still missing refactor (I've added them to top list)

@sdas13
Copy link
Contributor

sdas13 commented Sep 1, 2021

yes definitely I wouldn't touch them (there's no goal to get rid of fs-extra completely)

Agreed !

@pgrzesik
Copy link
Contributor

PR #9935 marks the last piece of the refactoring as a part of this task, I think we're fine to close it, what do you think @sdas13 @medikoo ?

@medikoo
Copy link
Contributor

medikoo commented Sep 10, 2021

@pgrzesik definitely! Great thanks @sdas13 for making that happen!

@medikoo medikoo closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants