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

"yarn clean" / ".yarnclean" breaks semantic-ui-less #4879

Closed
Panoplos opened this issue Nov 8, 2017 · 3 comments
Closed

"yarn clean" / ".yarnclean" breaks semantic-ui-less #4879

Panoplos opened this issue Nov 8, 2017 · 3 comments

Comments

@Panoplos
Copy link

Panoplos commented Nov 8, 2017

Do you want to request a feature or report a bug?

This is a bug.

What is the current behavior?
The default .yarnclean specifies assets directories, which kills certain npm modules, like semantic-ui-less.

If the current behavior is a bug, please provide the steps to reproduce.

Install semantic-ui-less. Run yarn clean. See that

node_modules/semantic-ui-less/themes/basic/assets
node_modules/semantic-ui-less/themes/default/assets
node_modules/semantic-ui-less/themes/github/assets
node_modules/semantic-ui-less/themes/material/assets

Have all been deleted...

What is the expected behavior?
Not to delete assets folders by default.

Please mention your node.js, yarn and operating system version.
yarn @ 1.2.1
node @ 8.9.1
Ubuntu 17.04

@rally25rs
Copy link
Contributor

rally25rs commented Nov 8, 2017

This behavior is as designed; there is a number of directories that are deleted by default. The intent of the autoclean command is that it will provide some reasonable default, but the end user is supposed to review and modify that list as needed.

The yarn command output hints at this:

$ yarn autoclean --init
yarn autoclean v1.3.2
[1/1] Creating ".yarnclean"...
info Created ".yarnclean". Please review the contents of this file then run "yarn autoclean --force" to perform a clean.

but the docs could be clearer.

The default entries are a static list that was devised by someone early in the Yarn history, but clearly no one could predict exactly what directories may or may not be used by every existing and future NPM package. It is sort of a guess at what probably isn't needed.

I'll try to clarify this point in the docs.

@rally25rs
Copy link
Contributor

@Panoplos would you mind reviewing the docs modification linked above to see if it clarifies use of autoclean? Thanks!

@Panoplos
Copy link
Author

Panoplos commented Nov 9, 2017

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants