Do you want to request a _feature_ or report a _bug_?
Bug
What is the current behavior?
Running yarn on an existing project deleted several bower.json and .bower.json files, which weren't even in the root of the current project.
These were files that existed within the test directory, used in unit tests. However, I think it's unacceptable that yarn removes _any_ files without warning or even a message on the command line.
If the current behavior is a bug, please provide the steps to reproduce.
yarn at the root$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: yarn.lock
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: test/bower/components/angular/bower.json
deleted: test/bower/components/no-bower-version/.bower.json
deleted: test/bower/components/no-bower-version/bower.json
deleted: test/bower/components/no-dot-bower-version/bower.json
What is the expected behavior?
bower.json and .bower.json files should be left as-is.node_modules (or possibly bower_components) directory.Please mention your node.js, yarn and operating system version.
v5.12.00.15.1Mac OS X 10.11.6Same here, I was really surprised when yarn deleted 2220 files (all bower dependencies in a dir named components).
Same here,
yarn simply removes all files in my bower_components directory.
The workaround that fixed my issue (I _think_ I had that issue because I have package.json and bower.json in the same directory) was this:
yarn -> mv package.json p.json -> yarn -> mv p.json package.json
The first yarn installs npm dependencies and removes bower dependencies and the second one installs bower dependencies.
This is a different problem than removing files within bower_components, there's a separate issue reported for that already.
This issue is that it's removing the bower.json files themselves, and they weren't even in the same directory.
While I agree that yarn shouldn't be touching Bower setups, we should make sure each issue stays focused.
We've removed support for Bower, see #1441.
Most helpful comment
This is a different problem than removing files within
bower_components, there's a separate issue reported for that already.This issue is that it's removing the
bower.jsonfiles themselves, and they weren't even in the same directory.While I agree that yarn shouldn't be touching Bower setups, we should make sure each issue stays focused.