-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Fix missing GitHub Sponsor for npm fund
#7707
Conversation
We forgot to add our GitHub Sponsor to `package.json` when we started it. ```sh-session $ npm fund stylelint 1: opencollective funding available at the following URL: https://opencollective.com/stylelint 2: github funding available at the following URL: https://github.com/sponsors/stylelint Run `npm fund [<package-spec>] --which=1`, for example, to open the first funding URL listed in that package ``` In addition, this improves the financial section in the contribution guide: - Add GitHub Sponsor - Simplify links to Open Collective, including unsupported `#backer` or `#sponsor`
🦋 Changeset detectedLatest commit: b887263 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
[out of topic] I'd like to apply these Ref https://github.com/search?q=org%3Astylelint+funding+path%3Apackage.json&type=code |
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.
LGTM!
Thank you for this
We always need to add the exact same snippet in each Edit: Maybe doing all the releases to have this information publicly available is most of the work? |
@romainmenke Thanks for the quick review. 😄
Exactly. I think it's better for all published packages in @stylelint to have the same EDIT: And, yes. We have to publish packages with their updated |
[note] This snippet automatically updates the #!/usr/bin/env node --experimental-default-type=module
import { execSync } from "child_process";
const funding = JSON.parse(
execSync('npm view "stylelint" "funding" --json').toString(),
);
execSync('npm pkg delete "funding"', { stdio: "inherit" });
funding.forEach(({ type, url }, i) => {
execSync(
`npm pkg set "funding[${i}].type=${type}" "funding[${i}].url=${url}"`,
{ stdio: "inherit" },
);
});
console.log('Updated package.json'); |
We forgot to add our GitHub Sponsor to
package.json
(funding
) when we started it.In addition, this improves the financial section in the contribution guide:
#backer
or#sponsor
None.
I've also added a changelog item so that users can notice this
npm fund
change, but I can remove it if anyone don't consider it appropriate in the changelog.