(registry, name, version)
| 145 | } |
| 146 | |
| 147 | async function fetchPublishedManifest(registry, name, version) { |
| 148 | // Scoped names must have their separator encoded to address a single version, |
| 149 | // e.g. `@scope/pkg` -> `@scope%2fpkg`. replaceAll, not replace: escaping only |
| 150 | // the first occurrence is the js/incomplete-sanitization pattern. |
| 151 | return fetchJson(`${registry}/${name.replaceAll('/', '%2f')}/${version}`, `${name}@${version}`); |
| 152 | } |
| 153 | |
| 154 | async function fetchJson(url, label) { |
| 155 | for (let attempt = 1; attempt <= FETCH_ATTEMPTS; attempt++) { |
no test coverage detected