Npm funding support

The latest version of npm supports a looking at package.json#funding and displaying links to funding options, see https://github.com/npm/cli/pull/273 and https://github.com/npm/rfcs/blob/2d2f00457ab19b3003eb6ac5ab3d250259fd5a81/accepted/0017-add-funding-support.md. What URL should be used for this? For example https://tidelift.com/funding/github/npm/nyc gets redirected to https://tidelift.com/subscription/pkg/npm-nyc?utm_medium=referral&utm_source=github_sponsor_button. Does a similar URL scheme exist that redirects to a utm_source that identifies npm fund? I assume "type": "tidelift" should be used (all of the examples show funding.type in all lower-case).

1 Like

@coreyfarrell thank you for reaching out! We’re working on sorting this now and I’ll post back as soon as we have more direction on which URL should be used.

1 Like

@coreyfarrell as you mention above, the URL structure is basically the same as the one for GitHub sponsors, just swapping out the utm_source to utm_source=npm_fund

For example: https://tidelift.com/subscription/pkg/npm-nyc?utm_medium=referral&utm_source=npm_fund

These URL’s will get printed to CLI so I was hoping for a shorter URL that would redirect the way the github sponsor link does.

@coreyfarrell the redirect for GitHub Sponsors was a custom implementation and we are still evaluating npm fund so we don’t have a shortening right now. I’m sorry about that.

I’ll let you know as soon as we have an update. Thank you!