@absolutejs/absolute 0.19.0-beta.1049 → 0.19.0-beta.1050

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
@@ -31617,6 +31617,109 @@ var init_buildEmberVendor = __esm(() => {
31617
31617
  ]);
31618
31618
  });
31619
31619
 
31620
+ // src/utils/stripStringsAndComments.ts
31621
+ var stripStringsAndComments = (source) => {
31622
+ const { length } = source;
31623
+ const stack = [];
31624
+ let result = "";
31625
+ let index = 0;
31626
+ const top = () => stack[stack.length - 1];
31627
+ const skipLineComment = () => {
31628
+ index += 2;
31629
+ while (index < length && source.charAt(index) !== `
31630
+ `)
31631
+ index += 1;
31632
+ };
31633
+ const skipBlockComment = () => {
31634
+ index += 2;
31635
+ while (index < length && !(source.charAt(index) === "*" && source.charAt(index + 1) === "/"))
31636
+ index += 1;
31637
+ index += 2;
31638
+ };
31639
+ const skipQuoted = (quote) => {
31640
+ index += 1;
31641
+ while (index < length && source.charAt(index) !== quote)
31642
+ index += source.charAt(index) === "\\" ? 2 : 1;
31643
+ index += 1;
31644
+ };
31645
+ const startCommentOrString = () => {
31646
+ const char = source.charAt(index);
31647
+ const next = source.charAt(index + 1);
31648
+ const isLine = char === "/" && next === "/";
31649
+ const isBlock = char === "/" && next === "*";
31650
+ const isQuote = char === "'" || char === '"';
31651
+ if (isLine)
31652
+ skipLineComment();
31653
+ else if (isBlock)
31654
+ skipBlockComment();
31655
+ else if (isQuote)
31656
+ skipQuoted(char);
31657
+ return isLine || isBlock || isQuote;
31658
+ };
31659
+ const pushTemplate = () => {
31660
+ stack.push(0);
31661
+ index += 1;
31662
+ };
31663
+ const openBrace = () => {
31664
+ stack.push((stack.pop() ?? 0) + 1);
31665
+ index += 1;
31666
+ };
31667
+ const closeBrace = () => {
31668
+ const depth = (stack.pop() ?? 0) - 1;
31669
+ index += 1;
31670
+ if (depth > 0)
31671
+ stack.push(depth);
31672
+ };
31673
+ const handleTopLevel = () => {
31674
+ if (startCommentOrString())
31675
+ return;
31676
+ if (source.charAt(index) === "`")
31677
+ pushTemplate();
31678
+ else {
31679
+ result += source.charAt(index);
31680
+ index += 1;
31681
+ }
31682
+ };
31683
+ const handleTemplateText = () => {
31684
+ const char = source.charAt(index);
31685
+ if (char === "\\")
31686
+ index += 2;
31687
+ else if (char === "`") {
31688
+ stack.pop();
31689
+ index += 1;
31690
+ } else if (char === "$" && source.charAt(index + 1) === "{") {
31691
+ stack.push(1);
31692
+ index += 2;
31693
+ } else
31694
+ index += 1;
31695
+ };
31696
+ const handleInterp = () => {
31697
+ if (startCommentOrString())
31698
+ return;
31699
+ const char = source.charAt(index);
31700
+ if (char === "`")
31701
+ pushTemplate();
31702
+ else if (char === "{")
31703
+ openBrace();
31704
+ else if (char === "}")
31705
+ closeBrace();
31706
+ else
31707
+ index += 1;
31708
+ };
31709
+ const step = () => {
31710
+ const frame = top();
31711
+ if (frame === undefined)
31712
+ handleTopLevel();
31713
+ else if (frame === 0)
31714
+ handleTemplateText();
31715
+ else
31716
+ handleInterp();
31717
+ };
31718
+ while (index < length)
31719
+ step();
31720
+ return result;
31721
+ };
31722
+
31620
31723
  // src/dev/dependencyGraph.ts
31621
31724
  var exports_dependencyGraph = {};
31622
31725
  __export(exports_dependencyGraph, {
@@ -31767,7 +31870,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
31767
31870
  if (resolved)
31768
31871
  dependencies.push(resolved);
31769
31872
  }
31770
- if (content.includes("@Component")) {
31873
+ if (content.includes("@Component") && stripStringsAndComments(content).includes("@Component")) {
31771
31874
  extractAngularDependencies(content, filePath, dependencies);
31772
31875
  }
31773
31876
  return dependencies;
@@ -46423,5 +46526,5 @@ export {
46423
46526
  ANGULAR_INIT_TIMEOUT_MS
46424
46527
  };
46425
46528
 
46426
- //# debugId=81209F161728A1AE64756E2164756E21
46529
+ //# debugId=E401AF0DF6126F1C64756E2164756E21
46427
46530
  //# sourceMappingURL=index.js.map