tkeron 4.0.0-beta.9 → 4.0.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 (81) hide show
  1. package/{readme.md → README.md} +36 -4
  2. package/bun.lock +23 -21
  3. package/changelog.md +274 -8
  4. package/docs/best-practices.md +127 -101
  5. package/docs/cli-reference.md +58 -38
  6. package/docs/components-html.md +30 -24
  7. package/docs/components-typescript.md +110 -79
  8. package/docs/getting-started.md +24 -18
  9. package/docs/mcp-server.md +19 -36
  10. package/docs/overview.md +16 -10
  11. package/docs/pre-rendering.md +163 -157
  12. package/docs/testing.md +331 -0
  13. package/examples/basic_build/src/index.ts +5 -5
  14. package/examples/with_assets/src/index.ts +5 -5
  15. package/examples/with_com_html_priority/src/admin/admin-panel.com.html +1 -1
  16. package/examples/with_com_html_priority/src/admin/dashboard.html +16 -16
  17. package/examples/with_com_html_priority/src/admin/nested-stat.com.html +1 -1
  18. package/examples/with_com_html_priority/src/admin/site-header.com.html +1 -1
  19. package/examples/with_com_html_priority/src/blog/comment-item.com.html +1 -1
  20. package/examples/with_com_html_priority/src/blog/comment-section.com.html +1 -1
  21. package/examples/with_com_html_priority/src/blog/post.html +22 -19
  22. package/examples/with_com_html_priority/src/index.html +15 -15
  23. package/examples/with_com_html_priority/src/info-box.com.html +1 -1
  24. package/examples/with_com_html_priority/src/site-header.com.html +1 -1
  25. package/examples/with_com_mixed_priority/src/dashboard/main.html +17 -17
  26. package/examples/with_com_mixed_priority/src/dashboard/stats-widget.com.ts +1 -1
  27. package/examples/with_com_mixed_priority/src/footer-info.com.html +3 -1
  28. package/examples/with_com_mixed_priority/src/index.html +16 -16
  29. package/examples/with_com_mixed_priority/src/page-header.com.html +8 -1
  30. package/examples/with_com_mixed_priority/src/settings/config.html +16 -16
  31. package/examples/with_com_mixed_priority/src/settings/priority-test.com.html +3 -1
  32. package/examples/with_com_mixed_priority/src/users/profiles/activity-feed.com.ts +7 -3
  33. package/examples/with_com_mixed_priority/src/users/profiles/page-header.com.html +8 -1
  34. package/examples/with_com_mixed_priority/src/users/profiles/profile-actions.com.html +45 -4
  35. package/examples/with_com_mixed_priority/src/users/profiles/user-profile.com.ts +1 -1
  36. package/examples/with_com_mixed_priority/src/users/profiles/view.html +17 -17
  37. package/examples/with_com_ts/src/index.html +15 -11
  38. package/examples/with_com_ts_priority/src/analytics/chart-widget.com.ts +7 -5
  39. package/examples/with_com_ts_priority/src/analytics/report.html +16 -16
  40. package/examples/with_com_ts_priority/src/analytics/user-stats.com.ts +1 -1
  41. package/examples/with_com_ts_priority/src/data-table.com.ts +7 -4
  42. package/examples/with_com_ts_priority/src/index.html +15 -15
  43. package/examples/with_com_ts_priority/src/sales/regional/data-table.com.ts +8 -5
  44. package/examples/with_com_ts_priority/src/sales/regional/overview.html +16 -16
  45. package/examples/with_com_ts_priority/src/sales/regional/sales-summary.com.ts +7 -4
  46. package/examples/with_com_ts_priority/src/user-stats.com.ts +1 -1
  47. package/examples/with_component_iteration/src/card-list.com.ts +40 -12
  48. package/examples/with_component_iteration/src/engagement-meter.com.ts +11 -6
  49. package/examples/with_component_iteration/src/index.html +108 -51
  50. package/examples/with_component_iteration/src/index.ts +1 -1
  51. package/examples/with_component_iteration/src/note-box.com.html +12 -2
  52. package/examples/with_component_iteration/src/status-badge.com.ts +14 -7
  53. package/examples/with_component_iteration/src/user-card.com.ts +10 -9
  54. package/examples/with_pre/src/contact.pre.ts +3 -3
  55. package/examples/with_pre/src/index.ts +5 -5
  56. package/examples/with_pre/src/section/index.pre.ts +2 -4
  57. package/index.ts +31 -40
  58. package/mcp-server.ts +168 -445
  59. package/package.json +19 -8
  60. package/src/banner.ts +5 -4
  61. package/src/build.ts +29 -29
  62. package/src/buildDir.ts +36 -18
  63. package/src/buildEntrypoints.ts +17 -6
  64. package/src/buildWrapper.ts +21 -0
  65. package/src/cleanupOrphanedTempDirs.ts +31 -0
  66. package/src/createTestLogger.ts +24 -0
  67. package/src/develop.ts +47 -46
  68. package/src/getBuildResult.ts +146 -0
  69. package/src/index.ts +7 -0
  70. package/src/init.ts +39 -42
  71. package/src/initWrapper.ts +39 -26
  72. package/src/logger.ts +4 -11
  73. package/src/loggerObj.ts +13 -0
  74. package/src/processCom.ts +136 -108
  75. package/src/processComTs.ts +173 -151
  76. package/src/processPre.ts +24 -27
  77. package/src/promptUser.ts +15 -0
  78. package/src/setupSigintHandler.ts +6 -0
  79. package/src/silentLogger.ts +8 -0
  80. package/tests/test-helpers.ts +30 -0
  81. package/funciones.md +0 -63
package/changelog.md CHANGED
@@ -1,8 +1,231 @@
1
+ # v4.0.0
2
+
3
+ ## Stable Release
4
+
5
+ - **Released**: First stable v4 release (out of beta)
6
+
7
+ ### CI/CD
8
+
9
+ - **Changed**: Migrated to npm Trusted Publisher (OIDC provenance)
10
+ - **Removed**: Manual NPM_TOKEN authentication
11
+ - **Added**: `permissions: id-token: write` for OIDC support
12
+ - **Changed**: `npm publish --provenance` replaces `npm publish --tag beta`
13
+
14
+ ### Dependencies
15
+
16
+ - **Updated**: `@tkeron/commands` 0.3.1 → 0.4.6
17
+ - **Updated**: `@tkeron/html-parser` 1.5.3 → 1.5.5
18
+ - **Updated**: `@tkeron/tools` 0.2.2 → 0.3.0
19
+
20
+ ### Package
21
+
22
+ - **Added**: `publishConfig.access: "public"`
23
+ - **Fixed**: Repository URL format (SSH → HTTPS with `type: "git"`)
24
+
25
+ ---
26
+
27
+ # v4.0.0-beta.18
28
+
29
+ ## Code Quality & Architecture
30
+
31
+ ### Bug Fixes
32
+
33
+ - **Fixed**: Removed `process.exit()` from library code (`build.ts`, `develop.ts`, `init.ts`) — errors now propagate via `throw`, letting wrappers handle exit
34
+ - **Fixed**: Moved `reloadClients` Set inside `develop()` to prevent shared state across multiple server instances
35
+ - **Fixed**: Removed `await` on synchronous `path.resolve()` calls in `build.ts` and `develop.ts`
36
+ - **Fixed**: `log.error()` called without arguments in `processPre.ts` — now passes empty string
37
+
38
+ ### Code Style
39
+
40
+ - **Changed**: Converted all `function` declarations to arrow functions (`initWrapper`, `processComponents`, `processComponentsTs`)
41
+ - **Removed**: Comments in source code (`processCom.ts`, `processComTs.ts`)
42
+ - **Removed**: Dead re-export of `setupSigintHandler` from `develop.ts`
43
+
44
+ ### Tests
45
+
46
+ - **Fixed**: TS2532 errors in `getBuildResult.test.ts` (proper handling of possibly undefined values)
47
+ - **Updated**: Tests adapted to new error propagation (no more `process.exit` mocking in library tests)
48
+ - **Removed**: Redundant/dead test cases for removed behavior
49
+
50
+ ---
51
+
52
+ # v4.0.0-beta.17
53
+
54
+ ## MCP Server Updates
55
+
56
+ ### API Migration
57
+
58
+ - **Changed**: Migrated MCP server to new SDK API (`McpServer`, `registerResource`, `registerTool`)
59
+ - **Removed**: Legacy API (`Server`, `setRequestHandler`)
60
+ - **Benefit**: Better compatibility with MCP SDK 1.26.0, cleaner code structure
61
+
62
+ ### Tools Simplification
63
+
64
+ - **Removed**: `tkeron_init`, `tkeron_build`, `tkeron_develop` tools
65
+ - **Rationale**: MCP server now focuses on documentation and examples only
66
+ - **Alternative**: AI agents should use terminal commands (`tk init`, `tk build`, `tk dev`) instead
67
+ - **Kept**: `list_examples` and `get_example` tools (read-only)
68
+ - **Annotations**: Added `readOnlyHint: true` to remaining tools
69
+
70
+ ### New Testing Documentation
71
+
72
+ - **New**: `tkeron://testing` resource with comprehensive testing guide
73
+ - **Location**: `docs/testing.md`
74
+ - **Coverage**:
75
+ - How to use `getBuildResult()` for testing tkeron projects
76
+ - Proper test structure with `beforeAll()` for concurrent safety
77
+ - Testing patterns: file existence, DOM elements, bounded content, transformations
78
+ - Complete examples with best practices
79
+ - Rules summary (8 key rules)
80
+ - **Purpose**: Help users write reliable tests for their tkeron projects
81
+
82
+ ### Documentation Updates
83
+
84
+ - **Updated**: `docs/mcp-server.md` to reflect new tools approach
85
+ - **Clarified**: AI agents can access examples but must use terminal for project operations
86
+ - **Updated**: MCP server tests to include new `testing` resource
87
+
88
+ ### Tests
89
+
90
+ - **New**: `examples/basic_build/basic_build.test.ts` - complete test suite demonstrating testing patterns
91
+ - **Purpose**: Reference implementation for testing tkeron projects
92
+
93
+ ## Dependency Updates
94
+
95
+ - **Updated**: `@modelcontextprotocol/sdk` from `^1.25.3` to `^1.26.0`
96
+
97
+ # v4.0.0-beta.16
98
+
99
+ ## Improvements
100
+
101
+ ### Component Naming Validation
102
+
103
+ - **New**: Build now validates that component names contain at least one hyphen (custom element requirement)
104
+ - **Error message**: Clear error with file path and rename suggestion when invalid names are detected
105
+ - **Example**: `greeting.com.html` → shows error suggesting `tk-greeting.com.html`
106
+ - **Applies to**: Both `.com.html` and `.com.ts` components
107
+ - **Documentation**: Updated TypeScript components docs to clarify naming rules
108
+
109
+ # v4.0.0-beta.15
110
+
111
+ ## Bug Fixes
112
+
113
+ ### Pre-rendering Module Resolution (Complete Fix)
114
+
115
+ - **Fixed**: Changed `@tkeron/html-parser` import from absolute path to package import in `.pre.ts` files
116
+ - **Root cause**: Previous version used `HTML_PARSER_PATH` pointing to `node_modules` inside tkeron installation, causing resolution failures
117
+ - **Solution**: Use direct package import `@tkeron/html-parser` which resolves correctly with `projectRoot` as cwd
118
+ - **Impact**: `.pre.ts` files now work correctly when tkeron is installed as a package from npm
119
+
120
+ # v4.0.0-beta.14
121
+
122
+ ## Bug Fixes
123
+
124
+ ### Pre-rendering Module Resolution
125
+
126
+ - **Fixed**: Module resolution in `.pre.ts` files now correctly resolves from project `node_modules` instead of temporary build directory
127
+ - **Impact**: `.pre.ts` files can now properly import `@tkeron/html-parser` and other dependencies when using tkeron installed as a package
128
+ - **Technical**: `processPre()` now receives `projectRoot` parameter and uses it as `cwd` when executing pre-render scripts
129
+ - **Backward compatible**: Falls back to temp directory if `projectRoot` is not provided
130
+
131
+ # v4.0.0-beta.13
132
+
133
+ ## New Features
134
+
135
+ ### Testing API - getBuildResult()
136
+
137
+ - **New**: `getBuildResult(sourcePath, options?)` function for testing tkeron projects programmatically
138
+ - **Export**: Tkeron now exports a public API from `import { getBuildResult } from "tkeron"`
139
+ - **Returns**: `Record<string, FileInfo>` with metadata for each output file:
140
+ - `dom` - Parsed DOM object (HTML files only) with full querySelector/getElementById support
141
+ - `getContentAsString()` - Lazy content getter (text files only)
142
+ - `fileName`, `filePath`, `path` - File path information
143
+ - `type` - MIME type (text/html, text/css, image/png, etc.)
144
+ - `size` - File size in bytes
145
+ - `fileHash` - SHA-256 hash of file content
146
+ - **Usage**: Enables easy testing of tkeron projects:
147
+ ```typescript
148
+ import { getBuildResult } from "tkeron";
149
+ const result = await getBuildResult("./websrc");
150
+ const dom = result["index.html"].dom;
151
+ expect(dom.getElementById("my_component")).toBeDefined();
152
+ ```
153
+ - **Cleanup**: Automatic temp directory cleanup (creates `.tktmp_buildresult-{uuid}` and removes after)
154
+ - **Logger**: Optional `{ logger: Logger }` option for debugging build process
155
+
156
+ ### Package Exports
157
+
158
+ - **New**: Added `main` and `exports` fields to package.json for programmatic usage
159
+ - **New**: Created `src/index.ts` with public API exports
160
+ - **Exported types**: `GetBuildResultOptions`, `FileInfo`, `BuildResult`, `Logger`
161
+
162
+ ---
163
+
164
+ # v4.0.0-beta.12
165
+
166
+ ## Improvements
167
+
168
+ ### Development Server - Clean URLs
169
+
170
+ - **New**: URLs without `.html` extension now serve the corresponding HTML file
171
+ - `/about` → serves `about.html`
172
+ - `/docs/api/v1/endpoints` → serves `docs/api/v1/endpoints.html`
173
+ - **New**: Trailing slash in subdirectories serves `index.html` (e.g., `/blog/` → `blog/index.html`)
174
+ - **New**: URL-encoded characters are properly decoded (e.g., `/my%20page` → `my page.html`)
175
+ - **Improved**: Paths with dots (file extensions) are not modified, maintaining expected behavior
176
+ - Query strings work correctly with clean URLs (e.g., `/products?sort=price`)
177
+
178
+ ---
179
+
180
+ # v4.0.0-beta.11
181
+
182
+ ## Bug Fixes
183
+
184
+ ### HTML Parser Fix
185
+
186
+ - **Fixed**: HTML parser now correctly handles HTML entities in all HTML contexts
187
+ - **Issue**: Entities like `&lt;` and `&gt;` were being decoded incorrectly, causing malformed HTML output and confusion between text content and HTML elements
188
+ - **Impact**: This affected component processing in examples and user projects where HTML entities were used
189
+ - **Resolution**: Updated HTML parsing logic to properly handle HTML entities without unintended decoding
190
+ - **Performance**: Test execution time improved from ~5 seconds to ~1.7 seconds due to more efficient HTML processing and optimized component execution using dynamic imports instead of process spawning
191
+ - **Technical Details**: The fix prevents incorrect decoding of HTML entities that could be mistaken for actual HTML elements during component processing, ensuring accurate DOM manipulation
192
+
193
+ # v4.0.0-beta.10
194
+
195
+ ## Improvements
196
+
197
+ ### Temp Directory Robustness
198
+
199
+ - **Renamed**: Temp directory prefix changed from `.tmp_tkeron-build-` to `.tktmp_build-` for better identification
200
+ - **New**: Automatic cleanup of orphaned temp directories from previous failed builds
201
+ - **Improved**: Build process now cleans up any leftover `.tktmp_build-*` directories before starting
202
+ - This ensures temp directories are always removed, even after crashes or interrupted builds
203
+
204
+ ### Logger Dependency Injection
205
+
206
+ - **Refactored**: Logger is now injectable via options parameter in all main functions
207
+ - All functions (`build`, `develop`, `init`, `processPre`, `processCom`, `processComTs`, `buildDir`, `buildEntrypoints`) now accept an optional `logger` parameter
208
+ - Functions default to `silentLogger` (no-op) when no logger is provided
209
+ - New `Logger` interface with `log`, `error`, `warn`, `info` methods
210
+ - New `createTestLogger()` helper for tests that need to verify log messages
211
+ - This enables parallel test execution without global mock conflicts
212
+
213
+ ### Testing
214
+
215
+ - Added comprehensive unit tests for temp directory cleanup
216
+ - Tests cover: successful builds, failed builds, orphaned directories, non-temp directories preservation
217
+ - Tests verify edge cases: empty directories, non-existent directories, files with temp prefix
218
+ - Migrated all test files to use injectable logger pattern instead of `spyOn(logger, ...)`
219
+ - All 183 tests now support parallel execution without interference
220
+
221
+ ---
222
+
1
223
  # v4.0.0-beta.9
2
224
 
3
225
  ## Features
4
226
 
5
227
  ### Component Substitution in `<head>`
228
+
6
229
  - **New**: Both `.com.html` and `.com.ts` components can now be used inside the `<head>` section of HTML documents
7
230
  - Components are now processed throughout the entire HTML document, not just in `<body>`
8
231
  - This enables modular management of meta tags, link tags, and other head elements
@@ -14,6 +237,7 @@
14
237
  ## Maintenance
15
238
 
16
239
  ### Dependency Updates
240
+
17
241
  - Updated `@modelcontextprotocol/sdk` from `1.25.1` to `1.25.2`
18
242
 
19
243
  # v4.0.0-beta.8
@@ -21,6 +245,7 @@
21
245
  ## Bug Fixes
22
246
 
23
247
  ### Pre-rendering Import Resolution
248
+
24
249
  - **Fixed**: `.pre.ts` files now correctly resolve `@tkeron/html-parser` module
25
250
  - Previously, pre-rendering files executed from a temp directory couldn't find Tkeron's internal html-parser module
26
251
  - Now uses absolute path to `@tkeron/html-parser` from Tkeron's own `node_modules`
@@ -29,15 +254,18 @@
29
254
  ## Improvements
30
255
 
31
256
  ### Test Stability
257
+
32
258
  - Introduced `logger` wrapper module to replace direct `console` usage in source files
33
259
  - Tests now spy on `logger` instead of global `console`, eliminating race conditions in concurrent test execution
34
260
  - All 170 tests now pass consistently without intermittent failures
35
261
 
36
262
  ### Internal Refactoring
263
+
37
264
  - Migrated all `console.log/error/warn` calls to use centralized `logger` module
38
265
  - Affected modules: `build`, `develop`, `processPre`, `processCom`, `processComTs`, `buildDir`, `buildEntrypoints`, `init`, `initWrapper`, `banner`
39
266
 
40
267
  ## Maintenance
268
+
41
269
  - Version bump for pre-rendering fix and test infrastructure improvements
42
270
 
43
271
  # v4.0.0-beta.7
@@ -45,27 +273,32 @@
45
273
  ## Improvements
46
274
 
47
275
  ### Error Handling and Validation
276
+
48
277
  - Added comprehensive input validation to core functions (`buildEntrypoints`, `processPre`, `processCom`, `processComTs`, `buildDir`, `build`, `develop`, `initWrapper`) to prevent runtime errors from invalid parameters
49
278
  - Enhanced error messages in `build` and `develop` commands to include suggestion to use `tk init` when source directory doesn't exist
50
279
  - Improved `init` command to automatically clean output directories from the project template, ensuring only source files are copied
51
280
 
52
281
  ## Maintenance
282
+
53
283
  - Version bump for new validation features and error handling improvements
54
284
 
55
285
  # v4.0.0-beta.6
56
286
 
57
287
  ## Bug Fixes
288
+
58
289
  - **MCP Server**
59
290
  - Fixed `list_examples` to include `init_sample` (uses `websrc/` instead of `src/`)
60
291
  - Fixed `get_example` to handle both `src/` and `websrc/` directories
61
292
  - Added `init_sample` to example descriptions list
62
293
 
63
294
  ## Improvements
295
+
64
296
  - **Documentation**
65
297
  - Verified all documentation files are present and referenced correctly
66
298
  - All MCP server documentation available in `docs/mcp-server.md`
67
299
 
68
300
  ## Maintenance
301
+
69
302
  - Version bump for consistency and preparation for stable release
70
303
 
71
304
  # v4.0.0-beta.5
@@ -73,6 +306,7 @@
73
306
  ## New Features
74
307
 
75
308
  ### Component Iteration System
309
+
76
310
  - **Dynamic data processing in components**
77
311
  - Components can now iterate and generate multiple instances with TypeScript logic
78
312
  - Added new example: `with_component_iteration` demonstrating:
@@ -84,6 +318,7 @@
84
318
  - Enables complex data transformations before rendering
85
319
 
86
320
  ### Enhanced MCP Server Capabilities
321
+
87
322
  - **Example project management tools**
88
323
  - New `list_examples` tool: Lists all available Tkeron example projects
89
324
  - New `get_example` tool: Retrieves source code and structure of examples
@@ -91,7 +326,6 @@
91
326
  - New `tkeron_build` tool: Build Tkeron projects via MCP
92
327
  - New `tkeron_develop` tool: Start development server via MCP
93
328
  - AI assistants can now create, build, and run Tkeron projects directly
94
-
95
329
  - **Example projects now included in npm package**
96
330
  - Removed examples from `.npmignore`
97
331
  - All example projects ship with the package
@@ -101,12 +335,14 @@
101
335
  ## Improvements
102
336
 
103
337
  ### Build System
338
+
104
339
  - **Refactored component processing pipeline**
105
340
  - Better separation of concerns between HTML and TypeScript components
106
341
  - Improved error handling and reporting
107
342
  - Cleaner code structure with fewer side effects
108
343
 
109
- ### Development Server
344
+ ### Development Server
345
+
110
346
  - **Test suite cleanup**
111
347
  - Removed unnecessary `setupSigintHandler` test (implementation detail)
112
348
  - All 14 remaining tests verify real server behavior
@@ -114,6 +350,7 @@
114
350
  - Improved test reliability and maintainability
115
351
 
116
352
  ### Code Quality
353
+
117
354
  - **Better TypeScript processing**
118
355
  - Enhanced pre-rendering with cleaner temp directory handling
119
356
  - Improved component substitution logic
@@ -122,6 +359,7 @@
122
359
  # v4.0.0-beta.4
123
360
 
124
361
  ## New Features
362
+
125
363
  - **MCP Server Integration**
126
364
  - Added Model Context Protocol (MCP) server for AI agent integration
127
365
  - New `tkeron-mcp` binary command
@@ -130,11 +368,13 @@
130
368
  - Full setup documentation in `docs/mcp-server.md`
131
369
 
132
370
  ## Dependencies
371
+
133
372
  - Added `@modelcontextprotocol/sdk` ^1.25.1 for MCP server functionality
134
373
 
135
374
  # v4.0.0-beta.3
136
375
 
137
376
  ## New Features
377
+
138
378
  - **Force flag for init command**
139
379
  - Added `force=true` option to `tk init` command
140
380
  - Allows overwriting existing directories without prompts
@@ -144,6 +384,7 @@
144
384
  - Useful for resetting projects or automation scripts
145
385
 
146
386
  ## Improvements
387
+
147
388
  - **Enhanced directory handling in init**
148
389
  - Empty directories are now allowed without force flag
149
390
  - Only non-empty directories require `force=true` to overwrite
@@ -170,6 +411,7 @@
170
411
  - Added console logging for better debugging experience
171
412
 
172
413
  ## Template Updates
414
+
173
415
  - New cryptocurrency prices section in init_sample
174
416
  - Real-time price display with color-coded 24h changes (green ▲ / red ▼)
175
417
  - Responsive grid layout for asset cards
@@ -179,6 +421,7 @@
179
421
  # v4.0.0-beta.2
180
422
 
181
423
  ## Bug Fixes
424
+
182
425
  - **Fix default source directory inconsistency**
183
426
  - Changed default source directory from `src` to `websrc` for consistency
184
427
  - Renamed `init_sample/src` to `init_sample/websrc`
@@ -190,6 +433,7 @@
190
433
  # v4.0.0-beta.1
191
434
 
192
435
  ## Milestone: Beta Release 🎉
436
+
193
437
  - **Transition from alpha to beta**
194
438
  - All core features implemented and stable
195
439
  - 143 tests passing with comprehensive coverage
@@ -197,6 +441,7 @@
197
441
  - Ready for wider testing and feedback
198
442
 
199
443
  ## Core Features (Stable)
444
+
200
445
  - ✅ Project initialization with `tk init`
201
446
  - ✅ Build system with TypeScript bundling
202
447
  - ✅ Development server with hot reload
@@ -208,6 +453,7 @@
208
453
  # v4.0.0-alpha.10
209
454
 
210
455
  ## New Features
456
+
211
457
  - **Add `init` command for project initialization**
212
458
  - Create new tkeron projects with `tk init <projectName>` or `tk i`
213
459
  - Initialize in current directory with `tk init .`
@@ -220,6 +466,7 @@
220
466
  - Comprehensive test coverage with 16 passing tests
221
467
 
222
468
  ## Template Content
469
+
223
470
  - Hero section with gradient background
224
471
  - Interactive counter component
225
472
  - Multiple component examples (HTML and TypeScript)
@@ -228,12 +475,14 @@
228
475
  - Ready-to-use development setup
229
476
 
230
477
  ## Documentation
478
+
231
479
  - README updated to reflect `init` command availability
232
480
  - Comprehensive template showcasing all tkeron features
233
481
 
234
482
  # v4.0.0-alpha.9
235
483
 
236
484
  ## Breaking Changes
485
+
237
486
  - **Change default output directory from `webout` to `web`**
238
487
  - All build and develop commands now output to `web/` by default instead of `webout/`
239
488
  - Users can still specify a custom output directory using the `targetDir` parameter
@@ -243,6 +492,7 @@
243
492
  # v4.0.0-alpha.8
244
493
 
245
494
  ## New Features
495
+
246
496
  - Add `.com.ts` TypeScript component system for dynamic HTML generation
247
497
  - Components with full TypeScript logic at build time
248
498
  - Access to `com` variable representing the HTML element
@@ -254,6 +504,7 @@
254
504
  - Complete test coverage with 26 tests
255
505
 
256
506
  ## Implementation Details
507
+
257
508
  - Integrated `processComTs()` into build pipeline before `.com.html` processing
258
509
  - Uses `Bun.spawn()` to execute component TypeScript files
259
510
  - Temporary output files for communication between processes
@@ -261,12 +512,14 @@
261
512
  - Circular dependency detection
262
513
 
263
514
  ## Examples
515
+
264
516
  - Add `with_com_ts/` example demonstrating:
265
517
  - Attribute-based components (`user-card.com.ts`)
266
518
  - Array/iteration logic (`dynamic-list.com.ts`)
267
519
  - Dynamic data and calculations (`greeting-message.com.ts`)
268
520
 
269
521
  ## Documentation
522
+
270
523
  - Update README with `.com.ts` documentation and examples
271
524
  - Add comprehensive README for `with_com_ts` example
272
525
  - Document component priority: `.com.ts` > `.com.html`
@@ -274,6 +527,7 @@
274
527
  # v4.0.0-alpha.7
275
528
 
276
529
  ## New Features
530
+
277
531
  - Add `.com.html` component system for HTML reusability
278
532
  - Create reusable HTML components with `.com.html` files
279
533
  - Custom elements (with hyphens) automatically replaced with component content
@@ -283,12 +537,14 @@
283
537
  - Complete substitution: components replace the entire custom element (not just innerHTML)
284
538
 
285
539
  ## Implementation Details
540
+
286
541
  - Integrated `processCom()` into build pipeline after `.pre.ts` processing
287
542
  - Uses `@tkeron/html-parser` for DOM manipulation
288
543
  - Filters `.com.html` files from final output
289
544
  - Normalizes DOCTYPE in HTML output for consistency
290
545
 
291
546
  ## Testing
547
+
292
548
  - Add comprehensive test suite with 18 test cases in `processCom.test.ts`
293
549
  - Tests cover: basic substitution, nested components, circular dependencies, edge cases
294
550
  - Validates component resolution priority (local vs root)
@@ -297,12 +553,14 @@
297
553
  # v4.0.0-alpha.6
298
554
 
299
555
  ## Breaking Changes
556
+
300
557
  - Remove `tkeron_library/` from project - never used in alpha versions
301
558
  - The UI library will be available as a separate package `@tkeron/ui` in the future
302
559
  - Current focus: CLI build tool with pre-rendering capabilities
303
560
  - No impact on existing users as the library was not documented or used in examples
304
561
 
305
562
  ## Documentation
563
+
306
564
  - Clarify project concept: CLI tool for backend-driven frontend development
307
565
  - Update description to emphasize build-time HTML generation
308
566
  - Improve `.pre.ts` documentation with clearer backend vs frontend distinction
@@ -311,12 +569,14 @@
311
569
  # v4.0.0-alpha.5
312
570
 
313
571
  ## Bug Fixes
572
+
314
573
  - Fix incorrect import path for develop module (moved from root to src/)
315
574
  - Add shebang to index.ts for proper CLI execution
316
575
  - Fix develop.test.ts import path after module reorganization
317
576
  - Update package.json script from "start" to "tk"
318
577
 
319
578
  ## Improvements
579
+
320
580
  - Reorganize project structure: move develop.ts to src/ directory
321
581
  - Enhance hot reload with Server-Sent Events (SSE) implementation
322
582
  - Add automatic HTML injection for dev reload script
@@ -325,6 +585,7 @@
325
585
  # v4.0.0-alpha.4
326
586
 
327
587
  ## New Features
588
+
328
589
  - Add `develop` command for development server with hot reload
329
590
  - Live server with automatic rebuild on file changes
330
591
  - File system watcher using native `fs.watch`
@@ -333,6 +594,7 @@
333
594
  - Add `develop.ts` module with `TkeronDevOptions` interface
334
595
 
335
596
  ## Testing
597
+
336
598
  - Add integration tests for `develop` command
337
599
  - Add `develop.test.ts` with E2E tests
338
600
  - Implement polling-based assertions for more reliable tests
@@ -342,6 +604,7 @@
342
604
  # v4.0.0-alpha.3
343
605
 
344
606
  ## New Features
607
+
345
608
  - Add `.pre.ts` preprocessing system for HTML manipulation before build
346
609
  - Manipulate DOM with TypeScript before final build
347
610
  - Support for `querySelector`, `setAttribute`, and other DOM methods
@@ -351,12 +614,14 @@
351
614
  - Automatic cleanup of temporary directories after build
352
615
 
353
616
  ## Improvements
617
+
354
618
  - Use `crypto.randomUUID()` for unique temporary directory names
355
619
  - Use `fs.cp()` for efficient recursive directory copying
356
620
  - Use `Bun.spawn()` for isolated `.pre.ts` execution
357
621
  - Add `with_pre` example demonstrating preprocessing capabilities
358
622
 
359
623
  ## Testing
624
+
360
625
  - Add snapshot tests for build examples
361
626
  - Add `examples.test.ts` with snapshot validation
362
627
  - Change test syntax from `test` to `it` (BDD style)
@@ -365,6 +630,7 @@
365
630
  - Add snapshot for `with_pre` example
366
631
 
367
632
  ## Dependencies
633
+
368
634
  - Update `@tkeron/html-parser` with `setAttribute` and `outerHTML` synchronization fix
369
635
 
370
636
  # v4.0.0-alpha.2
@@ -379,6 +645,7 @@ Complete rewrite from v3. Migration from Node.js to Bun runtime.
379
645
  Only basic build functionality is available.
380
646
 
381
647
  ## Changes
648
+
382
649
  - Add `build` command with TypeScript bundling and minification
383
650
  - Migration to Bun runtime (replacing Node.js)
384
651
  - Add `@tkeron/tools` dependency
@@ -415,16 +682,15 @@ Only basic build functionality is available.
415
682
  # v3.4.0
416
683
 
417
684
  - update tkeron library
418
- - Add childs property
419
- - Add "addChilds" method
685
+ - Add childs property
686
+ - Add "addChilds" method
420
687
 
421
688
  # v3.3.0
422
689
 
423
690
  - update tkeron lilbrary
424
- - Add and remove classes
425
- - Refactor for quick "div" creation
426
- - Add a simple CSS reset
427
-
691
+ - Add and remove classes
692
+ - Refactor for quick "div" creation
693
+ - Add a simple CSS reset
428
694
 
429
695
  # v3.2.1
430
696