(text: string)
| 22 | // FNV-1a — tiny, deterministic, and the same value in every process of this |
| 23 | // checkout (globalsetup and test workers must agree on the ports). |
| 24 | const hash = (text: string): number => { |
| 25 | let h = 2166136261; |
| 26 | for (let i = 0; i < text.length; i++) { |
| 27 | h ^= text.charCodeAt(i); |
| 28 | h = Math.imul(h, 16777619); |
| 29 | } |
| 30 | return h >>> 0; |
| 31 | }; |
| 32 | |
| 33 | // 400 blocks of 10 ports in 42000..45999: unprivileged and clear of common dev |
| 34 | // servers. NOTE: this range is below macOS's ephemeral range (49152+) but sits |