-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Add package.json funding property #192
Add package.json funding property #192
Conversation
This is great, but why can’t npm just use |
hi @sindresorhus first of all I'm really sorry this change ends up putting even more pressure on maintainers 😞 it was totally not my intention with it. My goal with this PR was just to raise awareness on the new feature, rest assure I understand your point of view if in case you don't want to go this route for now. That said, to give you the context I have, I don't think supporting Thanks for your feedback, I really value your input on this and would love to discuss more 😊 |
🤔 now that you mentioned it, technically speaking it seems to me that even if we were to support |
My expectation would be that npm uses funding.yml as a fallback if this This is sort of similar to how npm respects The same principle should apply here, in my opinion. |
I meant that npm already knows my package is on GitHub as I've specified it in the |
@ruyadorno I tried it out on a package of mine: https://github.com/sindresorhus/is-installed-globally/blob/f36107f2b4dd90705ec46759115ae8ae3fd40495/package.json#L12 The RFC says the |
@sindresorhus thank you so much for the heads up! it does sound like an oversight indeed! (I'll bring that up to the team) for now what you can do is to just ignore |
I had another idea. Would have been nice if we at least could have (no URL): {
"funding": {
"type": "github"
}
} Which would open https://github.com/sindresorhus/ky?sponsor=1 (try clicking it) for the repo of the package. This is usually desirable for projects with multiple maintainers as it will display the modal as if you had clicked the "Sponsor" repo button, and will show everything from |
package.json
Outdated
@@ -9,6 +9,7 @@ | |||
"email": "[email protected]", | |||
"url": "sindresorhus.com" | |||
}, | |||
"funding": "https://github.com/sindresorhus/ky?sponsor=1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reminder, this won't work at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll merge this PR when it's fixed. I don't want to keep changing the format, so I'd rather wait.
Merging as support for shorthand is being added in npm/cli#472 |
@ruyadorno I would recommend npm documents the trick of using |
support to string just landed in v6.13.1
thanks for the heads up, I wasn't aware of it 👍 I'll see with the rest of the team if we have a place where that could fit in the docs but otherwise I'll make sure to share in blogs, etc 😊 |
npm just added a new
npm fund
command in it's v6.13.0 release as part of the efforts to help out the OSS community.This PR adds
funding
info to ky so that users depending on it can actually retrieve the funding url when they runnpm fund
in their projects.Note: The funding information will only be available once a new version of the package is published to the npm registry.