File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed
Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,13 @@ Optional.
5757
5858Run [ all repositories] ( ./projects.json ) by default.
5959
60- Comma separated repository list. (Currently only allow repositories defined in ` projects.json ` )
60+ Comma separated repository or name list. (Currently only allow repositories defined in ` projects.json ` )
6161
6262```
63+ RUN #110168 ON babel/babel
6364RUN #110168 ON https://github.com/babel/babel.git
64- RUN #110168 ON https://github.com/ babel/babel.git,https://github.com/ prettier/prettier.git
65- RUN #110168 VS 1.0.0 ON https://github.com/ babel/babel.git,https://github.com/ prettier/prettier.git
65+ RUN #110168 ON babel/babel, prettier/prettier
66+ RUN #110168 VS 1.0.0 ON babel/babel, prettier/prettier
6667```
6768
6869## Add new project
Original file line number Diff line number Diff line change @@ -87,5 +87,32 @@ describe("parse", () => {
8787 ],
8888 }
8989 ` ) ;
90+ {
91+ const { alternative, original, repositories } = parseCommand (
92+ "run 1.0.0 vs 2.0.0 on babel/babel,prettier/prettier" ,
93+ ) ;
94+ expect ( {
95+ alternative,
96+ original,
97+ repositories : repositories . map ( ( { name } ) => name ) ,
98+ } ) . toMatchInlineSnapshot ( `
99+ {
100+ "alternative": {
101+ "raw": "1.0.0",
102+ "type": "PACKAGE",
103+ "version": "1.0.0",
104+ },
105+ "original": {
106+ "raw": "2.0.0",
107+ "type": "PACKAGE",
108+ "version": "2.0.0",
109+ },
110+ "repositories": [
111+ "babel/babel",
112+ "prettier/prettier",
113+ ],
114+ }
115+ ` ) ;
116+ }
90117 } ) ;
91118} ) ;
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ function parseRepositories(repositories: string | undefined) {
6565 const result : Project [ ] = [ ] ;
6666 for ( const repository of shouldRun ) {
6767 const matched = allRepositories . find (
68- ( searching ) => searching . repository === repository ,
68+ ( searching ) =>
69+ searching . repository === repository || searching . name === repository ,
6970 ) ;
7071
7172 if ( ! matched ) {
You can’t perform that action at this time.
0 commit comments