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