()
| 47 | } |
| 48 | |
| 49 | async function getTscFromReadme() { |
| 50 | const readmeText = readline.createInterface({ |
| 51 | input: fs.createReadStream(new URL('../README.md', import.meta.url)), |
| 52 | crlfDelay: Infinity, |
| 53 | }); |
| 54 | const returnedArray = []; |
| 55 | let foundTscHeading = false; |
| 56 | for await (const line of readmeText) { |
| 57 | // Until three votes have passed from March 16, 2023, we will need this. |
| 58 | // After that point, we can use this for setting `foundTscHeading` below |
| 59 | // and remove this. |
| 60 | if (line === '#### TSC voting members') { |
| 61 | continue; |
| 62 | } |
| 63 | |
| 64 | // If we've found the TSC heading already, stop processing at the next |
| 65 | // heading. |
| 66 | if (foundTscHeading && line.startsWith('#')) { |
| 67 | break; |
| 68 | } |
| 69 | |
| 70 | const isTsc = foundTscHeading && line.length; |
| 71 | |
| 72 | if (line === '### TSC (Technical Steering Committee)') { |
| 73 | foundTscHeading = true; |
| 74 | } |
| 75 | if (line.startsWith('* ') && isTsc) { |
| 76 | const handle = line.match(/^\* \[([^\]]+)]/)[1]; |
| 77 | returnedArray.push(handle); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | if (!foundTscHeading) { |
| 82 | throw new Error('Could not find TSC section of README'); |
| 83 | } |
| 84 | |
| 85 | return returnedArray; |
| 86 | } |
| 87 | |
| 88 | async function getVotingRecords(tscMembers, votes) { |
| 89 | const votingRecords = {}; |
no test coverage detected
searching dependent graphs…