@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/index.mjs CHANGED
@@ -935,9 +935,10 @@ function getImportsFromFile(filePath, importPaths, typeImportPaths) {
935
935
  } else if (ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.ImportKeyword) {
936
936
  const [arg] = node.arguments;
937
937
  if (ts.isStringLiteral(arg)) {
938
- const trimmed = arg.text;
939
- imports.push(trimmed);
938
+ imports.push(arg.text);
940
939
  }
940
+ } else if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === "require" && node.arguments.length > 0 && ts.isStringLiteral(node.arguments[0])) {
941
+ imports.push(node.arguments[0].text);
941
942
  }
942
943
  ts.forEachChild(node, visit);
943
944
  }
@@ -1208,6 +1209,7 @@ function hasImportPlugin({ location, allDependencies }) {
1208
1209
  }
1209
1210
  return false;
1210
1211
  }
1212
+ var hasVitest = ({ allDependencies }) => allDependencies.includes("vitest");
1211
1213
  var rules = [
1212
1214
  {
1213
1215
  package: "typescript",
@@ -1220,6 +1222,10 @@ var rules = [
1220
1222
  {
1221
1223
  package: "tslib",
1222
1224
  isNeeded: hasDecorators
1225
+ },
1226
+ {
1227
+ package: "@vitest/coverage-v8",
1228
+ isNeeded: hasVitest
1223
1229
  }
1224
1230
  ];
1225
1231
  function getImplicitDevDependencies(context) {