NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.54k stars 645 forks source link

[Feature]: Provide capability to mark a package as "needs funding" / include "sponsor URL" #9339

Open tomkerkhove opened 1 year ago

tomkerkhove commented 1 year ago

Related Problem

No response

The Elevator Pitch

Provide capability to mark a package as "needs funding" so that package authors can signal they need funding to keep their project around or it will go away in the future.

This helps companies better support their dependencies.

Additional Context and Details

No response

joelverhagen commented 1 year ago

Hey @tomkerkhove, thanks for the suggestion. This general area has been discussed a bit internally but we don't yet have any concrete plans.

I have a few of questions for you:

  1. Do you think this is the same thing as a "sponsor URL" metadata item we could enable in packages, that would be surfaced in various UIs (VS IDE, NuGet.org, etc)? Similar to how VS Code has: https://code.visualstudio.com/api/working-with-extensions/publishing-extension#extension-sponsor

  2. If "no" to question 1, how do you think this would be shown to package consumers? How can we balance good visibility but also not being too naggy to people that don't want to pay anything?

  3. How do you think this overlaps with a bigger feature request like this: https://github.com/NuGet/NuGetGallery/issues/9265?

In the short term, I think a simple addition to the NuGet package metadata and a small UI-only change to surface the "needs funding"/"sponsor URL" info is pretty feasible. A bigger change where we process payments or manage recurring support is pretty unlikely to happen any time soon, given our other priorities.

If you're interested in making a full proposal in this area, you can consider following this process https://github.com/NuGet/Home/blob/dev/meta/README.md. Depends on how much you'd like to push it forward 👍.

tomkerkhove commented 1 year ago

I think starting with 1) is a good direction which allows us to do this:

In the short term, I think a simple addition to the NuGet package metadata and a small UI-only change to surface the "needs funding"/"sponsor URL" info is pretty feasible. A bigger change where we process payments or manage recurring support is pretty unlikely to happen any time soon, given our other priorities.

Another thing to add would be to include support for dotnet list package --needs-funding.

9265 is definately valuable as well; but that feels like a broader spectrum to dive in to.

tbolon commented 1 year ago

For reference, see also the npm packages.json funding element: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#funding and an exemple of rendering in npmjs.org: https://www.npmjs.com/package/chalk.

And an exemple of npm fund rendered (on mastodon repo):

@mastodon/mastodon
├─┬ https://opencollective.com/babel
│ │ └── @babel/core@7.19.6
│ └── https://opencollective.com/browserslist
│     └── browserslist@4.21.4, caniuse-lite@1.0.30001414, update-browserslist-db@1.0.9, browserslist@4.16.6
├── https://github.com/sponsors/ljharb
│   └── array-includes@3.1.5, is-nan@1.3.2, object.values@1.1.5, promise.prototype.finally@3.1.3, is-core-module@2.9.0, resolve@2.0.0-next.3, object.assign@4.1.1, define-properties@1.1.4, has-property-descriptors@1.0.0, get-intrinsic@1.1.1, es-abstract@1.20.0, call-bind@1.0.2, es-to-primitive@1.2.1, is-callable@1.2.2, is-date-object@1.0.2, is-symbol@1.0.3, function.prototype.name@1.1.5, functions-have-names@1.2.3, get-symbol-description@1.0.0, has-symbols@1.0.3, is-callable@1.2.4, is-negative-zero@2.0.2, is-regex@1.1.4, has-tostringtag@1.0.0, has-symbols@1.0.2, is-shared-array-buffer@1.0.2, is-string@1.0.7, is-weakref@1.0.2, object-inspect@1.12.0, object.assign@4.1.2, regexp.prototype.flags@1.4.3, string.prototype.trimend@1.0.5, string.prototype.trimstart@1.0.5, unbox-primitive@1.0.2, has-bigints@1.0.2, which-boxed-primitive@1.0.2, is-bigint@1.0.2, is-boolean-object@1.1.1, is-number-object@1.0.5, is-symbol@1.0.4, side-channel@1.0.4, object-inspect@1.9.0, has-symbols@1.0.1, util.promisify@1.0.1, object.getownpropertydescriptors@2.1.0, qs@6.11.0, string.prototype.matchall@4.0.7, array.prototype.flat@1.2.5, array.prototype.flatmap@1.3.0, es-abstract@1.20.1, object.fromentries@2.0.5, object.hasown@1.1.1, deep-equal@1.1.1, is-regex@1.1.0, object-is@1.1.3, regexp.prototype.flags@1.3.0
├─┬ https://tidelift.com/funding/github/npm/autoprefixer
│ │ └── autoprefixer@9.8.8
│ └── https://tidelift.com/funding/github/npm/postcss
│     └── postcss@7.0.32
├─┬ https://opencollective.com/webpack
│ │ └── compression-webpack-plugin@6.1.1, schema-utils@3.0.0, css-loader@5.2.7, file-loader@6.2.0, imports-loader@1.2.0, mini-css-extract-plugin@1.6.2, sass-loader@10.2.0, terser-webpack-plugin@4.2.3, webpack@4.46.0, schema-utils@2.7.1
│ ├── https://github.com/sponsors/sindresorhus
│ │   └── p-map@4.0.0, p-limit@3.0.2, globals@13.9.0, type-fest@0.20.2, strip-json-comments@3.1.1, globby@11.1.0, html-tags@3.2.0, meow@9.0.0, camelcase-keys@6.2.2, map-obj@4.3.0, read-pkg-up@7.0.1, type-fest@0.18.1, p-limit@2.3.0, make-dir@3.1.0, parse-json@5.2.0, escape-string-regexp@4.0.0, import-fresh@3.3.0, gzip-size@6.0.0, pretty-bytes@5.6.0, tempy@0.6.0, type-fest@0.16.0, builtin-modules@3.3.0, ansi-escapes@4.3.1, type-fest@0.11.0, get-stream@6.0.1, onetime@5.1.2, p-limit@3.1.0, yocto-queue@0.1.0, camelcase@6.2.0
│ └── https://github.com/sponsors/feross
│     └── safe-buffer@5.2.1, run-parallel@1.2.0, queue-microtask@1.2.3, buffer@6.0.3, base64-js@1.5.1, ieee754@1.2.1
├── https://github.com/sponsors/isaacs
│   └── glob@7.2.0, rimraf@3.0.2
├── https://opencollective.com/postcss/
│   └── postcss@8.4.18, postcss-scss@4.0.5, postcss-safe-parser@6.0.0, postcss-load-config@2.1.2
├─┬ https://opencollective.com/eslint
│ │ └── eslint@7.32.0
│ ├── https://github.com/sponsors/mysticatea
│ │   └── eslint-utils@2.1.0, regexpp@3.1.0
│ ├── https://github.com/sponsors/epoberezkin
│ │   └── ajv@8.5.0, ajv@6.12.6, ajv@8.11.0
│ └── https://github.com/chalk/slice-ansi?sponsor=1
│     └── slice-ansi@4.0.0
├── https://github.com/prettier/prettier?sponsor=1
│   └── prettier@2.7.1
├─┬ https://opencollective.com/stylelint
│ │ └── stylelint@14.14.0
│ ├── https://opencollective.com/csstools
│ │   └── @csstools/selector-specificity@2.0.2
│ └── https://github.com/sponsors/wooorm
│     └── mathml-tag-names@2.1.3, vendors@1.0.4
├── https://opencollective.com/core-js
│   └── core-js-compat@3.25.2, core-js-pure@3.6.5
├── https://github.com/sponsors/RubenVerborgh
│   └── follow-redirects@1.15.2
├── https://github.com/avajs/find-cache-dir?sponsor=1
│   └── find-cache-dir@3.3.1
├─┬ https://github.com/inikulin/parse5?sponsor=1
│ │ └── parse5@7.1.1
│ └── https://github.com/fb55/entities?sponsor=1
│     └── entities@4.4.0
├── https://github.com/sponsors/jonschlinkert
│   └── picomatch@2.3.0
├─┬ https://github.com/chalk/chalk?sponsor=1
│ │ └── chalk@4.1.2
│ └── https://github.com/chalk/ansi-styles?sponsor=1
│     └── ansi-styles@4.2.1, ansi-styles@5.2.0
├── https://github.com/chalk/supports-color?sponsor=1
│   └── supports-color@8.1.1
├── https://github.com/sindresorhus/execa?sponsor=1
│   └── execa@5.1.1
├── https://github.com/sindresorhus/emittery?sponsor=1
│   └── emittery@0.13.1
├── https://tidelift.com/subscription/pkg/npm-loglevel?utm_medium=referral&utm_source=npm_fund
│   └── loglevel@1.7.0
└── https://github.com/chalk/wrap-ansi?sponsor=1
    └── wrap-ansi@7.0.0
JonDouglas commented 1 year ago

fwiw too: https://getcomposer.org/doc/04-schema.md#funding

JonDouglas commented 1 year ago

Hi all,

There is now a proposal on this specific issue that you can go read through and provide your feedback on.

https://github.com/NuGet/Home/pull/12922