@ariestools/toolchain 9.0.3 → 9.0.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExtendsFromTsconfigs.d.ts","sourceRoot":"","sources":["../../../src/actions/deplint/getExtendsFromTsconfigs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getExtendsFromTsconfigs.d.ts","sourceRoot":"","sources":["../../../src/actions/deplint/getExtendsFromTsconfigs.ts"],"names":[],"mappings":"AAoFA;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CA0B1F;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAEvF;AAWD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAiBhE;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBlE;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAmBhE"}
|
package/dist/bin/xy.mjs
CHANGED
|
@@ -27228,6 +27228,14 @@ function parseTypesField(value) {
|
|
|
27228
27228
|
if (Array.isArray(value)) return value.filter((v) => typeof v === "string");
|
|
27229
27229
|
return [];
|
|
27230
27230
|
}
|
|
27231
|
+
function parseCompilerOptions(value, basePath, configFileName) {
|
|
27232
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return {};
|
|
27233
|
+
return ts.convertCompilerOptionsFromJson(value, basePath, configFileName).options;
|
|
27234
|
+
}
|
|
27235
|
+
function resolveTypeReferencePackage(ref, containingFile, compilerOptions) {
|
|
27236
|
+
const packageName = ts.resolveTypeReferenceDirective(ref, containingFile, compilerOptions, ts.sys).resolvedTypeReferenceDirective?.packageId?.name;
|
|
27237
|
+
return packageName === void 0 ? void 0 : getBasePackageName(packageName);
|
|
27238
|
+
}
|
|
27231
27239
|
function parsePathsField(value) {
|
|
27232
27240
|
if (typeof value !== "object" || value === null) return [];
|
|
27233
27241
|
return Object.keys(value);
|
|
@@ -27307,7 +27315,11 @@ function getTypesFromTsconfigs(location) {
|
|
|
27307
27315
|
for (const file of collectTsconfigFiles(location)) try {
|
|
27308
27316
|
const compilerOptions = parseTsconfig(file).compilerOptions;
|
|
27309
27317
|
const refs = parseTypesField(compilerOptions?.types);
|
|
27310
|
-
|
|
27318
|
+
const resolvedCompilerOptions = parseCompilerOptions(compilerOptions, PATH.dirname(file), file);
|
|
27319
|
+
for (const ref of refs) {
|
|
27320
|
+
const packageName = resolveTypeReferencePackage(ref, file, resolvedCompilerOptions);
|
|
27321
|
+
if (packageName !== void 0) packages.add(packageName);
|
|
27322
|
+
}
|
|
27311
27323
|
} catch {}
|
|
27312
27324
|
return [...packages];
|
|
27313
27325
|
}
|