The file name to check the format of (it need not exist on disk)
OptionalpackageJsonInfoCache: PackageJsonInfoCacheA cache for package file lookups - it's best to have a cache when this function is called often
The ModuleResolutionHost which can perform the filesystem lookups for package json data
The compiler options to perform the analysis under - relevant options are moduleResolution and traceResolution
undefined if the path has no relevant implied format, ModuleKind.ESNext for esm format, and ModuleKind.CommonJS for cjs format
A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the
optionsparameter.