File tree Expand file tree Collapse file tree 4 files changed +46
-2
lines changed Expand file tree Collapse file tree 4 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export const AGENTS = {
24
24
'global' : 'yarn global add {0}' ,
25
25
'add' : 'yarn add {0}' ,
26
26
'upgrade' : 'yarn upgrade {0}' ,
27
- 'upgrade-interactive' : 'yarn upgrade-interactive' ,
27
+ 'upgrade-interactive' : 'yarn upgrade-interactive {0} ' ,
28
28
'execute' : 'yarn dlx {0}' ,
29
29
'uninstall' : 'yarn remove {0}' ,
30
30
'global_uninstall' : 'yarn global remove {0}' ,
@@ -36,7 +36,7 @@ export const AGENTS = {
36
36
'global' : 'pnpm i -g {0}' ,
37
37
'add' : 'pnpm i {0}' ,
38
38
'upgrade' : 'pnpm update {0}' ,
39
- 'upgrade-interactive' : 'pnpm update -i' ,
39
+ 'upgrade-interactive' : 'pnpm update -i {0} ' ,
40
40
'execute' : 'pnpm dlx {0}' ,
41
41
'uninstall' : 'pnpm remove {0}' ,
42
42
'global_uninstall' : 'pnpm remove -g {0}' ,
Original file line number Diff line number Diff line change
1
+ import test , { ExecutionContext } from 'ava'
2
+ import { parseNu } from '../../src/commands'
3
+
4
+ const agent = 'npm'
5
+ const _ = ( arg : string , expected : string ) => ( t : ExecutionContext ) => {
6
+ t . is (
7
+ parseNu ( agent , arg . split ( ' ' ) . filter ( Boolean ) ) ,
8
+ expected ,
9
+ )
10
+ }
11
+
12
+ test ( 'empty' , _ ( '' , 'npm update' ) )
Original file line number Diff line number Diff line change
1
+ import test , { ExecutionContext } from 'ava'
2
+ import { parseNu } from '../../src/commands'
3
+
4
+ const agent = 'pnpm'
5
+ const _ = ( arg : string , expected : string ) => ( t : ExecutionContext ) => {
6
+ t . is (
7
+ parseNu ( agent , arg . split ( ' ' ) . filter ( Boolean ) ) ,
8
+ expected ,
9
+ )
10
+ }
11
+
12
+ test ( 'empty' , _ ( '' , 'pnpm update' ) )
13
+
14
+ test ( 'interactive' , _ ( '-i' , 'pnpm update -i' ) )
15
+
16
+ test ( 'interactive latest' , _ ( '-i --latest' , 'pnpm update -i --latest' ) )
Original file line number Diff line number Diff line change
1
+ import test , { ExecutionContext } from 'ava'
2
+ import { parseNu } from '../../src/commands'
3
+
4
+ const agent = 'yarn'
5
+ const _ = ( arg : string , expected : string ) => ( t : ExecutionContext ) => {
6
+ t . is (
7
+ parseNu ( agent , arg . split ( ' ' ) . filter ( Boolean ) ) ,
8
+ expected ,
9
+ )
10
+ }
11
+
12
+ test ( 'empty' , _ ( '' , 'yarn upgrade' ) )
13
+
14
+ test ( 'interactive' , _ ( '-i' , 'yarn upgrade-interactive' ) )
15
+
16
+ test ( 'interactive latest' , _ ( '-i --latest' , 'yarn upgrade-interactive --latest' ) )
You can’t perform that action at this time.
0 commit comments