Variables
Const TESTS
TESTS: string[][] = [[`${yarnCorePkgDir}/sources/Configuration.ts`, `./Configuration`],[`${fslibPkgDir}/README.md`, `@yarnpkg/fslib/README.md`],[`${fslibPkgDir}/package.json`, `@yarnpkg/fslib/package.json`],[`${libzipPkgDir}/sources/ZipFS.ts`, `@yarnpkg/libzip/sources/ZipFS`],[`${fslibPkgDir}/sources/index.ts`, `@yarnpkg/fslib`],]
Const compilerHost
compilerHost: CompilerHost = ts.createCompilerHost(compilerOptions)
Const compilerOptions
compilerOptions: ParsedCommandLine = ts.parseJsonSourceFileConfigFileContent(tsconfigFile,ts.sys,path.dirname(tsconfigFile.fileName),)
createRequire
createRequire: createRequire
Const fslibPkgDir
fslibPkgDir: string = require.resolve(`@yarnpkg/fslib/package.json`).replace(`/package.json`, ``)
Const libzipPkgDir
libzipPkgDir: string = require.resolve(`@yarnpkg/libzip/package.json`).replace(`/package.json`, ``)
Const moduleSpecifierResolutionHost
moduleSpecifierResolutionHost: any = ts.createModuleSpecifierResolutionHost(program, compilerHost)
Const path
path: PlatformPath = require(`path`)
Const program
program: Program = ts.createProgram(compilerOptions.fileNames, compilerOptions, compilerHost)
Const rootSourceFile
rootSourceFile: undefined | SourceFile = program.getSourceFile(require.resolve(`${yarnCorePkgDir}/sources/Project.ts`))
Const ts
ts
: ts = require(`typescript`)
Const tsconfigFile
tsconfigFile: TsConfigSourceFile = ts.readJsonConfigFile(require.resolve(`@yarnpkg/monorepo/package.json`),ts.sys.readFile,)
Const yarnCorePkgDir
yarnCorePkgDir: string = require.resolve(`@yarnpkg/core/package.json`).replace(`/package.json`, ``)