From f6886f172d4240530cf30225f79f2268471c2122 Mon Sep 17 00:00:00 2001 From: Juergen Kunz Date: Mon, 17 Nov 2025 01:49:35 +0000 Subject: [PATCH] fix(templates/multienv): Disable useDefineForClassFields in multienv TypeScript configs to ensure decorator compatibility --- assets/templates/multienv/bunfig.toml | 1 + assets/templates/multienv/deno.json | 1 + changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/templates/multienv/bunfig.toml b/assets/templates/multienv/bunfig.toml index 5669a07..979a5e6 100644 --- a/assets/templates/multienv/bunfig.toml +++ b/assets/templates/multienv/bunfig.toml @@ -10,4 +10,5 @@ preload = [] # Enable decorators for Bun's TypeScript transpiler # This ensures user code with decorators works when executed via Bun [transpiler] +useDefineForClassFields = false, experimentalDecorators = true diff --git a/assets/templates/multienv/deno.json b/assets/templates/multienv/deno.json index ed9baad..86be822 100644 --- a/assets/templates/multienv/deno.json +++ b/assets/templates/multienv/deno.json @@ -1,6 +1,7 @@ { "compilerOptions": { "experimentalDecorators": true, + "useDefineForClassFields": false, "lib": ["ES2022", "DOM"], "target": "ES2022", "checkJs": true diff --git a/changelog.md b/changelog.md index 3e54462..80bb900 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-11-17 - 1.21.2 - fix(templates/multienv) +Disable useDefineForClassFields in multienv TypeScript configs to ensure decorator compatibility + +- Set useDefineForClassFields = false in assets/templates/multienv/bunfig.toml to keep Bun's transpiler compatible with decorator usage +- Set "useDefineForClassFields": false in assets/templates/multienv/deno.json to ensure Deno/TypeScript compiler emits class fields compatible with decorators + ## 2025-11-17 - 1.21.1 - fix(templates.multienv) Enable checkJs in multienv Deno template to enable JS type checking diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index d248250..9d3b2bc 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/cli', - version: '1.21.1', + version: '1.21.2', description: 'A comprehensive CLI tool for enhancing and managing local development workflows with gitzone utilities, focusing on project setup, version control, code formatting, and template management.' }