This commit is contained in:
Andrew Branch
2022-11-09 15:22:26 -08:00
parent 8c25128d87
commit ba45a7961c
3 changed files with 0 additions and 5 deletions

View File

@@ -1748,7 +1748,6 @@ export function getEntrypointsFromPackageJsonInfo(
}
let entrypoints: string[] | undefined;
// TODO: + Json?
const extensions = Extensions.TypeScript | Extensions.Declaration | (resolveJs ? Extensions.JavaScript : 0);
const features = getDefaultNodeResolutionFeatures(options);
const requireState = getTemporaryModuleResolutionState(cache?.getPackageJsonInfoCache(), host, options);
@@ -1960,7 +1959,6 @@ function loadNodeModuleFromDirectoryWorker(extensions: Extensions, candidate: st
}
// Even if extensions is DtsOnly, we can still look up a .ts file as a result of package.json "types"
// TODO: what? Why even bother with DtsOnly?
const expandedExtensions = extensions === Extensions.Declaration ? Extensions.TypeScript | Extensions.Declaration : extensions;
// Don't do package.json lookup recursively, because Node.js' package lookup doesn't.

View File

@@ -7778,8 +7778,6 @@ const allSupportedExtensionsWithJson: readonly Extension[][] = [...allSupportedE
export const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts];
/** @internal */
export const supportedTSImplementationExtensions: readonly Extension[] = [Extension.Ts, Extension.Cts, Extension.Mts, Extension.Tsx];
/** @internal */
export const supportedImplementationExtensions: readonly Extension[] = [...supportedTSImplementationExtensions, ...supportedJSExtensionsFlat];
/** @internal */
export function getSupportedExtensions(options?: CompilerOptions): readonly Extension[][];

View File

@@ -232,7 +232,6 @@ describe("unittests:: config:: configurationExtension", () => {
function testSuccess(name: string, entry: string, expected: ts.CompilerOptions, expectedFiles: string[]) {
expected.configFilePath = entry;
it(name, () => {
console.log(name);
const parsed = getParseCommandLine(entry);
assert(!parsed.errors.length, ts.flattenDiagnosticMessageText(parsed.errors[0] && parsed.errors[0].messageText, "\n"));
assert.deepEqual(parsed.options, expected);