@file-services/typescript
Advanced tools
Comparing version 3.1.1 to 4.0.0
@@ -26,3 +26,5 @@ "use strict"; | ||
const directories = []; | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
const dirEntries = readdirSync(path); | ||
@@ -45,6 +47,11 @@ for (const entryName of dirEntries) { | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
return { files, directories }; | ||
} | ||
function realpath(path) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return realpathSync(path); | ||
@@ -55,2 +62,5 @@ } | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
} | ||
@@ -67,3 +77,5 @@ return { | ||
readFile(filePath) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return readFileSync(filePath, 'utf8'); | ||
@@ -74,5 +86,10 @@ } | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
}, | ||
getScriptVersion(filePath) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return `${statSync(filePath).mtime.getTime()}`; | ||
@@ -83,2 +100,5 @@ } | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
}, | ||
@@ -85,0 +105,0 @@ useCaseSensitiveFileNames: caseSensitive, |
@@ -10,3 +10,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -20,3 +20,5 @@ import ts from 'typescript'; | ||
const directories = []; | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
const dirEntries = readdirSync(path); | ||
@@ -39,6 +41,11 @@ for (const entryName of dirEntries) { | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
return { files, directories }; | ||
} | ||
function realpath(path) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return realpathSync(path); | ||
@@ -49,2 +56,5 @@ } | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
} | ||
@@ -61,3 +71,5 @@ return { | ||
readFile(filePath) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return readFileSync(filePath, 'utf8'); | ||
@@ -68,5 +80,10 @@ } | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
}, | ||
getScriptVersion(filePath) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return `${statSync(filePath).mtime.getTime()}`; | ||
@@ -77,2 +94,5 @@ } | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
}, | ||
@@ -79,0 +99,0 @@ useCaseSensitiveFileNames: caseSensitive, |
{ | ||
"name": "@file-services/typescript", | ||
"description": "Helpers for creation of TypeScript hosts", | ||
"version": "3.1.1", | ||
"version": "4.0.0", | ||
"main": "cjs/index.js", | ||
@@ -10,4 +10,3 @@ "module": "esm/index.js", | ||
"clean": "rimraf ./cjs ./esm", | ||
"build": "ts-build ./src --cjs --esm", | ||
"prepack": "yarn build" | ||
"build": "ts-build ./src --cjs --esm" | ||
}, | ||
@@ -18,3 +17,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"@file-services/types": "^3.1.1" | ||
"@file-services/types": "^4.0.0" | ||
}, | ||
@@ -21,0 +20,0 @@ "files": [ |
@@ -54,3 +54,5 @@ import ts from 'typescript'; | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
const dirEntries = readdirSync(path); | ||
@@ -70,2 +72,4 @@ for (const entryName of dirEntries) { | ||
/* */ | ||
} finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
@@ -77,6 +81,10 @@ | ||
function realpath(path: string): string { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return realpathSync(path); | ||
} catch (e) { | ||
return path; | ||
} finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
@@ -105,13 +113,21 @@ } | ||
readFile(filePath) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return readFileSync(filePath, 'utf8'); | ||
} catch { | ||
return undefined; | ||
} finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
}, | ||
getScriptVersion(filePath) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return `${statSync(filePath).mtime.getTime()}`; | ||
} catch { | ||
return `${Date.now()}`; | ||
} finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
@@ -118,0 +134,0 @@ }, |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35809
547
+ Added@file-services/types@4.1.0(transitive)
- Removed@file-services/types@3.1.1(transitive)
Updated@file-services/types@^4.0.0