yalc
yalc copied to clipboard
"yalc installations clean" does not remove all installations
I expect yalc installations clean
to remove all installations in ~/.yalc/installations.json
but it doesn't. Here's a demo:
% cat ~/.yalc/installations.json
{
"@horizon/common": [
"/c/dss/Product/Horizon/horizon/packages/renderer"
],
"@garyo-test/common": [
"/tmp/yalc-test/app"
]
}
tower1 (/tmp/yalc-test [master]) 7:11PM 5328=>
% yalc installations show @garyo-test/common
Installations of package @garyo-test/common:
/tmp/yalc-test/app
tower1 (/tmp/yalc-test [master]) 7:11PM 5329=>
% yalc installations clean @garyo-test/common
tower1 (/tmp/yalc-test [master]) 7:11PM 5330=>
% cat ~/.yalc/installations.json
{
"@horizon/common": [
"/c/dss/Product/Horizon/horizon/packages/renderer"
],
"@garyo-test/common": [
"/tmp/yalc-test/app"
]
}
As you can see "/tmp/yalc-test/app" is still listed.
Have updated the package. You may check if it fixed.
Thanks -- I got the update but it still doesn't seem to work for me:
% yalc --version
1.0.0-pre.42
tower1 (~HORIZON/packages [master]) 10:39AM 5407=>
% cat ~/.yalc/installations.json
{
"@horizon/common": [
"/c/dss/Product/Horizon/horizon/packages/renderer"
],
"@garyo-test/common": [
"/tmp/yalc-test/app"
]
}
tower1 (~HORIZON/packages [master]) 10:39AM 5408=>
% yalc installations clean @garyo-test/common
tower1 (~HORIZON/packages [master]) 10:39AM 5409=>
% yalc installations show
Installations of package @horizon/common:
/c/dss/Product/Horizon/horizon/packages/renderer
Installations of package @garyo-test/common:
/tmp/yalc-test/app
tower1 (~HORIZON/packages [master]) 10:39AM 5410=>
% cat ~/.yalc/installations.json
{
"@horizon/common": [
"/c/dss/Product/Horizon/horizon/packages/renderer"
],
"@garyo-test/common": [
"/tmp/yalc-test/app"
]
}
tower1 (~HORIZON/packages [master]) 10:39AM 5410=>
% ls -l ~/.yalc/installations.json
-rw-rw-r-- 1 garyo garyo 141 Aug 16 19:19 /home/garyo/.yalc/installations.json
why should it remove the installation /tmp/yalc-test/app
doesn't exist?
Sorry, I don't understand your question. That directory /tmp/yalc-test/app
does exist. I must be missing something obvious I'm sure :-)
Why the installation should be clean/removed?
Shouldn't yalc installations clean @garyo-test/common
remove all installations of @garyo-test/common
? I'd expect after running that command that my ~/.yalc/installations.json
would look like
{
"@horizon/common": [
"/c/dss/Product/Horizon/horizon/packages/renderer"
]
}
... in other words, no more mention of @garyo-test/common
.
No, it removes only broken installations. If package.json/yalc.lock not found.
Ah, so to actually remove (unpublish) a package I have to go to the destination(s) first, remove the package from yalc.lock
there, and then go back and yalc installations clean
? OK. (Actually I tried it -- once I yalc remove
in the destination, it also removes it from ~/.yalc/installations.json
, so this command isn't even needed.)
I was looking at the doc on the home page which says:
Run
yalc installations clean my-package
to unpublish a package published with yalc publish
so perhaps I'm just confused about what that means. Maybe that sentence could be clarified for newbies?
I agree with @garyo, this should be in the README as it's not common sense to first remove it and then unpublish.
Would it be possible to add a command that removes a package from all installations, if yalc installations clean
is not meant to do that?
I just ran into this problem. And I also think it's interesting to use a "clean" to remove the yalc file and clean everything. Many times we add several things and want to "clean everything" to start from scratch. Especially in more complex environments