@xylabs/ts-scripts-yarn3 7.4.6 → 7.4.8

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/bin/xy.mjs CHANGED
@@ -843,9 +843,10 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
843
843
  } else if (ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.ImportKeyword) {
844
844
  const [arg] = node.arguments;
845
845
  if (ts.isStringLiteral(arg)) {
846
- const trimmed = arg.text;
847
- imports.push(trimmed);
846
+ imports.push(arg.text);
848
847
  }
848
+ } else if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "require" && node.arguments.length > 0 && ts.isStringLiteral(node.arguments[0])) {
849
+ imports.push(node.arguments[0].text);
849
850
  }
850
851
  ts.forEachChild(node, visit);
851
852
  }
@@ -1116,6 +1117,7 @@ function hasImportPlugin({ location, allDependencies }) {
1116
1117
  }
1117
1118
  return false;
1118
1119
  }
1120
+ var hasVitest = ({ allDependencies }) => allDependencies.includes("vitest");
1119
1121
  var rules = [
1120
1122
  {
1121
1123
  package: "typescript",
@@ -1128,6 +1130,10 @@ var rules = [
1128
1130
  {
1129
1131
  package: "tslib",
1130
1132
  isNeeded: hasDecorators
1133
+ },
1134
+ {
1135
+ package: "@vitest/coverage-v8",
1136
+ isNeeded: hasVitest
1131
1137
  }
1132
1138
  ];
1133
1139
  function getImplicitDevDependencies(context) {