@erickxavier/no-js 1.8.2 → 1.9.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erickxavier/no-js",
3
- "version": "1.8.2",
3
+ "version": "1.9.1",
4
4
  "description": "The HTML-first reactive framework — build dynamic web apps with just HTML attributes, no JavaScript required",
5
5
  "main": "dist/cjs/no.js",
6
6
  "module": "dist/esm/no.js",
@@ -65,7 +65,6 @@
65
65
  "esbuild": "^0.27.3",
66
66
  "jest": "^30.2.0",
67
67
  "jest-environment-jsdom": "^30.2.0",
68
- "jsdom": "^28.1.0",
69
- "serve": "^14.2.5"
68
+ "jsdom": "^28.1.0"
70
69
  }
71
70
  }
@@ -146,6 +146,24 @@ registerDirective("foreach", {
146
146
  ? null // Will use external template
147
147
  : el.cloneNode(true); // Use the element itself as template
148
148
 
149
+ // Prevent infinite recursion: strip directive attributes from inline template clone
150
+ if (templateContent) {
151
+ templateContent.removeAttribute("foreach");
152
+ templateContent.removeAttribute("from");
153
+ templateContent.removeAttribute("index");
154
+ templateContent.removeAttribute("filter");
155
+ templateContent.removeAttribute("sort");
156
+ templateContent.removeAttribute("limit");
157
+ templateContent.removeAttribute("offset");
158
+ templateContent.removeAttribute("else");
159
+ templateContent.removeAttribute("template");
160
+ templateContent.removeAttribute("animate-enter");
161
+ templateContent.removeAttribute("animate");
162
+ templateContent.removeAttribute("animate-leave");
163
+ templateContent.removeAttribute("animate-stagger");
164
+ templateContent.removeAttribute("animate-duration");
165
+ }
166
+
149
167
  function update() {
150
168
  let list = resolve(fromPath, ctx);
151
169
  if (!Array.isArray(list)) return;