-
Notifications
You must be signed in to change notification settings - Fork 140
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
name
should only be required for published packages
#22
Comments
what about name should only be required if |
@eddiemonge I guess this would be an ok compromise. The private flag is optional and really only to prevent accidental publication of private repositories. But yeah, I'm ok with this as a compromise. oops, closed issue by mistake, reopened |
+1 Coming up with a name for something is often the hardest part. :/ Starting a new project should be as simple as specifying |
@lukehorvat The private flag shouldn't be required to prevent accidental publication of a private repository. Publication should be opt-in. It might already work like this, if not, then it should. Then, essentially, all you need is |
If you type bower publish it will publish it unless you have the private flag set to true. so its opt-in with accidental publication prevention |
@eddiemonge opt-in? You say it will publish if you don't have the private flag set to true, that's opt-out. i.e. you're saying the default value for the private flag is false? :) |
@gerardroche typing 👎 for making "name" optional. Fwiw, optional values, especially "name", make the code more complex for automation tools, and create surprises for developers when/if the tools are forced to provide default values such as "myApp". |
@unscriptable I don't understand.
The So if your package is published/public i.e. the private flag is false, then it is required. If the private flag is true, then the |
On the contrary, @gerardroche, our tools require a name to function properly. Fwiw, if the The description of this issue doesn't make it clear whether you're describing a constraint during a |
@unscriptable Your tools currently require a |
Not true. They will continue to require a name. We require a name for the application-level bower.json, not just the dependencies. If we (RaveJS) are the only ones who need a name and the general public is truly too lazy to pick a name (or let the tool provide a default one), then I guess we lose this battle. I checked the npm doc linked above, and it clearly indicates that "name" and "version" are the most important pieces in package.json and are required. However, I know from experience that If this is a proposal to allow |
Why do you require a name? Whats it used for?
Yes,
Yes So that should satisfy you. But making name optional should still be allowed. |
Yeah, I would be pretty happy if Bower acted the same as NPM in this area - prompt for |
No I'm not advocating that the prompt for Leaving it blank should omit the property, rather than adding a blank one.
👍 |
I disagree. Leaving it blank should fill in a default "name" property, just like |
@unscriptable :) a name which is redundant and meaningless. I think how |
👍 |
It should be aligned with npm |
Only name and version are required fields in package.json but it won't throw an error if they are missing when installing deps. So I think we should make name required here but don't throw an error if people just wanna install any deps. |
Agreed that |
This is a very old issue, has it been fixed? |
doesn't really matter as bower is sort of dead. |
name
should only be required for published packages.In example, both composer and npm only require a name for published packages.
See also version attribute should always be required #4
The text was updated successfully, but these errors were encountered: