@jay-framework/compiler-shared 0.18.3 → 0.19.0

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -1
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1648,7 +1648,16 @@ function doWalk(el, ctx, scope, visitor) {
1648
1648
  }
1649
1649
  const forEach = el.getAttribute?.("forEach");
1650
1650
  if (forEach) {
1651
- const arrayTag = resolveTagPath(forEach, currentScope.tags);
1651
+ let arrayTag = resolveTagPath(forEach, currentScope.tags);
1652
+ if (!arrayTag) {
1653
+ const segments = forEach.split(".");
1654
+ const headless = ctx.headlessImports.find(
1655
+ (h) => h.key === segments[0] && h.contract
1656
+ );
1657
+ if (headless?.contract && segments.length > 1) {
1658
+ arrayTag = resolveTagPath(segments.slice(1).join("."), headless.contract.tags);
1659
+ }
1660
+ }
1652
1661
  if (arrayTag?.tags) {
1653
1662
  currentScope = {
1654
1663
  tags: arrayTag.tags,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/compiler-shared",
3
- "version": "0.18.3",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "license": "Apache-2.0",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "author": "",
27
27
  "dependencies": {
28
- "@jay-framework/component": "^0.18.3",
29
- "@jay-framework/runtime": "^0.18.3",
30
- "@jay-framework/secure": "^0.18.3",
31
- "@jay-framework/typescript-bridge": "^0.18.3",
28
+ "@jay-framework/component": "^0.19.0",
29
+ "@jay-framework/runtime": "^0.19.0",
30
+ "@jay-framework/secure": "^0.19.0",
31
+ "@jay-framework/typescript-bridge": "^0.19.0",
32
32
  "@types/js-yaml": "^4.0.9",
33
33
  "change-case": "^4.1.2",
34
34
  "js-beautify": "^1.14.11",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@caiogondim/strip-margin": "^1.0.0",
44
- "@jay-framework/dev-environment": "^0.18.3",
44
+ "@jay-framework/dev-environment": "^0.19.0",
45
45
  "@testing-library/jest-dom": "^6.2.0",
46
46
  "@types/js-beautify": "^1",
47
47
  "@types/node": "^20.11.5",