diff --git a/.publish/ai/package.json b/.publish/ai/package.json index 5300f89e..b6b362b9 100644 --- a/.publish/ai/package.json +++ b/.publish/ai/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ai", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "Zero-dependency Claude (Anthropic) client for WrNexus apps.", "license": "MIT", diff --git a/.publish/authz/package.json b/.publish/authz/package.json index fc149291..600c52c7 100644 --- a/.publish/authz/package.json +++ b/.publish/authz/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/authz", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/authz — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/cli/package.json b/.publish/cli/package.json index 7046bdf7..d2b4c28d 100644 --- a/.publish/cli/package.json +++ b/.publish/cli/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/cli", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/cli — part of the WrNexus framework.", "license": "MIT", @@ -28,16 +28,16 @@ "wrnexus": "./dist/index.js" }, "dependencies": { - "@wrnexus/core": "^0.2.37", - "@wrnexus/router": "^0.2.37", - "@wrnexus/csr": "^0.2.37", - "@wrnexus/compiler": "^0.2.37", - "@wrnexus/styles": "^0.2.37", - "@wrnexus/dev-server": "^0.2.37", - "@wrnexus/ui": "^0.2.37", - "@wrnexus/validation": "^0.2.37", - "@wrnexus/i18n": "^0.2.37", - "@wrnexus/db": "^0.2.37" + "@wrnexus/core": "^0.2.38", + "@wrnexus/router": "^0.2.38", + "@wrnexus/csr": "^0.2.38", + "@wrnexus/compiler": "^0.2.38", + "@wrnexus/styles": "^0.2.38", + "@wrnexus/dev-server": "^0.2.38", + "@wrnexus/ui": "^0.2.38", + "@wrnexus/validation": "^0.2.38", + "@wrnexus/i18n": "^0.2.38", + "@wrnexus/db": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/compiler/package.json b/.publish/compiler/package.json index 05719e81..629915c0 100644 --- a/.publish/compiler/package.json +++ b/.publish/compiler/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/compiler", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/compiler — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/core/package.json b/.publish/core/package.json index 824e6058..5bc29afa 100644 --- a/.publish/core/package.json +++ b/.publish/core/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/core", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/core — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/csr/package.json b/.publish/csr/package.json index 7c45b7dd..3ba21fee 100644 --- a/.publish/csr/package.json +++ b/.publish/csr/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/csr", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/csr — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.37" + "@wrnexus/core": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/db/package.json b/.publish/db/package.json index 1bab2093..0b9d0178 100644 --- a/.publish/db/package.json +++ b/.publish/db/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/db", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/db — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/dev-server/package.json b/.publish/dev-server/package.json index 3ef44ee7..08b3aa10 100644 --- a/.publish/dev-server/package.json +++ b/.publish/dev-server/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/dev-server", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/dev-server — part of the WrNexus framework.", "license": "MIT", @@ -25,18 +25,18 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.37", - "@wrnexus/router": "^0.2.37", - "@wrnexus/ssr": "^0.2.37", - "@wrnexus/csr": "^0.2.37", - "@wrnexus/compiler": "^0.2.37", - "@wrnexus/styles": "^0.2.37", - "@wrnexus/ui": "^0.2.37", - "@wrnexus/validation": "^0.2.37", - "@wrnexus/i18n": "^0.2.37", - "@wrnexus/db": "^0.2.37", - "@wrnexus/pubsub": "^0.2.37", - "@wrnexus/uploader": "^0.2.37" + "@wrnexus/core": "^0.2.38", + "@wrnexus/router": "^0.2.38", + "@wrnexus/ssr": "^0.2.38", + "@wrnexus/csr": "^0.2.38", + "@wrnexus/compiler": "^0.2.38", + "@wrnexus/styles": "^0.2.38", + "@wrnexus/ui": "^0.2.38", + "@wrnexus/validation": "^0.2.38", + "@wrnexus/i18n": "^0.2.38", + "@wrnexus/db": "^0.2.38", + "@wrnexus/pubsub": "^0.2.38", + "@wrnexus/uploader": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/encryption/package.json b/.publish/encryption/package.json index 376fc846..001c2109 100644 --- a/.publish/encryption/package.json +++ b/.publish/encryption/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/encryption", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/encryption — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/helpers/package.json b/.publish/helpers/package.json index 26c57a8b..a086644e 100644 --- a/.publish/helpers/package.json +++ b/.publish/helpers/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/helpers", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "Safe convenience helpers for WrNexus request contexts and common application flows.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.37" + "@wrnexus/core": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/i18n/package.json b/.publish/i18n/package.json index e723badb..cb061d17 100644 --- a/.publish/i18n/package.json +++ b/.publish/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/i18n", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/i18n — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.37" + "@wrnexus/core": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/jwt/package.json b/.publish/jwt/package.json index e649e195..bf9c56fd 100644 --- a/.publish/jwt/package.json +++ b/.publish/jwt/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/jwt", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/jwt — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/mobile/package.json b/.publish/mobile/package.json index a5fb6bda..4acd3e01 100644 --- a/.publish/mobile/package.json +++ b/.publish/mobile/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/mobile", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/mobile — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/native": "^0.2.37" + "@wrnexus/native": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/native/package.json b/.publish/native/package.json index 7e16e6e0..a75d6b3c 100644 --- a/.publish/native/package.json +++ b/.publish/native/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/native", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/native — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/oauth/package.json b/.publish/oauth/package.json index 4be3a23f..2c16181b 100644 --- a/.publish/oauth/package.json +++ b/.publish/oauth/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/oauth", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/oauth — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/pubsub/package.json b/.publish/pubsub/package.json index 15616940..3f3363fb 100644 --- a/.publish/pubsub/package.json +++ b/.publish/pubsub/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/pubsub", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/pubsub — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/queue/package.json b/.publish/queue/package.json index 120f2e9f..b651c81e 100644 --- a/.publish/queue/package.json +++ b/.publish/queue/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/queue", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/queue — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/reactive/package.json b/.publish/reactive/package.json index 8ce044a0..e18a6def 100644 --- a/.publish/reactive/package.json +++ b/.publish/reactive/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/reactive", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/reactive — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/router/package.json b/.publish/router/package.json index 20c02fd4..6fdd29a1 100644 --- a/.publish/router/package.json +++ b/.publish/router/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/router", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/router — part of the WrNexus framework.", "license": "MIT", @@ -21,8 +21,8 @@ } }, "dependencies": { - "@wrnexus/compiler": "^0.2.37", - "@wrnexus/core": "^0.2.37" + "@wrnexus/compiler": "^0.2.38", + "@wrnexus/core": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/ssr/package.json b/.publish/ssr/package.json index 0c9cf02e..40435fa2 100644 --- a/.publish/ssr/package.json +++ b/.publish/ssr/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ssr", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/ssr — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.37" + "@wrnexus/core": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/styles/package.json b/.publish/styles/package.json index 923aa85f..48098939 100644 --- a/.publish/styles/package.json +++ b/.publish/styles/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/styles", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/styles — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/uploader": "^0.2.37" + "@wrnexus/uploader": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/test/package.json b/.publish/test/package.json index 34f9a4b5..84b9bf73 100644 --- a/.publish/test/package.json +++ b/.publish/test/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/test", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/test — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/tracking/package.json b/.publish/tracking/package.json index 0f2f5a6d..37a1014f 100644 --- a/.publish/tracking/package.json +++ b/.publish/tracking/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/tracking", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/tracking — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/ui/package.json b/.publish/ui/package.json index aa89da4e..543259e7 100644 --- a/.publish/ui/package.json +++ b/.publish/ui/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ui", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/ui — part of the WrNexus framework.", "license": "MIT", @@ -22,7 +22,7 @@ "./ui.css": "./ui.css" }, "dependencies": { - "@wrnexus/core": "^0.2.37" + "@wrnexus/core": "^0.2.38" }, "files": [ "dist", diff --git a/.publish/uploader/package.json b/.publish/uploader/package.json index 502f325a..7ebd206b 100644 --- a/.publish/uploader/package.json +++ b/.publish/uploader/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/uploader", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/uploader — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.37" + "@wrnexus/core": "^0.2.38" }, "files": [ "dist" diff --git a/.publish/validation/package.json b/.publish/validation/package.json index 5d223b9c..8110c081 100644 --- a/.publish/validation/package.json +++ b/.publish/validation/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/validation", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "description": "@wrnexus/validation — part of the WrNexus framework.", "license": "MIT", diff --git a/packages/ai/package.json b/packages/ai/package.json index a15a8686..982d7d90 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ai", - "version": "0.2.37", + "version": "0.2.38", "private": true, "type": "module", "description": "Zero-dependency Claude (Anthropic) client for WrNexus apps.", diff --git a/packages/authz/package.json b/packages/authz/package.json index 14281436..67713143 100644 --- a/packages/authz/package.json +++ b/packages/authz/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/authz", - "version": "0.2.37", + "version": "0.2.38", "private": true, "type": "module", "main": "src/index.ts", diff --git a/packages/cli/package.json b/packages/cli/package.json index d4a82b8d..ecc9105d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/cli", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/cli/src/update.ts b/packages/cli/src/update.ts index c95a36bc..bb352c8d 100644 --- a/packages/cli/src/update.ts +++ b/packages/cli/src/update.ts @@ -411,6 +411,15 @@ const MIGRATIONS: Migration[] = [ // No generated application files require automatic migration. }, }, + { + version: "0.2.38", + id: "loop-condition-bug", + description: + "Adds server-rendered component each/if blocks and fixes dynamic component rendering.", + apply() { + // No generated application files require automatic migration. + }, + }, ]; /** Release tooling uses this to require an explicit migration entry per version. */ diff --git a/packages/compiler/package.json b/packages/compiler/package.json index 037a6bdb..b18a7d81 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/compiler", - "version": "0.2.37", + "version": "0.2.38", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/compiler/src/codegen.ts b/packages/compiler/src/codegen.ts index 92952599..9d536fc6 100644 --- a/packages/compiler/src/codegen.ts +++ b/packages/compiler/src/codegen.ts @@ -430,17 +430,16 @@ function renderPageComponentInvocation( loops: string[], reactive: PageReactive | null, ): string { - const attrs = node.attrs.filter((attr) => attr.name !== "data-component"); + const attrs = node.attrs + .filter((attr) => attr.name !== "data-component") + .map((attr) => renderPageComponentAttr(attr, loops)) + .join(""); const inner = node.children .map((child) => renderNode(child, ssrBindings, csrBindings, apiBindings, loops, reactive)) .join(""); - return `
{highlight.title}
+ {/each} + } +} +`), + ); + + expect(output).toContain("Array.isArray(def)"); + + expect(output).toContain("JSON.parse(v)"); + + expect(output).toContain("highlights"); +}); +test("page component props evaluate whole expressions", () => { + const output = generate( + parse(` +page Home { + view { +