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

Don't Accidentally delete the project's root #155

Conversation

maddhruv
Copy link

No description provided.

@codecov-io
Copy link

codecov-io commented Jul 31, 2019

Codecov Report

Merging #155 into master will decrease coverage by 1.08%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
- Coverage   98.86%   97.77%   -1.09%     
==========================================
  Files           1        1              
  Lines          88       90       +2     
  Branches       30       31       +1     
==========================================
+ Hits           87       88       +1     
- Misses          1        2       +1
Impacted Files Coverage Δ
src/clean-webpack-plugin.ts 97.77% <50%> (-1.09%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fd2f73...3a190d1. Read the comment docs.

@maddhruv
Copy link
Author

maddhruv commented Aug 2, 2019

@johnagan

@chrisblossom
Copy link
Collaborator

This is already built into this library via the npm package del. You can use the dangerouslyAllowCleanPatternsOutsideProject to override.

@maddhruv
Copy link
Author

maddhruv commented Aug 3, 2019

Allow clean patterns outside of process.cwd()

it says this
but clean is by default about output.path
and i dont think this option even saves your project root

@chrisblossom
Copy link
Collaborator

Allow clean patterns outside of process.cwd()

it says this
but clean is by default about output.path
and i dont think this option even saves your project root

I don't really understand this comment.

Currently you cannot remove your project root without setting dangerouslyAllowCleanPatternsOutsideProject: true and dry: false via del.

Have you had an issue with this not working?

@maddhruv
Copy link
Author

I haven't enabled these options
but still mistakenly deleted the project's root

@chrisblossom
Copy link
Collaborator

I haven't enabled these options
but still mistakenly deleted the project's root

Can you provide the options you used to remove your project's root? I'd like to add a test case for this.

@juliantroeps
Copy link

@chrisblossom Not sure if thats the same problem, but when I set my config to an empty object like
new CleanWebpackPlugin({}), the build fails (error message here) and the whole project gets wiped.

@chrisblossom chrisblossom mentioned this pull request Oct 16, 2019
@maddhruv maddhruv closed this Feb 26, 2020
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.

4 participants