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 (#1891) #1896

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

Snapstromegon
Copy link
Member

@Snapstromegon Snapstromegon commented Jul 20, 2021

@zachleat proposed in #1891 removing fs-extra since the build in FS module now provides a promise based option and supports recursive options.

This Commit only uses the require("fs") instead of require("fs").promises or require("fs/promises"), since the last one is not support in Node Version <14 and the sync API is used.

Except for Template.js no file logic needed to be changed to remove fs-extra.

According to my run of "npm test" test results are not changed by this commit.

This commit only replaces fs-extra with fs and does not touch existing logic when it's not needed. Maybe some optimizations like in 5ca1aa7 are possible.

@zachleat proposed removing fs-extra since the build in FS module now provides a promise based option and supports recursive options.

This Commit only uses the ```require("fs")``` instead of ```require("fs").promises``` or ```require("fs/promises")```, since the last one is not support in Node Version <14 and the sync API is used.

Except for Template.js no file logic needed to be changed to remove fs-extra.

According to my run of "npm test" test results are not changed by this commit.

Signed-off-by: Raphael Höser <raphael@hoeser.info>
this.writeCount++;
debug(`${outputPath} ${lang.finished}.`);
});
await fs.promises.mkdir(path.parse(outputPath).dir, { recursive: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite the same but we’ll fix it in post!!

@zachleat zachleat merged commit f53b01a into 11ty:master Jul 26, 2021
@zachleat
Copy link
Member

Thank you!

@zachleat zachleat added this to the Eleventy 1.0.0 milestone Jul 26, 2021
@Snapstromegon Snapstromegon deleted the 1891-remove-fs-extra-dependency branch July 26, 2021 19:52
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

2 participants