You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously the `which` param in `npm fund` was validated incorrectly
leading to `EFUNDNUMBER` errors when used. This fixes that and does a
better job detecting when `which` is pointing to an incorrect array
bounds in the returned funding array.
Copy file name to clipboardExpand all lines: tap-snapshots/test/lib/commands/fund.js.test.cjs
+11-33Lines changed: 11 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,7 @@
8
8
exports[`test/lib/commands/fund.js TAP fund a package with type and multiple sources > should print prompt select message 1`]=`
9
9
1: Foo funding available at the following URL: http://example.com/foo
10
10
2: Lorem funding available at the following URL: http://example.com/foo-lorem
11
-
Run \`npm fund [<@scope>/]<pkg> --which=1\`, for example, to open the first funding URL listed in that package
12
-
11
+
Run \`npm fund [<package-spec>] --which=1\`, for example, to open the first funding URL listed in that package
13
12
`
14
13
15
14
exports[`test/lib/commands/fund.js TAP fund colors > should print output with color info 1`]=`
@@ -23,7 +22,6 @@ exports[`test/lib/commands/fund.js TAP fund colors > should print output with co
exports[`test/lib/commands/fund.js TAP fund containing multi-level nested deps with no funding > should omit dependencies with no funding declared 1`]=`
exports[`test/lib/commands/fund.js TAP fund using bad which value: index too high > should print message about invalid which 1`]=`
49
+
--which=100 is not a valid index
50
+
1: Funding available at the following URL: http://example.com
51
+
2: Funding available at the following URL: http://sponsors.example.com/me
52
+
3: Funding available at the following URL: http://collective.example.com
53
+
Run \`npm fund [<package-spec>] --which=1\`, for example, to open the first funding URL listed in that package
51
54
`
52
55
53
56
exports[`test/lib/commands/fund.js TAP fund using nested packages with multiple sources > should prompt with all available URLs 1`]=`
54
57
1: Funding available at the following URL: https://one.example.com
55
58
2: Funding available at the following URL: https://two.example.com
56
-
Run \`npm fund [<@scope>/]<pkg> --which=1\`, for example, to open the first funding URL listed in that package
57
-
58
-
`
59
-
60
-
exports[`test/lib/commands/fund.js TAP fund using nested packages with multiple sources, with a source number > should open the numbered URL 1`]=`
exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace > should display only filtered workspace name and its deps 1`]=`
76
+
exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace name > should display only filtered workspace name and its deps 1`]=`
exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace > should display only filtered workspace path and its deps 1`]=`
85
+
exports[`test/lib/commands/fund.js TAP workspaces filter funding info by a specific workspace path > should display only filtered workspace name and its deps 1`]=`
0 commit comments