()
| 35 | }, |
| 36 | ); |
| 37 | const createTemporaryDirectory = () => { |
| 38 | const directory = path.join( |
| 39 | // The following quoted from https://github.com/es-tooling/module-replacements/blob/27d1acd38f19741e31d2eae561a5c8a914373fc5/docs/modules/tempy.md?plain=1#L20-L21, not sure if it's true |
| 40 | // MacOS and possibly some other platforms return a symlink from `os.tmpdir`. |
| 41 | // For some applications, this can cause problems; thus, we use `realpath`. |
| 42 | fs.realpathSync(os.tmpdir()), |
| 43 | crypto.randomBytes(16).toString("hex"), |
| 44 | ); |
| 45 | fs.mkdirSync(directory); |
| 46 | return directory; |
| 47 | }; |
| 48 | |
| 49 | const allowedClients = new Set(["yarn", "npm", "pnpm"]); |
| 50 |
no test coverage detected
searching dependent graphs…