11import fs from 'node:fs' ;
22
3- const TSC_TITLE = '### TSC (Technical Steering Committee)' ;
4- const TSCE_TITLE = '### TSC Emeriti' ;
3+ const TSC_TITLE = '#### TSC voting members' ;
4+ const TSC_REGULAR_TITLE = '#### TSC regular members' ;
5+ const TSCE_TITLE = '#### TSC emeriti members' ;
56const CL_TITLE = '### Collaborators' ;
6- const CLE_TITLE = '### Collaborator Emeriti ' ;
7+ const CLE_TITLE = '### Collaborator emeriti ' ;
78const CONTACT_RE = / \* + \[ ( .+ ?) \] \( .+ ?\) + - \s + \* \* ( [ ^ * ] + ?) \* \* + (?: & l t ; | \\ < | < < ) ( [ ^ > ] + ?) (?: & g t ; | > ) / mg;
89
910const TSC = 'TSC' ;
@@ -73,13 +74,17 @@ function parseCollaborators(readme, cli) {
7374 let m ;
7475
7576 const tscIndex = readme . toUpperCase ( ) . indexOf ( TSC_TITLE . toUpperCase ( ) ) ;
77+ const tscrIndex = readme . toUpperCase ( ) . indexOf ( TSC_REGULAR_TITLE . toUpperCase ( ) ) ;
7678 const tsceIndex = readme . toUpperCase ( ) . indexOf ( TSCE_TITLE . toUpperCase ( ) ) ;
7779 const clIndex = readme . toUpperCase ( ) . indexOf ( CL_TITLE . toUpperCase ( ) ) ;
7880 const cleIndex = readme . toUpperCase ( ) . indexOf ( CLE_TITLE . toUpperCase ( ) ) ;
7981
8082 if ( tscIndex === - 1 ) {
8183 throw new Error ( `Couldn't find ${ TSC_TITLE } in the README` ) ;
8284 }
85+ if ( tscrIndex === - 1 ) {
86+ throw new Error ( `Couldn't find ${ TSC_REGULAR_TITLE } in the README` ) ;
87+ }
8388 if ( tsceIndex === - 1 ) {
8489 throw new Error ( `Couldn't find ${ TSCE_TITLE } in the README` ) ;
8590 }
@@ -90,7 +95,8 @@ function parseCollaborators(readme, cli) {
9095 throw new Error ( `Couldn't find ${ CLE_TITLE } in the README` ) ;
9196 }
9297
93- if ( ! ( tscIndex < tsceIndex &&
98+ if ( ! ( tscIndex < tscrIndex &&
99+ tscrIndex < tsceIndex &&
94100 tsceIndex < clIndex &&
95101 clIndex < cleIndex ) ) {
96102 cli . warn ( 'Contacts in the README is out of order, ' +
@@ -100,7 +106,7 @@ function parseCollaborators(readme, cli) {
100106 // We also assume that TSC & TSC Emeriti are also listed as collaborators
101107 CONTACT_RE . lastIndex = tscIndex ;
102108 // eslint-disable-next-line no-cond-assign
103- while ( ( m = CONTACT_RE . exec ( readme ) ) && CONTACT_RE . lastIndex < tsceIndex ) {
109+ while ( ( m = CONTACT_RE . exec ( readme ) ) && CONTACT_RE . lastIndex < tscrIndex ) {
104110 const login = m [ 1 ] . toLowerCase ( ) ;
105111 const user = new Collaborator ( m [ 1 ] , m [ 2 ] , m [ 3 ] , TSC ) ;
106112 collaborators . set ( login , user ) ;
0 commit comments