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