mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Correctly resolve imports ending with "." and ".." (#47850)
This commit is contained in:
parent
73506f3512
commit
7f022c58fb
@ -417,7 +417,7 @@ namespace ts {
|
||||
result = searchResult && searchResult.value;
|
||||
}
|
||||
else {
|
||||
const { path: candidate } = normalizePathAndParts(combinePaths(initialLocationForSecondaryLookup, typeReferenceDirectiveName));
|
||||
const { path: candidate } = normalizePathForCJSResolution(initialLocationForSecondaryLookup, typeReferenceDirectiveName);
|
||||
result = nodeLoadModuleByRelativeName(Extensions.DtsOnly, candidate, /*onlyRecordFailures*/ false, moduleResolutionState, /*considerPackageJson*/ true);
|
||||
}
|
||||
return resolvedTypeScriptOnly(result);
|
||||
@ -1329,12 +1329,26 @@ namespace ts {
|
||||
return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
|
||||
}
|
||||
else {
|
||||
const { path: candidate, parts } = normalizePathAndParts(combinePaths(containingDirectory, moduleName));
|
||||
const { path: candidate, parts } = normalizePathForCJSResolution(containingDirectory, moduleName);
|
||||
const resolved = nodeLoadModuleByRelativeName(extensions, candidate, /*onlyRecordFailures*/ false, state, /*considerPackageJson*/ true);
|
||||
// Treat explicit "node_modules" import as an external library import.
|
||||
return resolved && toSearchResult({ resolved, isExternalLibraryImport: contains(parts, "node_modules") });
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If you import from "." inside a containing directory "/foo", the result of `normalizePath`
|
||||
// would be "/foo", but this loses the information that `foo` is a directory and we intended
|
||||
// to look inside of it. The Node CommonJS resolution algorithm doesn't call this out
|
||||
// (https://nodejs.org/api/modules.html#all-together), but it seems that module paths ending
|
||||
// in `.` are actually normalized to `./` before proceeding with the resolution algorithm.
|
||||
function normalizePathForCJSResolution(containingDirectory: string, moduleName: string) {
|
||||
const combined = combinePaths(containingDirectory, moduleName);
|
||||
const parts = getPathComponents(combined);
|
||||
const lastPart = lastOrUndefined(parts);
|
||||
const path = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
|
||||
return { path, parts };
|
||||
}
|
||||
|
||||
function realPath(path: string, host: ModuleResolutionHost, traceEnabled: boolean): string {
|
||||
|
||||
@ -585,18 +585,6 @@ namespace ts {
|
||||
return getCanonicalFileName(nonCanonicalizedPath) as Path;
|
||||
}
|
||||
|
||||
export function normalizePathAndParts(path: string): { path: string, parts: string[] } {
|
||||
path = normalizeSlashes(path);
|
||||
const [root, ...parts] = reducePathComponents(getPathComponents(path));
|
||||
if (parts.length) {
|
||||
const joinedParts = root + parts.join(directorySeparator);
|
||||
return { path: hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(joinedParts) : joinedParts, parts };
|
||||
}
|
||||
else {
|
||||
return { path: root, parts };
|
||||
}
|
||||
}
|
||||
|
||||
//// Path Mutation
|
||||
|
||||
/**
|
||||
|
||||
14
tests/baselines/reference/importFromDot.errors.txt
Normal file
14
tests/baselines/reference/importFromDot.errors.txt
Normal file
@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/moduleResolution/a/b.ts(1,20): error TS2305: Module '"."' has no exported member 'rootA'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/moduleResolution/a.ts (0 errors) ====
|
||||
export const rootA = 0;
|
||||
|
||||
==== tests/cases/conformance/moduleResolution/a/index.ts (0 errors) ====
|
||||
export const indexInA = 0;
|
||||
|
||||
==== tests/cases/conformance/moduleResolution/a/b.ts (1 errors) ====
|
||||
import { indexInA, rootA } from ".";
|
||||
~~~~~
|
||||
!!! error TS2305: Module '"."' has no exported member 'rootA'.
|
||||
|
||||
25
tests/baselines/reference/importFromDot.js
Normal file
25
tests/baselines/reference/importFromDot.js
Normal file
@ -0,0 +1,25 @@
|
||||
//// [tests/cases/conformance/moduleResolution/importFromDot.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export const rootA = 0;
|
||||
|
||||
//// [index.ts]
|
||||
export const indexInA = 0;
|
||||
|
||||
//// [b.ts]
|
||||
import { indexInA, rootA } from ".";
|
||||
|
||||
|
||||
//// [a.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.rootA = void 0;
|
||||
exports.rootA = 0;
|
||||
//// [index.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.indexInA = void 0;
|
||||
exports.indexInA = 0;
|
||||
//// [b.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
13
tests/baselines/reference/importFromDot.symbols
Normal file
13
tests/baselines/reference/importFromDot.symbols
Normal file
@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/moduleResolution/a.ts ===
|
||||
export const rootA = 0;
|
||||
>rootA : Symbol(rootA, Decl(a.ts, 0, 12))
|
||||
|
||||
=== tests/cases/conformance/moduleResolution/a/index.ts ===
|
||||
export const indexInA = 0;
|
||||
>indexInA : Symbol(indexInA, Decl(index.ts, 0, 12))
|
||||
|
||||
=== tests/cases/conformance/moduleResolution/a/b.ts ===
|
||||
import { indexInA, rootA } from ".";
|
||||
>indexInA : Symbol(indexInA, Decl(b.ts, 0, 8))
|
||||
>rootA : Symbol(rootA, Decl(b.ts, 0, 18))
|
||||
|
||||
15
tests/baselines/reference/importFromDot.types
Normal file
15
tests/baselines/reference/importFromDot.types
Normal file
@ -0,0 +1,15 @@
|
||||
=== tests/cases/conformance/moduleResolution/a.ts ===
|
||||
export const rootA = 0;
|
||||
>rootA : 0
|
||||
>0 : 0
|
||||
|
||||
=== tests/cases/conformance/moduleResolution/a/index.ts ===
|
||||
export const indexInA = 0;
|
||||
>indexInA : 0
|
||||
>0 : 0
|
||||
|
||||
=== tests/cases/conformance/moduleResolution/a/b.ts ===
|
||||
import { indexInA, rootA } from ".";
|
||||
>indexInA : 0
|
||||
>rootA : any
|
||||
|
||||
26
tests/baselines/reference/importWithTrailingSlash.errors.txt
Normal file
26
tests/baselines/reference/importWithTrailingSlash.errors.txt
Normal file
@ -0,0 +1,26 @@
|
||||
/a/b/test.ts(3,3): error TS2339: Property 'a' does not exist on type '{ aIndex: number; }'.
|
||||
/a/test.ts(3,3): error TS2339: Property 'a' does not exist on type '{ aIndex: number; }'.
|
||||
|
||||
|
||||
==== /a.ts (0 errors) ====
|
||||
export default { a: 0 };
|
||||
|
||||
==== /a/index.ts (0 errors) ====
|
||||
export default { aIndex: 0 };
|
||||
|
||||
==== /a/test.ts (1 errors) ====
|
||||
import a from ".";
|
||||
import aIndex from "./";
|
||||
a.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type '{ aIndex: number; }'.
|
||||
aIndex.aIndex;
|
||||
|
||||
==== /a/b/test.ts (1 errors) ====
|
||||
import a from "..";
|
||||
import aIndex from "../";
|
||||
a.a;
|
||||
~
|
||||
!!! error TS2339: Property 'a' does not exist on type '{ aIndex: number; }'.
|
||||
aIndex.aIndex;
|
||||
|
||||
@ -14,9 +14,7 @@ import aIndex from "./";
|
||||
>aIndex : Symbol(aIndex, Decl(test.ts, 1, 6))
|
||||
|
||||
a.a;
|
||||
>a.a : Symbol(a, Decl(a.ts, 0, 16))
|
||||
>a : Symbol(a, Decl(test.ts, 0, 6))
|
||||
>a : Symbol(a, Decl(a.ts, 0, 16))
|
||||
|
||||
aIndex.aIndex;
|
||||
>aIndex.aIndex : Symbol(aIndex, Decl(index.ts, 0, 16))
|
||||
@ -31,9 +29,7 @@ import aIndex from "../";
|
||||
>aIndex : Symbol(aIndex, Decl(test.ts, 1, 6))
|
||||
|
||||
a.a;
|
||||
>a.a : Symbol(a, Decl(a.ts, 0, 16))
|
||||
>a : Symbol(a, Decl(test.ts, 0, 6))
|
||||
>a : Symbol(a, Decl(a.ts, 0, 16))
|
||||
|
||||
aIndex.aIndex;
|
||||
>aIndex.aIndex : Symbol(aIndex, Decl(index.ts, 0, 16))
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
[
|
||||
"======== Resolving module '.' from '/a/test.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location '/a', target file type 'TypeScript'.",
|
||||
"File '/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name '.' was successfully resolved to '/a.ts'. ========",
|
||||
"======== Resolving module './' from '/a/test.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location '/a/', target file type 'TypeScript'.",
|
||||
"File '/a/package.json' does not exist.",
|
||||
"File '/a/index.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name '.' was successfully resolved to '/a/index.ts'. ========",
|
||||
"======== Resolving module './' from '/a/test.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location '/a/', target file type 'TypeScript'.",
|
||||
"File '/a/package.json' does not exist according to earlier cached lookups.",
|
||||
"File '/a/index.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name './' was successfully resolved to '/a/index.ts'. ========",
|
||||
"======== Resolving module '..' from '/a/b/test.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location '/a', target file type 'TypeScript'.",
|
||||
"File '/a.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name '..' was successfully resolved to '/a.ts'. ========",
|
||||
"Loading module as file / folder, candidate module location '/a/', target file type 'TypeScript'.",
|
||||
"File '/a/package.json' does not exist according to earlier cached lookups.",
|
||||
"File '/a/index.ts' exist - use it as a name resolution result.",
|
||||
"======== Module name '..' was successfully resolved to '/a/index.ts'. ========",
|
||||
"======== Resolving module '../' from '/a/b/test.ts'. ========",
|
||||
"Explicitly specified module resolution kind: 'NodeJs'.",
|
||||
"Loading module as file / folder, candidate module location '/a/', target file type 'TypeScript'.",
|
||||
|
||||
@ -12,15 +12,15 @@ export default { aIndex: 0 };
|
||||
|
||||
=== /a/test.ts ===
|
||||
import a from ".";
|
||||
>a : { a: number; }
|
||||
>a : { aIndex: number; }
|
||||
|
||||
import aIndex from "./";
|
||||
>aIndex : { aIndex: number; }
|
||||
|
||||
a.a;
|
||||
>a.a : number
|
||||
>a : { a: number; }
|
||||
>a : number
|
||||
>a.a : any
|
||||
>a : { aIndex: number; }
|
||||
>a : any
|
||||
|
||||
aIndex.aIndex;
|
||||
>aIndex.aIndex : number
|
||||
@ -29,15 +29,15 @@ aIndex.aIndex;
|
||||
|
||||
=== /a/b/test.ts ===
|
||||
import a from "..";
|
||||
>a : { a: number; }
|
||||
>a : { aIndex: number; }
|
||||
|
||||
import aIndex from "../";
|
||||
>aIndex : { aIndex: number; }
|
||||
|
||||
a.a;
|
||||
>a.a : number
|
||||
>a : { a: number; }
|
||||
>a : number
|
||||
>a.a : any
|
||||
>a : { aIndex: number; }
|
||||
>a : any
|
||||
|
||||
aIndex.aIndex;
|
||||
>aIndex.aIndex : number
|
||||
|
||||
@ -78,8 +78,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -78,8 +78,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -77,8 +77,6 @@ For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /us
|
||||
Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -77,8 +77,6 @@ For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /us
|
||||
Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -78,8 +78,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -78,8 +78,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/index.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -77,8 +77,6 @@ For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /us
|
||||
Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -77,8 +77,6 @@ For info: /user/username/projects/myproject/b/helper.ts :: Config file name: /us
|
||||
Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -81,8 +81,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/helper.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -79,8 +79,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/helper.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
@ -79,8 +79,6 @@ Creating configuration project /user/username/projects/myproject/b/tsconfig.json
|
||||
Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded
|
||||
FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b/helper.ts 500 undefined WatchType: Closed Script info
|
||||
Starting updateGraphWorker: Project: /user/username/projects/myproject/b/tsconfig.json
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b 0 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Failed Lookup Locations
|
||||
FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /user/username/projects/myproject/b/tsconfig.json WatchType: Missing file
|
||||
|
||||
10
tests/cases/conformance/moduleResolution/importFromDot.ts
Normal file
10
tests/cases/conformance/moduleResolution/importFromDot.ts
Normal file
@ -0,0 +1,10 @@
|
||||
// @module: commonjs
|
||||
|
||||
// @Filename: a.ts
|
||||
export const rootA = 0;
|
||||
|
||||
// @Filename: a/index.ts
|
||||
export const indexInA = 0;
|
||||
|
||||
// @Filename: a/b.ts
|
||||
import { indexInA, rootA } from ".";
|
||||
Loading…
x
Reference in New Issue
Block a user