-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,29 @@ [email protected] | |
``` | ||
|
||
The deduping might get a bit tricky since instead of a package name either being "by itself" or "grouped with others that have the same funding source", two packages could share one funding source, and then *not* share another funding source. | ||
|
||
## Update: resolution to above bikeshedding | ||
|
||
While working out the implementation with @ruyadorno, we decided the following: | ||
|
||
- No longer display top-level package funding information, since this information is both useless to the maintainer of that package (since they provided the funding information) and also to avoid some tricky problems around deduping | ||
- Invert the human output: instead of a deduped list of package names being the "key", the URL will be the "key" | ||
- JSON output will be unchanged, except that the `funding` info, when specified as an array, will be an array in the output | ||
|
||
Here's some example `npm fund` output in the `resolve` repo: | ||
```sh | ||
[email protected], @ljharb/[email protected], [email protected], [email protected], [email protected] | ||
├── url: https://github.com/sponsors/ljharb | ||
└─┬ [email protected] | ||
└── url: https://github.com/sponsors/isaacs | ||
``` | ||
|
||
With the `@ljharb/eslint-config` package adding an array with two URLs, the `resolve` output will change to (modulo archy formatting): | ||
```sh | ||
[email protected] | ||
├─┬ https://github.com/sponsors/ljharb | ||
│ └── @ljharb/[email protected], [email protected], [email protected], [email protected] | ||
├─┬ https://tidelift.com/funding/github/npm/@ljharb/eslint-config | ||
│ └── @ljharb/[email protected] | ||
└─┬ https://github.com/sponsors/isaacs | ||
└── [email protected] |