@file-services/typescript
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -40,3 +40,3 @@ "use strict"; | ||
} | ||
catch (_a) { | ||
catch { | ||
/* */ | ||
@@ -59,3 +59,3 @@ } | ||
} | ||
catch (_a) { | ||
catch { | ||
return undefined; | ||
@@ -68,3 +68,3 @@ } | ||
} | ||
catch (_a) { | ||
catch { | ||
return `${Date.now()}`; | ||
@@ -77,3 +77,10 @@ } | ||
getNewLine: defaultGetNewLine, | ||
realpath: realpathSync, | ||
realpath(path) { | ||
try { | ||
return realpathSync(path); | ||
} | ||
catch (e) { | ||
return path; | ||
} | ||
}, | ||
dirname, | ||
@@ -98,3 +105,5 @@ normalize, | ||
const { readFile, join, useCaseSensitiveFileNames, getNewLine } = baseHost; | ||
return Object.assign(Object.assign({}, baseHost), { getCompilationSettings, | ||
return { | ||
...baseHost, | ||
getCompilationSettings, | ||
getScriptFileNames, | ||
@@ -105,5 +114,9 @@ getCustomTransformers, | ||
return fileContents !== undefined ? typescript_1.default.ScriptSnapshot.fromString(fileContents) : undefined; | ||
}, getNewLine: () => typescript_1.default.getNewLineCharacter(getCompilationSettings(), getNewLine), getDefaultLibFileName: options => join(defaultLibsDirectory, typescript_1.default.getDefaultLibFileName(options)), useCaseSensitiveFileNames: () => useCaseSensitiveFileNames }); | ||
}, | ||
getNewLine: () => typescript_1.default.getNewLineCharacter(getCompilationSettings(), getNewLine), | ||
getDefaultLibFileName: options => join(defaultLibsDirectory, typescript_1.default.getDefaultLibFileName(options)), | ||
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames | ||
}; | ||
} | ||
exports.createLanguageServiceHost = createLanguageServiceHost; | ||
//# sourceMappingURL=create-host.js.map |
@@ -35,3 +35,3 @@ import ts from 'typescript'; | ||
} | ||
catch (_a) { | ||
catch { | ||
/* */ | ||
@@ -54,3 +54,3 @@ } | ||
} | ||
catch (_a) { | ||
catch { | ||
return undefined; | ||
@@ -63,3 +63,3 @@ } | ||
} | ||
catch (_a) { | ||
catch { | ||
return `${Date.now()}`; | ||
@@ -72,3 +72,10 @@ } | ||
getNewLine: defaultGetNewLine, | ||
realpath: realpathSync, | ||
realpath(path) { | ||
try { | ||
return realpathSync(path); | ||
} | ||
catch (e) { | ||
return path; | ||
} | ||
}, | ||
dirname, | ||
@@ -92,3 +99,5 @@ normalize, | ||
const { readFile, join, useCaseSensitiveFileNames, getNewLine } = baseHost; | ||
return Object.assign(Object.assign({}, baseHost), { getCompilationSettings, | ||
return { | ||
...baseHost, | ||
getCompilationSettings, | ||
getScriptFileNames, | ||
@@ -99,4 +108,8 @@ getCustomTransformers, | ||
return fileContents !== undefined ? ts.ScriptSnapshot.fromString(fileContents) : undefined; | ||
}, getNewLine: () => ts.getNewLineCharacter(getCompilationSettings(), getNewLine), getDefaultLibFileName: options => join(defaultLibsDirectory, ts.getDefaultLibFileName(options)), useCaseSensitiveFileNames: () => useCaseSensitiveFileNames }); | ||
}, | ||
getNewLine: () => ts.getNewLineCharacter(getCompilationSettings(), getNewLine), | ||
getDefaultLibFileName: options => join(defaultLibsDirectory, ts.getDefaultLibFileName(options)), | ||
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames | ||
}; | ||
} | ||
//# sourceMappingURL=create-host.js.map |
{ | ||
"name": "@file-services/typescript", | ||
"description": "Helpers for creation of TypeScript hosts", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"main": "cjs/index.js", | ||
@@ -31,3 +31,3 @@ "module": "esm/index.js", | ||
"sideEffects": false, | ||
"gitHead": "d0f4daec4165377749c39bb159c24b6e0808fae4" | ||
"gitHead": "88e0da544cc1bca4ed60020ee7d4a46119dd0042" | ||
} |
@@ -111,3 +111,9 @@ import ts from 'typescript'; | ||
getNewLine: defaultGetNewLine, | ||
realpath: realpathSync, | ||
realpath(path: string) { | ||
try { | ||
return realpathSync(path); | ||
} catch (e) { | ||
return path; | ||
} | ||
}, | ||
dirname, | ||
@@ -114,0 +120,0 @@ normalize, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32991
480