(payload: BootstrapState)
| 340 | } |
| 341 | |
| 342 | function phase3(payload: BootstrapState) { |
| 343 | const { |
| 344 | emit, |
| 345 | files, |
| 346 | pretty, |
| 347 | transpileOnly, |
| 348 | transpiler, |
| 349 | noExperimentalReplAwait, |
| 350 | typeCheck, |
| 351 | swc, |
| 352 | compilerHost, |
| 353 | ignore, |
| 354 | preferTsExts, |
| 355 | logError, |
| 356 | scriptMode, |
| 357 | cwdMode, |
| 358 | project, |
| 359 | skipProject, |
| 360 | skipIgnore, |
| 361 | compiler, |
| 362 | ignoreDiagnostics, |
| 363 | compilerOptions, |
| 364 | argsRequire, |
| 365 | scope, |
| 366 | scopeDir, |
| 367 | esm, |
| 368 | experimentalSpecifierResolution, |
| 369 | } = payload.parseArgvResult; |
| 370 | const { cwd } = payload.phase2Result!; |
| 371 | |
| 372 | // NOTE: When we transition to a child process for ESM, the entry-point script determined |
| 373 | // here might not be the one used later in `phase4`. This can happen when we execute the |
| 374 | // original entry-point but then the process forks itself using e.g. `child_process.fork`. |
| 375 | // We will always use the original TS project in forked processes anyway, so it is |
| 376 | // expected and acceptable to retrieve the entry-point information here in `phase2`. |
| 377 | // See: https://github.com/TypeStrong/ts-node/issues/1812. |
| 378 | const { entryPointPath } = getEntryPointInfo(payload); |
| 379 | |
| 380 | const preloadedConfig = findAndReadConfig({ |
| 381 | cwd, |
| 382 | emit, |
| 383 | files, |
| 384 | pretty, |
| 385 | transpileOnly: transpileOnly ?? transpiler != null ? true : undefined, |
| 386 | experimentalReplAwait: noExperimentalReplAwait ? false : undefined, |
| 387 | typeCheck, |
| 388 | transpiler, |
| 389 | swc, |
| 390 | compilerHost, |
| 391 | ignore, |
| 392 | logError, |
| 393 | projectSearchDir: getProjectSearchDir( |
| 394 | cwd, |
| 395 | scriptMode, |
| 396 | cwdMode, |
| 397 | entryPointPath |
| 398 | ), |
| 399 | project, |
no test coverage detected
searching dependent graphs…