(useTestRegistry: boolean)
| 69 | } |
| 70 | |
| 71 | export async function setRegistry(useTestRegistry: boolean): Promise<void> { |
| 72 | const url = useTestRegistry |
| 73 | ? getGlobalVariable('package-registry') |
| 74 | : 'https://registry.npmjs.org'; |
| 75 | |
| 76 | // Ensure local test registry is used when outside a project |
| 77 | // Yarn supports both `NPM_CONFIG_REGISTRY` and `YARN_REGISTRY`. |
| 78 | process.env['NPM_CONFIG_REGISTRY'] = url; |
| 79 | } |
no test coverage detected