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

Remove fs-extra dependency #597

Merged
merged 4 commits into from Sep 12, 2021
Merged

Conversation

1000ch
Copy link
Contributor

@1000ch 1000ch commented Aug 22, 2021

The usage of fs-extra is only related to reading/writing JSON currently, then they can be replaced with some combinations of native modules to reduce the dependency.

@1000ch 1000ch force-pushed the refactor/remove-fs-extra branch 2 times, most recently from a84c31b to 9f639d4 Compare August 22, 2021 06:54
@sindresorhus
Copy link
Member

Tests are failing

@1000ch
Copy link
Contributor Author

1000ch commented Aug 22, 2021

Tests are failing

Umm, cannot reproduce in my local environment... 👀

@sindresorhus sindresorhus changed the title Remove fs-extra Remove fs-extra dependency Sep 12, 2021
@sindresorhus sindresorhus merged commit 098a594 into xojs:main Sep 12, 2021
@sindresorhus
Copy link
Member

Thanks :)

@1000ch 1000ch deleted the refactor/remove-fs-extra branch September 12, 2021 05:04
devinrhode2 added a commit to devinrhode2/xo that referenced this pull request Oct 15, 2021
devinrhode2 pushed a commit to devinrhode2/xo that referenced this pull request Oct 15, 2021
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
devinrhode2 pushed a commit to devinrhode2/xo that referenced this pull request Oct 15, 2021
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
+conflict resolution by Devin Rhode <devinrhode2@gmail.com>
@devinrhode2
Copy link
Contributor

Can you guys elaborate on the benefit of reducing dependencies? I guess install is slightly faster.. and yeah "fewer dependencies" makes it more robust

I wish node returned file contents as utf8 strings by default... maybe we should have a readFile util that's basically just: fs.readFile(path, 'utf8')? i.e. it has the 'utf8' arg set as default, nothing else?

I'm working on some scripts of my own and just curious what you guys think is "good" or "best" practice here

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

Successfully merging this pull request may close these issues.

None yet

3 participants