qat-cli 0.3.5 → 0.3.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/index.js CHANGED
@@ -2902,6 +2902,8 @@ ${this.compressSourceCode(req.context, 3e3, importPathRewrites)}
2902
2902
  if (srcDirMatch) {
2903
2903
  variations.add(`@/${srcDirMatch[1]}`);
2904
2904
  variations.add(`@/${srcDirMatch[1].replace(/\.(ts|js|tsx|jsx)$/, "")}`);
2905
+ variations.add(`#/${srcDirMatch[1]}`);
2906
+ variations.add(`#/${srcDirMatch[1].replace(/\.(ts|js|tsx|jsx)$/, "")}`);
2905
2907
  }
2906
2908
  const pathParts = targetPath.replace(/^\.\//, "").split("/");
2907
2909
  const fileName = pathParts[pathParts.length - 1];
@@ -4059,7 +4061,7 @@ function extractImports(content) {
4059
4061
  function analyzeImportSignatures(imports, baseDir) {
4060
4062
  const signatures = [];
4061
4063
  for (const imp of imports) {
4062
- if (!imp.source.startsWith(".") && !imp.source.startsWith("@/") && !imp.source.startsWith("~")) {
4064
+ if (!imp.source.startsWith(".") && !imp.source.startsWith("@/") && !imp.source.startsWith("#/") && !imp.source.startsWith("~")) {
4063
4065
  continue;
4064
4066
  }
4065
4067
  const resolvedPath = resolveImportPath2(imp.source, baseDir);
@@ -4101,8 +4103,8 @@ function analyzeImportSignatures(imports, baseDir) {
4101
4103
  }
4102
4104
  function resolveImportPath2(importSource, baseDir) {
4103
4105
  let resolved;
4104
- if (importSource.startsWith("@/") || importSource.startsWith("~")) {
4105
- const relativePath = importSource.replace(/^[@~]\//, "src/");
4106
+ if (importSource.startsWith("@/") || importSource.startsWith("#/") || importSource.startsWith("~")) {
4107
+ const relativePath = importSource.replace(/^[@#~]\//, "src/");
4106
4108
  resolved = path9.resolve(process.cwd(), relativePath);
4107
4109
  } else if (importSource.startsWith(".")) {
4108
4110
  resolved = path9.resolve(baseDir, importSource);