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

better warning message for invalid-meta #2355

Closed
leomao10 opened this issue Sep 6, 2016 · 6 comments
Closed

better warning message for invalid-meta #2355

leomao10 opened this issue Sep 6, 2016 · 6 comments

Comments

@leomao10
Copy link
Contributor

leomao10 commented Sep 6, 2016

When I ran bower install, I got following error message:

bower                     invalid-meta The "name" is recommended to be lowercase, can contain digits, dots, dashes

I know this is not a new warning, but one thing bugs me a lot is I don't know which bower component cause this error and need to remove them one by one so that I can find out which bower component raise this message.

Is it possible to provide more information like which bower component is it rather than:

The "name" is recommended to be lowercase, can contain digits, dots, dashes

Thanks a lot for your help

Cheers

@benmann
Copy link
Member

benmann commented Sep 6, 2016

@leomao10 As you mentioned this is expected but also annoying I agree.. Personally, I'd try something with grep.. like this:

grep -i '"name":' bower_components/*/bower.json

That gets you a list of the packages, which you need to check for the naming pattern. Could probably automate that too.. 🍬

..Sorry just when I reread the issue I understood that you would like to see this as a permanent improvement to Bower. Would you be interested in providing a PR for that?

@leomao10
Copy link
Contributor Author

leomao10 commented Sep 7, 2016

Sure, will give it a try when I have time this week :)

@benmann
Copy link
Member

benmann commented Sep 7, 2016

Cool! Let me know if you want some help 😉

@leomao10
Copy link
Contributor Author

leomao10 commented Sep 8, 2016

Hey @benmann

I just created a PR(#2357).

However, I am still a newbie in javascript land, and not quite sure how to run bower's test suites, can you let me know what is the command to do that?

I will add some tests for my changes.

Cheers

Leo Liang

@benmann
Copy link
Member

benmann commented Sep 9, 2016

In general you can just run $ npm test ..Behind that is what you see inside the package.json in the scripts section specifically. There you can see that $ npm test does nothing but call grunt test which will eventually run the tests by calling tests/test.js (as seen in the Gruntfile.js. There are also tests run when you commit to the PR (AppyVeyor and Coveralls).

You could basically test for one package with invalid name, multiple packages with invalid names and one/multiple with a valid name or mixed. That way you have all cases covered... 😃

@sheerun
Copy link
Contributor

sheerun commented Apr 26, 2020

Bower is deprecated and we won't implement new features like this one. We recommend switching to yarn and migrating projects to it with https://github.com/sheerun/bower-away

@sheerun sheerun closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants