@xylabs/ts-scripts-yarn3 6.4.5 → 6.4.6
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/actions/deplint.mjs +2 -1
- package/dist/actions/deplint.mjs.map +1 -1
- package/dist/actions/index.mjs +2 -1
- package/dist/actions/index.mjs.map +1 -1
- package/dist/bin/xy.mjs +2 -1
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +2 -1
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +2 -1
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +2 -1
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +2 -2
package/dist/xy/xy.mjs
CHANGED
|
@@ -691,13 +691,14 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
|
|
|
691
691
|
);
|
|
692
692
|
const imports = [];
|
|
693
693
|
const typeImports = [];
|
|
694
|
+
const isDeclarationFile = filePath.endsWith(".d.ts");
|
|
694
695
|
function visit(node) {
|
|
695
696
|
if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
|
|
696
697
|
const moduleSpecifier = node.moduleSpecifier?.getFullText();
|
|
697
698
|
const isTypeImport = ts.isImportDeclaration(node) ? node.importClause?.isTypeOnly ?? false : false;
|
|
698
699
|
if (moduleSpecifier) {
|
|
699
700
|
const trimmed = moduleSpecifier.split("'").at(1) ?? moduleSpecifier;
|
|
700
|
-
if (isTypeImport) {
|
|
701
|
+
if (isTypeImport && !isDeclarationFile) {
|
|
701
702
|
typeImports.push(trimmed);
|
|
702
703
|
} else {
|
|
703
704
|
imports.push(trimmed);
|