(
rootPath: string,
source: ProjectDescriptor['source'] = classifyProjectSource(rootPath),
options: { touch?: boolean } = {}
)
| 256 | } |
| 257 | |
| 258 | function rememberProjectPath( |
| 259 | rootPath: string, |
| 260 | source: ProjectDescriptor['source'] = classifyProjectSource(rootPath), |
| 261 | options: { touch?: boolean } = {} |
| 262 | ): void { |
| 263 | const resolvedRootPath = path.resolve(rootPath); |
| 264 | const rootKey = normalizeRootKey(resolvedRootPath); |
| 265 | const existingSource = projectSourcesByKey.get(rootKey); |
| 266 | |
| 267 | if ( |
| 268 | !existingSource || |
| 269 | source === 'root' || |
| 270 | (source === 'subdirectory' && existingSource === 'ad_hoc') |
| 271 | ) { |
| 272 | projectSourcesByKey.set(rootKey, source); |
| 273 | } |
| 274 | |
| 275 | if (options.touch !== false) { |
| 276 | touchProject(resolvedRootPath); |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | function registerDiscoveredProjectPath( |
| 281 | rootPath: string, |
no test coverage detected