Skip to content

Commit

Permalink
Fix bad merge conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Dec 5, 2022
1 parent e4096f8 commit d7944c6
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 64 deletions.
2 changes: 0 additions & 2 deletions src/compiler/moduleNameResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1755,8 +1755,6 @@ function loadModuleFromFile(extensions: Extensions, candidate: string, onlyRecor
return resolvedByAddingExtension;
}
}

return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
}

function loadModuleFromFileNoImplicitExtensions(extensions: Extensions, candidate: string, onlyRecordFailures: boolean, state: ModuleResolutionState): PathAndExtension | undefined {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7224,7 +7224,7 @@ export interface ResolvedModule {
* True if the original module reference used a .ts extension to refer directly to a .ts file,
* which should produce an error during checking if emit is enabled.
*/
resolvedUsingTsExtension: boolean;
resolvedUsingTsExtension?: boolean;
}

/**
Expand Down
5 changes: 0 additions & 5 deletions src/testRunner/unittests/moduleResolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ describe("unittests:: moduleResolution:: Node module resolution - non-relative p
resolvedFileName: "/sub/node_modules/a/index.ts",
isExternalLibraryImport: true,
extension: ts.Extension.Ts,
resolvedUsingTsExtension: false,
},
failedLookupLocations: [],
affectingLocations: [],
Expand All @@ -185,7 +184,6 @@ describe("unittests:: moduleResolution:: Node module resolution - non-relative p
resolvedFileName: "/sub/directory/node_modules/b/index.ts",
isExternalLibraryImport: true,
extension: ts.Extension.Ts,
resolvedUsingTsExtension: false,
},
failedLookupLocations: [],
affectingLocations: [],
Expand All @@ -203,7 +201,6 @@ describe("unittests:: moduleResolution:: Node module resolution - non-relative p
resolvedFileName: "/bar/node_modules/c/index.ts",
isExternalLibraryImport: true,
extension: ts.Extension.Ts,
resolvedUsingTsExtension: false,
},
failedLookupLocations: [],
affectingLocations: [],
Expand All @@ -220,7 +217,6 @@ describe("unittests:: moduleResolution:: Node module resolution - non-relative p
resolvedFileName: "/foo/index.ts",
isExternalLibraryImport: true,
extension: ts.Extension.Ts,
resolvedUsingTsExtension: false,
},
failedLookupLocations: [],
affectingLocations: [],
Expand All @@ -236,7 +232,6 @@ describe("unittests:: moduleResolution:: Node module resolution - non-relative p
resolvedFileName: "d:/bar/node_modules/e/index.ts",
isExternalLibraryImport: true,
extension: ts.Extension.Ts,
resolvedUsingTsExtension: false,
},
failedLookupLocations: [],
affectingLocations: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
"File '/project/a.d.ts.d.ts' does not exist.",
"File '/project/a.d.ts.js' does not exist.",
"File '/project/a.d.ts.jsx' does not exist.",
"File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.",
"File '/project/a.d.ts' does not exist.",
"Directory '/project/a.d.ts' does not exist, skipping all lookups in it.",
"======== Module name './a.d.ts' was not resolved. ========"
]
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
"File '/project/a.d.ts.d.ts' does not exist.",
"File '/project/a.d.ts.js' does not exist.",
"File '/project/a.d.ts.jsx' does not exist.",
"File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.",
"File '/project/a.d.ts' does not exist.",
"Directory '/project/a.d.ts' does not exist, skipping all lookups in it.",
"======== Module name './a.d.ts' was not resolved. ========"
]
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
"File '/project/a.d.ts.d.ts' does not exist.",
"File '/project/a.d.ts.js' does not exist.",
"File '/project/a.d.ts.jsx' does not exist.",
"File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.",
"File '/project/a.d.ts' does not exist.",
"Directory '/project/a.d.ts' does not exist, skipping all lookups in it.",
"======== Module name './a.d.ts' was not resolved. ========"
]
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
"File '/project/a.d.ts.d.ts' does not exist.",
"File '/project/a.d.ts.js' does not exist.",
"File '/project/a.d.ts.jsx' does not exist.",
"File name '/project/a.d.ts' has a '.d.ts' extension - stripping it.",
"File '/project/a.d.ts' does not exist.",
"Directory '/project/a.d.ts' does not exist, skipping all lookups in it.",
"======== Module name './a.d.ts' was not resolved. ========"
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
"File '/node_modules/foo/foo.js.ts' does not exist.",
"File '/node_modules/foo/foo.js.tsx' does not exist.",
"File '/node_modules/foo/foo.js.d.ts' does not exist.",
"File name '/node_modules/foo/foo.js' has a '.js' extension - stripping it.",
"File '/node_modules/foo/foo.ts' does not exist.",
"File '/node_modules/foo/foo.tsx' does not exist.",
"File '/node_modules/foo/foo.d.ts' does not exist.",
"Directory '/node_modules/foo/foo.js' does not exist, skipping all lookups in it.",
"File '/node_modules/foo/index.ts' does not exist.",
"File '/node_modules/foo/index.tsx' does not exist.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
"File '/foo.js.ios.ts' does not exist.",
"File '/foo.js.ios.tsx' does not exist.",
"File '/foo.js.ios.d.ts' does not exist.",
"File name '/foo.js' has a '.js' extension - stripping it.",
"File '/foo.ios.ts' does not exist.",
"File '/foo.ios.tsx' does not exist.",
"File '/foo.ios.d.ts' does not exist.",
"Directory '/foo.js' does not exist, skipping all lookups in it.",
"Loading module as file / folder, candidate module location '/foo.js', target file types: JavaScript.",
"File name '/foo.js' has a '.js' extension - stripping it.",
Expand Down
4 changes: 0 additions & 4 deletions tests/baselines/reference/packageJsonMain.trace.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
"File '/node_modules/bar/rab.js.ts' does not exist.",
"File '/node_modules/bar/rab.js.tsx' does not exist.",
"File '/node_modules/bar/rab.js.d.ts' does not exist.",
"File name '/node_modules/bar/rab.js' has a '.js' extension - stripping it.",
"File '/node_modules/bar/rab.ts' does not exist.",
"File '/node_modules/bar/rab.tsx' does not exist.",
"File '/node_modules/bar/rab.d.ts' does not exist.",
"Directory '/node_modules/bar/rab.js' does not exist, skipping all lookups in it.",
"File '/node_modules/bar/index.ts' does not exist.",
"File '/node_modules/bar/index.tsx' does not exist.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extensi
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src 0 undefined Failed Lookup Locations
Expand Down Expand Up @@ -169,10 +165,6 @@ File '/user/username/projects/myproject/src/fileB.mjs.tsx' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.d.ts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.js' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.jsx' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations
Expand Down Expand Up @@ -276,10 +268,6 @@ File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extensi
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
File '/a/lib/package.json' does not exist according to earlier cached lookups.
Expand Down Expand Up @@ -390,10 +378,6 @@ File '/user/username/projects/myproject/src/fileB.mjs.tsx' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.d.ts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.js' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.jsx' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ File '/user/username/projects/myproject/src/fileB.mjs.tsx' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.d.ts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.js' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.jsx' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations
Expand Down Expand Up @@ -175,10 +171,6 @@ File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extensi
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
File '/a/lib/package.json' does not exist according to earlier cached lookups.
Expand Down Expand Up @@ -283,10 +275,6 @@ File '/user/username/projects/myproject/src/fileB.mjs.tsx' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.d.ts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.js' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.jsx' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations
Expand Down Expand Up @@ -482,10 +470,6 @@ File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extensi
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
File '/a/lib/package.json' does not exist according to earlier cached lookups.
Expand Down Expand Up @@ -597,10 +581,6 @@ File '/user/username/projects/myproject/src/fileB.mjs.tsx' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.d.ts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.js' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs.jsx' does not exist.
File name '/user/username/projects/myproject/src/fileB.mjs' has a '.mjs' extension - stripping it.
File '/user/username/projects/myproject/src/fileB.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.d.mts' does not exist.
File '/user/username/projects/myproject/src/fileB.mjs' does not exist.
Directory '/user/username/projects/myproject/src/fileB.mjs' does not exist, skipping all lookups in it.
======== Module name './fileB.mjs' was not resolved. ========
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/fileB.mjs 1 undefined Failed Lookup Locations
Expand Down

0 comments on commit d7944c6

Please sign in to comment.