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 rimraf dep and use fs.rm with recursive and force options #304

Closed
nelsonni opened this issue Jan 26, 2021 · 1 comment · Fixed by #378
Closed

Remove rimraf dep and use fs.rm with recursive and force options #304

nelsonni opened this issue Jan 26, 2021 · 1 comment · Fixed by #378
Assignees
Labels
dependencies Issues or updates to dependency files feature Feature requests or improvements
Milestone

Comments

@nelsonni
Copy link
Member

nelsonni commented Jan 26, 2021

Is your feature request related to a problem? Please describe.
The fs.rm method in Node.js v14.14.0 includes recursive and force options which enable the same behavior as rimraf for deep directory removal. fs-extra v9.1.0 also includes Promise support for the fs.rm method, which was pulled into Synectic in PR #300.

The rimraf package has become redundant and as such should be removed to save space on subsequent Synectic builds.

Describe the solution you'd like
Switch all usage of rimraf to fs.rm with recursive and force options enabled. Remove rimraf and @types/rimraf dependencies.

Describe alternatives you've considered
N/A

Additional context
Specific discussion relating to the redundant nature of rimraf following fs-extra v9.1.0 can be found on jprichardson/node-fs-extra#806.

@nelsonni nelsonni added feature Feature requests or improvements dependencies Issues or updates to dependency files labels Jan 26, 2021
@nelsonni nelsonni added this to the v1.0.0 milestone Jan 26, 2021
@nelsonni nelsonni self-assigned this Jan 26, 2021
@nelsonni
Copy link
Member Author

Replacing fs-extra/remove for calls to rimraf within the code is a straightforward swap, but we also use rimraf as a CLI command within package.json:

"clean": "rimraf out/ .webpack/ coverage/ yarn-error.log",

In order to replace this script command, we add fse-cli package in order to expose fs-extra commands at the CLI level; see a1126a5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Issues or updates to dependency files feature Feature requests or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant