componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 305 forks source link

component-update: doesn't verify that new tag is component-compatible #583

Open stephenmathieson opened 10 years ago

stephenmathieson commented 10 years ago

i've got a project using reworkcss/css-parse. version 2 dropped support for component for some stupid reason, so we fail with:

error : no remote found for dependency "reworkcss/css-stringify@2.0.0". run `component open troubleshooting` for help.
jonathanong commented 10 years ago

it doens't check whether the repository 404d or the component.json 404d. a better error message would again require another HTTP request, which i don't think it's worth it

timaschew commented 9 years ago

@netpoetica @tetsuo what do you think?

tetsuo commented 9 years ago

update changes component.json file even if the latest version is not component-compatible. that's a bug indeed. keeping component.json as it is and showing an error message will work out as expected

netpoetica commented 9 years ago

@tetsuo How do you see an update changing the component.json file? I might be missing something on that one

An error in this situation is expected behavior - if no component.json is found, component should not attempt to treat the repo like a valid remote. I agree with Ong that adding an extra HTTP request is overkill, just to provide a more accurate error message.

What about changing the message of all 404 errors (whether remote or component.json is not found) to just say

error : no valid remote found for dependency  ... ...
tetsuo commented 9 years ago

@netpoetica here https://github.com/componentjs/update.js/blob/master/lib/index.js#L38 there is some weirdness going over there :) enigma of @jonathanong

jonathanong commented 9 years ago

pre-mz co hackage :D