tkeron 4.0.0-beta.8 → 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 +292 -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 +137 -110
  75. package/src/processComTs.ts +174 -153
  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,251 @@
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
+
223
+ # v4.0.0-beta.9
224
+
225
+ ## Features
226
+
227
+ ### Component Substitution in `<head>`
228
+
229
+ - **New**: Both `.com.html` and `.com.ts` components can now be used inside the `<head>` section of HTML documents
230
+ - Components are now processed throughout the entire HTML document, not just in `<body>`
231
+ - This enables modular management of meta tags, link tags, and other head elements
232
+ - Example use cases:
233
+ - Reusable meta tag bundles (`<social-meta>`, `<seo-meta>`)
234
+ - Dynamic favicon and link configurations
235
+ - Shared script and style declarations
236
+
237
+ ## Maintenance
238
+
239
+ ### Dependency Updates
240
+
241
+ - Updated `@modelcontextprotocol/sdk` from `1.25.1` to `1.25.2`
242
+
1
243
  # v4.0.0-beta.8
2
244
 
3
245
  ## Bug Fixes
4
246
 
5
247
  ### Pre-rendering Import Resolution
248
+
6
249
  - **Fixed**: `.pre.ts` files now correctly resolve `@tkeron/html-parser` module
7
250
  - Previously, pre-rendering files executed from a temp directory couldn't find Tkeron's internal html-parser module
8
251
  - Now uses absolute path to `@tkeron/html-parser` from Tkeron's own `node_modules`
@@ -11,15 +254,18 @@
11
254
  ## Improvements
12
255
 
13
256
  ### Test Stability
257
+
14
258
  - Introduced `logger` wrapper module to replace direct `console` usage in source files
15
259
  - Tests now spy on `logger` instead of global `console`, eliminating race conditions in concurrent test execution
16
260
  - All 170 tests now pass consistently without intermittent failures
17
261
 
18
262
  ### Internal Refactoring
263
+
19
264
  - Migrated all `console.log/error/warn` calls to use centralized `logger` module
20
265
  - Affected modules: `build`, `develop`, `processPre`, `processCom`, `processComTs`, `buildDir`, `buildEntrypoints`, `init`, `initWrapper`, `banner`
21
266
 
22
267
  ## Maintenance
268
+
23
269
  - Version bump for pre-rendering fix and test infrastructure improvements
24
270
 
25
271
  # v4.0.0-beta.7
@@ -27,27 +273,32 @@
27
273
  ## Improvements
28
274
 
29
275
  ### Error Handling and Validation
276
+
30
277
  - Added comprehensive input validation to core functions (`buildEntrypoints`, `processPre`, `processCom`, `processComTs`, `buildDir`, `build`, `develop`, `initWrapper`) to prevent runtime errors from invalid parameters
31
278
  - Enhanced error messages in `build` and `develop` commands to include suggestion to use `tk init` when source directory doesn't exist
32
279
  - Improved `init` command to automatically clean output directories from the project template, ensuring only source files are copied
33
280
 
34
281
  ## Maintenance
282
+
35
283
  - Version bump for new validation features and error handling improvements
36
284
 
37
285
  # v4.0.0-beta.6
38
286
 
39
287
  ## Bug Fixes
288
+
40
289
  - **MCP Server**
41
290
  - Fixed `list_examples` to include `init_sample` (uses `websrc/` instead of `src/`)
42
291
  - Fixed `get_example` to handle both `src/` and `websrc/` directories
43
292
  - Added `init_sample` to example descriptions list
44
293
 
45
294
  ## Improvements
295
+
46
296
  - **Documentation**
47
297
  - Verified all documentation files are present and referenced correctly
48
298
  - All MCP server documentation available in `docs/mcp-server.md`
49
299
 
50
300
  ## Maintenance
301
+
51
302
  - Version bump for consistency and preparation for stable release
52
303
 
53
304
  # v4.0.0-beta.5
@@ -55,6 +306,7 @@
55
306
  ## New Features
56
307
 
57
308
  ### Component Iteration System
309
+
58
310
  - **Dynamic data processing in components**
59
311
  - Components can now iterate and generate multiple instances with TypeScript logic
60
312
  - Added new example: `with_component_iteration` demonstrating:
@@ -66,6 +318,7 @@
66
318
  - Enables complex data transformations before rendering
67
319
 
68
320
  ### Enhanced MCP Server Capabilities
321
+
69
322
  - **Example project management tools**
70
323
  - New `list_examples` tool: Lists all available Tkeron example projects
71
324
  - New `get_example` tool: Retrieves source code and structure of examples
@@ -73,7 +326,6 @@
73
326
  - New `tkeron_build` tool: Build Tkeron projects via MCP
74
327
  - New `tkeron_develop` tool: Start development server via MCP
75
328
  - AI assistants can now create, build, and run Tkeron projects directly
76
-
77
329
  - **Example projects now included in npm package**
78
330
  - Removed examples from `.npmignore`
79
331
  - All example projects ship with the package
@@ -83,12 +335,14 @@
83
335
  ## Improvements
84
336
 
85
337
  ### Build System
338
+
86
339
  - **Refactored component processing pipeline**
87
340
  - Better separation of concerns between HTML and TypeScript components
88
341
  - Improved error handling and reporting
89
342
  - Cleaner code structure with fewer side effects
90
343
 
91
- ### Development Server
344
+ ### Development Server
345
+
92
346
  - **Test suite cleanup**
93
347
  - Removed unnecessary `setupSigintHandler` test (implementation detail)
94
348
  - All 14 remaining tests verify real server behavior
@@ -96,6 +350,7 @@
96
350
  - Improved test reliability and maintainability
97
351
 
98
352
  ### Code Quality
353
+
99
354
  - **Better TypeScript processing**
100
355
  - Enhanced pre-rendering with cleaner temp directory handling
101
356
  - Improved component substitution logic
@@ -104,6 +359,7 @@
104
359
  # v4.0.0-beta.4
105
360
 
106
361
  ## New Features
362
+
107
363
  - **MCP Server Integration**
108
364
  - Added Model Context Protocol (MCP) server for AI agent integration
109
365
  - New `tkeron-mcp` binary command
@@ -112,11 +368,13 @@
112
368
  - Full setup documentation in `docs/mcp-server.md`
113
369
 
114
370
  ## Dependencies
371
+
115
372
  - Added `@modelcontextprotocol/sdk` ^1.25.1 for MCP server functionality
116
373
 
117
374
  # v4.0.0-beta.3
118
375
 
119
376
  ## New Features
377
+
120
378
  - **Force flag for init command**
121
379
  - Added `force=true` option to `tk init` command
122
380
  - Allows overwriting existing directories without prompts
@@ -126,6 +384,7 @@
126
384
  - Useful for resetting projects or automation scripts
127
385
 
128
386
  ## Improvements
387
+
129
388
  - **Enhanced directory handling in init**
130
389
  - Empty directories are now allowed without force flag
131
390
  - Only non-empty directories require `force=true` to overwrite
@@ -152,6 +411,7 @@
152
411
  - Added console logging for better debugging experience
153
412
 
154
413
  ## Template Updates
414
+
155
415
  - New cryptocurrency prices section in init_sample
156
416
  - Real-time price display with color-coded 24h changes (green ▲ / red ▼)
157
417
  - Responsive grid layout for asset cards
@@ -161,6 +421,7 @@
161
421
  # v4.0.0-beta.2
162
422
 
163
423
  ## Bug Fixes
424
+
164
425
  - **Fix default source directory inconsistency**
165
426
  - Changed default source directory from `src` to `websrc` for consistency
166
427
  - Renamed `init_sample/src` to `init_sample/websrc`
@@ -172,6 +433,7 @@
172
433
  # v4.0.0-beta.1
173
434
 
174
435
  ## Milestone: Beta Release 🎉
436
+
175
437
  - **Transition from alpha to beta**
176
438
  - All core features implemented and stable
177
439
  - 143 tests passing with comprehensive coverage
@@ -179,6 +441,7 @@
179
441
  - Ready for wider testing and feedback
180
442
 
181
443
  ## Core Features (Stable)
444
+
182
445
  - ✅ Project initialization with `tk init`
183
446
  - ✅ Build system with TypeScript bundling
184
447
  - ✅ Development server with hot reload
@@ -190,6 +453,7 @@
190
453
  # v4.0.0-alpha.10
191
454
 
192
455
  ## New Features
456
+
193
457
  - **Add `init` command for project initialization**
194
458
  - Create new tkeron projects with `tk init <projectName>` or `tk i`
195
459
  - Initialize in current directory with `tk init .`
@@ -202,6 +466,7 @@
202
466
  - Comprehensive test coverage with 16 passing tests
203
467
 
204
468
  ## Template Content
469
+
205
470
  - Hero section with gradient background
206
471
  - Interactive counter component
207
472
  - Multiple component examples (HTML and TypeScript)
@@ -210,12 +475,14 @@
210
475
  - Ready-to-use development setup
211
476
 
212
477
  ## Documentation
478
+
213
479
  - README updated to reflect `init` command availability
214
480
  - Comprehensive template showcasing all tkeron features
215
481
 
216
482
  # v4.0.0-alpha.9
217
483
 
218
484
  ## Breaking Changes
485
+
219
486
  - **Change default output directory from `webout` to `web`**
220
487
  - All build and develop commands now output to `web/` by default instead of `webout/`
221
488
  - Users can still specify a custom output directory using the `targetDir` parameter
@@ -225,6 +492,7 @@
225
492
  # v4.0.0-alpha.8
226
493
 
227
494
  ## New Features
495
+
228
496
  - Add `.com.ts` TypeScript component system for dynamic HTML generation
229
497
  - Components with full TypeScript logic at build time
230
498
  - Access to `com` variable representing the HTML element
@@ -236,6 +504,7 @@
236
504
  - Complete test coverage with 26 tests
237
505
 
238
506
  ## Implementation Details
507
+
239
508
  - Integrated `processComTs()` into build pipeline before `.com.html` processing
240
509
  - Uses `Bun.spawn()` to execute component TypeScript files
241
510
  - Temporary output files for communication between processes
@@ -243,12 +512,14 @@
243
512
  - Circular dependency detection
244
513
 
245
514
  ## Examples
515
+
246
516
  - Add `with_com_ts/` example demonstrating:
247
517
  - Attribute-based components (`user-card.com.ts`)
248
518
  - Array/iteration logic (`dynamic-list.com.ts`)
249
519
  - Dynamic data and calculations (`greeting-message.com.ts`)
250
520
 
251
521
  ## Documentation
522
+
252
523
  - Update README with `.com.ts` documentation and examples
253
524
  - Add comprehensive README for `with_com_ts` example
254
525
  - Document component priority: `.com.ts` > `.com.html`
@@ -256,6 +527,7 @@
256
527
  # v4.0.0-alpha.7
257
528
 
258
529
  ## New Features
530
+
259
531
  - Add `.com.html` component system for HTML reusability
260
532
  - Create reusable HTML components with `.com.html` files
261
533
  - Custom elements (with hyphens) automatically replaced with component content
@@ -265,12 +537,14 @@
265
537
  - Complete substitution: components replace the entire custom element (not just innerHTML)
266
538
 
267
539
  ## Implementation Details
540
+
268
541
  - Integrated `processCom()` into build pipeline after `.pre.ts` processing
269
542
  - Uses `@tkeron/html-parser` for DOM manipulation
270
543
  - Filters `.com.html` files from final output
271
544
  - Normalizes DOCTYPE in HTML output for consistency
272
545
 
273
546
  ## Testing
547
+
274
548
  - Add comprehensive test suite with 18 test cases in `processCom.test.ts`
275
549
  - Tests cover: basic substitution, nested components, circular dependencies, edge cases
276
550
  - Validates component resolution priority (local vs root)
@@ -279,12 +553,14 @@
279
553
  # v4.0.0-alpha.6
280
554
 
281
555
  ## Breaking Changes
556
+
282
557
  - Remove `tkeron_library/` from project - never used in alpha versions
283
558
  - The UI library will be available as a separate package `@tkeron/ui` in the future
284
559
  - Current focus: CLI build tool with pre-rendering capabilities
285
560
  - No impact on existing users as the library was not documented or used in examples
286
561
 
287
562
  ## Documentation
563
+
288
564
  - Clarify project concept: CLI tool for backend-driven frontend development
289
565
  - Update description to emphasize build-time HTML generation
290
566
  - Improve `.pre.ts` documentation with clearer backend vs frontend distinction
@@ -293,12 +569,14 @@
293
569
  # v4.0.0-alpha.5
294
570
 
295
571
  ## Bug Fixes
572
+
296
573
  - Fix incorrect import path for develop module (moved from root to src/)
297
574
  - Add shebang to index.ts for proper CLI execution
298
575
  - Fix develop.test.ts import path after module reorganization
299
576
  - Update package.json script from "start" to "tk"
300
577
 
301
578
  ## Improvements
579
+
302
580
  - Reorganize project structure: move develop.ts to src/ directory
303
581
  - Enhance hot reload with Server-Sent Events (SSE) implementation
304
582
  - Add automatic HTML injection for dev reload script
@@ -307,6 +585,7 @@
307
585
  # v4.0.0-alpha.4
308
586
 
309
587
  ## New Features
588
+
310
589
  - Add `develop` command for development server with hot reload
311
590
  - Live server with automatic rebuild on file changes
312
591
  - File system watcher using native `fs.watch`
@@ -315,6 +594,7 @@
315
594
  - Add `develop.ts` module with `TkeronDevOptions` interface
316
595
 
317
596
  ## Testing
597
+
318
598
  - Add integration tests for `develop` command
319
599
  - Add `develop.test.ts` with E2E tests
320
600
  - Implement polling-based assertions for more reliable tests
@@ -324,6 +604,7 @@
324
604
  # v4.0.0-alpha.3
325
605
 
326
606
  ## New Features
607
+
327
608
  - Add `.pre.ts` preprocessing system for HTML manipulation before build
328
609
  - Manipulate DOM with TypeScript before final build
329
610
  - Support for `querySelector`, `setAttribute`, and other DOM methods
@@ -333,12 +614,14 @@
333
614
  - Automatic cleanup of temporary directories after build
334
615
 
335
616
  ## Improvements
617
+
336
618
  - Use `crypto.randomUUID()` for unique temporary directory names
337
619
  - Use `fs.cp()` for efficient recursive directory copying
338
620
  - Use `Bun.spawn()` for isolated `.pre.ts` execution
339
621
  - Add `with_pre` example demonstrating preprocessing capabilities
340
622
 
341
623
  ## Testing
624
+
342
625
  - Add snapshot tests for build examples
343
626
  - Add `examples.test.ts` with snapshot validation
344
627
  - Change test syntax from `test` to `it` (BDD style)
@@ -347,6 +630,7 @@
347
630
  - Add snapshot for `with_pre` example
348
631
 
349
632
  ## Dependencies
633
+
350
634
  - Update `@tkeron/html-parser` with `setAttribute` and `outerHTML` synchronization fix
351
635
 
352
636
  # v4.0.0-alpha.2
@@ -361,6 +645,7 @@ Complete rewrite from v3. Migration from Node.js to Bun runtime.
361
645
  Only basic build functionality is available.
362
646
 
363
647
  ## Changes
648
+
364
649
  - Add `build` command with TypeScript bundling and minification
365
650
  - Migration to Bun runtime (replacing Node.js)
366
651
  - Add `@tkeron/tools` dependency
@@ -397,16 +682,15 @@ Only basic build functionality is available.
397
682
  # v3.4.0
398
683
 
399
684
  - update tkeron library
400
- - Add childs property
401
- - Add "addChilds" method
685
+ - Add childs property
686
+ - Add "addChilds" method
402
687
 
403
688
  # v3.3.0
404
689
 
405
690
  - update tkeron lilbrary
406
- - Add and remove classes
407
- - Refactor for quick "div" creation
408
- - Add a simple CSS reset
409
-
691
+ - Add and remove classes
692
+ - Refactor for quick "div" creation
693
+ - Add a simple CSS reset
410
694
 
411
695
  # v3.2.1
412
696