@xylabs/ts-scripts-yarn3 6.4.4 → 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 +3 -2
- package/dist/actions/deplint.mjs.map +1 -1
- package/dist/actions/index.mjs +3 -2
- package/dist/actions/index.mjs.map +1 -1
- package/dist/bin/xy.mjs +3 -2
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +3 -2
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +3 -2
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +3 -2
- 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);
|
|
@@ -730,7 +731,7 @@ function findFilesByGlob(cwd, pattern) {
|
|
|
730
731
|
return globSync(pattern, { cwd, absolute: true });
|
|
731
732
|
}
|
|
732
733
|
function findFiles(path4) {
|
|
733
|
-
const allSourceInclude = ["./src/**/*.{ts,tsx}"];
|
|
734
|
+
const allSourceInclude = ["./src/**/*.{ts,tsx}", "./dist/**/*.d.ts"];
|
|
734
735
|
const prodExcludeEndswith = [".spec.ts", ".stories.tsx"];
|
|
735
736
|
const prodExcludeIncludes = ["/spec/", "/stories/", "/scripts/"];
|
|
736
737
|
const allSourceFiles = allSourceInclude.flatMap((pattern) => findFilesByGlob(path4, pattern));
|