Comparing version 5.0.0 to 5.1.0
import { Edge } from "./graph"; | ||
export declare function guessLocationOfTsconfig(): string | undefined; | ||
export declare function extractGraph(configFileName?: string): Promise<Edge[]>; | ||
export declare function extractGraphUncached(configFileName?: string): Promise<Edge[]>; |
@@ -53,3 +53,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.extractGraph = exports.guessLocationOfTsconfig = void 0; | ||
exports.extractGraphUncached = exports.extractGraph = exports.guessLocationOfTsconfig = void 0; | ||
var typescript_1 = __importDefault(require("typescript")); | ||
@@ -107,5 +107,25 @@ var fs_1 = __importDefault(require("fs")); | ||
} | ||
// TODO - distinguish between different import kinds (types, function etc.) | ||
var graphCache = new Map(); | ||
function extractGraph(configFileName) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var there, computedResult; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
there = graphCache.get(configFileName); | ||
if (!(there !== undefined)) return [3 /*break*/, 1]; | ||
return [2 /*return*/, there]; | ||
case 1: | ||
computedResult = extractGraphUncached(configFileName); | ||
graphCache.set(configFileName, computedResult); | ||
return [4 /*yield*/, computedResult]; | ||
case 2: return [2 /*return*/, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
} | ||
exports.extractGraph = extractGraph; | ||
// TODO - distinguish between different import kinds (types, function etc.) | ||
function extractGraphUncached(configFileName) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var configFile, config, parsedConfig, rootDir, globpattern, files, host, program, imports, _loop_1, _a, _b, sourceFile; | ||
@@ -186,3 +206,3 @@ var e_2, _c; | ||
} | ||
exports.extractGraph = extractGraph; | ||
exports.extractGraphUncached = extractGraphUncached; | ||
//# sourceMappingURL=extractGraph.js.map |
{ | ||
"name": "tsarch", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -23,3 +23,3 @@ # TSArch | ||
// imports and applies the jest extensions | ||
import "tsarch/jest" | ||
import "tsarch/dist/jest" | ||
@@ -66,3 +66,3 @@ // imports the files entrypoint | ||
```typescript | ||
import "tsarch/jest" | ||
import "tsarch/dist/jest" | ||
import {slicesOfProject} from "tsarch" | ||
@@ -69,0 +69,0 @@ import * as path from "path" |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
207535
3002
0