File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,19 @@ export class ConfigCache {
28
28
* Node.js equivalent of performance.now().
29
29
*/
30
30
private static _getTimeInMs ( ) : number {
31
- throw new Error ( 'oops' ) ;
32
31
const [ seconds , nanoseconds ] = process . hrtime ( ) ;
33
32
return seconds * 1000 + nanoseconds / 1000000 ;
34
33
}
35
34
36
35
public static getForSourceFile ( sourceFilePath : string ) : TSDocConfigFile {
36
+ const sourceFileFolder : string = path . dirname ( path . resolve ( sourceFilePath ) ) ;
37
+
37
38
// First, determine the file to be loaded. If not found, the configFilePath will be an empty string.
38
- const configFilePath : string = TSDocConfigFile . findConfigPathForFolder ( sourceFilePath ) ;
39
+ const configFilePath : string = TSDocConfigFile . findConfigPathForFolder ( sourceFileFolder ) ;
39
40
40
41
// If configFilePath is an empty string, then we'll use the folder of sourceFilePath as our cache key
41
42
// (instead of an empty string)
42
- const cacheKey : string = configFilePath || path . dirname ( sourceFilePath ) ;
43
+ const cacheKey : string = configFilePath || ( sourceFileFolder + '/' ) ;
43
44
Debug . log ( `Cache key: "${ cacheKey } "` ) ;
44
45
45
46
const nowMs : number = ConfigCache . _getTimeInMs ( ) ;
You can’t perform that action at this time.
0 commit comments