@titan-design/code-graph 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1050,6 +1050,13 @@ function remapDistToSrc(abs) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
return abs;
|
|
1052
1052
|
}
|
|
1053
|
+
function repoTypeRoots(repoRoot) {
|
|
1054
|
+
const roots = [];
|
|
1055
|
+
for (let dir = path3.resolve(repoRoot); ; dir = path3.dirname(dir)) {
|
|
1056
|
+
roots.push(path3.join(dir, "node_modules", "@types"));
|
|
1057
|
+
if (path3.dirname(dir) === dir) return roots;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1053
1060
|
|
|
1054
1061
|
// src/extractors/reexport-resolve.ts
|
|
1055
1062
|
function resolveReExportOrigin(ctx, importerAbs, specifier, name) {
|
|
@@ -1247,7 +1254,8 @@ var TsMorphGraphExtractor = class {
|
|
|
1247
1254
|
allowJs: true,
|
|
1248
1255
|
target: ScriptTarget.ESNext,
|
|
1249
1256
|
module: ModuleKind.ESNext,
|
|
1250
|
-
moduleResolution: ModuleResolutionKind.NodeNext
|
|
1257
|
+
moduleResolution: ModuleResolutionKind.NodeNext,
|
|
1258
|
+
typeRoots: repoTypeRoots(this.repoRoot)
|
|
1251
1259
|
}
|
|
1252
1260
|
});
|
|
1253
1261
|
return this.project;
|