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

Use native mkdirSync instead of 'mkdirp' package #1833

Merged
merged 1 commit into from
May 17, 2021

Conversation

Krinkle
Copy link
Contributor

@Krinkle Krinkle commented Aug 22, 2020

Description

In Node.js 10 and later, recursive mkdir is available in core. No longer needs the mkdirp package.
https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_mkdirsync_path_options

Before Merge Checklist

  • Source branch in your fork has meaningful name (not master)
  • JavaScript implementation
  • Python implementation (NA if HTML beautifier)
  • Added Tests to data file(s)
  • Added command-line option(s)
  • README.md documents new feature/option(s)

Ref 11ty/eleventy#1375.

Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

Thanks!

We just took node 8 out of the CI run, but as far as I know the library still runs on versions back to node 6.

Is there a strong reason to make this move?

If we go this route we'll need to release a version that includes an engines section in the package.json first, with Node 10 as the minimum version.

https://stackoverflow.com/questions/29349684/how-can-i-specify-the-required-node-js-version-in-package-json

Would you might create a PR that first step? And then update this PR to be the second step?

@Krinkle
Copy link
Contributor Author

Krinkle commented Aug 25, 2020

@bitwiseman The main motivation for this is to reduce the size of the dependency graph for downstream users of js-beautify, thus requiring fewer packages to be audited and trusted.

As Node 8 is beyond its EOL date, I assumed requiring Node 10 for new releases would be uncontroversial (https://github.com/nodejs/Release). I'll see about making those PRs!

Krinkle added a commit to Krinkle/js-beautify that referenced this pull request Aug 25, 2020
Follows beautifier#1745 which removed Node 8 from the test matrix.

Ref beautifier#1833.
@bitwiseman
Copy link
Member

@Krinkle
You'd be surprised about what is controversial for this library.
I totally agree with reducing the dependency graph. We just tend to move really slowly on breaking changes like this.

@bitwiseman bitwiseman added this to the v1.14.0 milestone Aug 25, 2020
Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

Waiting for publishing of some additional v1.13.x releases. Will merge for 1.14.0.

@Krinkle
Copy link
Contributor Author

Krinkle commented Aug 25, 2020

You'd be surprised about what is controversial for this library.

To clarify, I didn't mean that it should be uncontroversial, just that figured there's a good chance that it might be, given it was no longer tested for (and EOL). If correct, then this change can help improve something downstream. But, if support is meant to remain, that's totally fine with me! I'm just going through the large tree I'm currently auditing, simplifying code where possible and sometimes proposing to remove potentially obsolete fallbacks.

Base automatically changed from master to main January 11, 2021 21:55
@Krinkle
Copy link
Contributor Author

Krinkle commented May 17, 2021

Merge conflict resolved.

@bitwiseman bitwiseman merged commit fb84348 into beautifier:main May 17, 2021
@Krinkle Krinkle deleted the native-mkdirp branch May 18, 2021 00:00
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.

3 participants