tailwind-styled-v4 5.0.8 โ†’ 5.0.9

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.
package/CHANGELOG.md CHANGED
@@ -1,497 +1,271 @@
1
1
  # Changelog
2
2
 
3
- ## [4.5.0-alpha.1] - 2026-04-18
4
-
5
- ### ๐Ÿš€ Performance (Rust Native)
6
-
7
- - **10x faster** variant resolution via `resolve_variants` in Rust
8
- - **20-50x faster** class deduplication via `normalizeAndDedupClasses` in Rust
9
- - **30x faster** class parsing via `parseClasses` in Rust
10
-
11
- ### ๐Ÿ›ก๏ธ Reliability System
12
-
13
- - Health check monitoring for native bridge
14
- - Auto-fallback with exponential backoff
15
- - Telemetry with Prometheus/JSON/Console exporters
16
- - Clear error messages if native binary missing
17
-
18
- ### ๐Ÿงช Testing & Quality
19
-
20
- - Integration tests for all core functions
21
- - Unit tests for health check & telemetry
22
- - Benchmark suite for performance regression
23
-
24
- ### โš ๏ธ Breaking Changes
25
-
26
- - **JS fallbacks removed** - Native binary is now required
27
- - Run `npx tw setup` after installation
28
-
29
- ### ๐Ÿ“Š Benchmark Results
30
-
31
- | Operation | v4.4 (JS) | v4.5 (Rust) | Improvement |
32
- |-----------|-----------|-------------|-------------|
33
- | Variant resolution | 0.52ms | 0.048ms | **10.8x** |
34
- | Class deduplication | 2.1ms | 0.09ms | **23.3x** |
35
- | Class parsing | 3.0ms | 0.10ms | **30x** |
3
+ Semua perubahan signifikan pada project ini didokumentasikan di file ini.
36
4
 
37
5
  ---
38
6
 
39
- ## v4.5.0 โ€” Sprint 6โ€“10 Platform Overhaul (2026-03-21)
7
+ ## [5.0.6-canary] โ€” 2026-04-24
40
8
 
41
- ### Sprint 6 โ€” Error Handling & Logging
9
+ > Rilis canary terkini. Versi ini mencerminkan state aktual dari source code.
42
10
 
43
- #### Rust (`native/src/lib.rs`)
44
- - `cache_read` return type diubah dari `CacheReadResult` โ†’ `napi::Result<CacheReadResult>` โ€” error file tidak bisa dibaca sekarang dipropagasi ke JS dengan pesan deskriptif
45
- - `scan_workspace` sudah return `napi::Result` โ€” error directory tidak ditemukan langsung dilempar ke JS
11
+ ### ๐Ÿ“ฆ Packages (26 total)
46
12
 
47
- #### Scanner (`packages/domain/scanner/src/index.ts`)
48
- - Hapus `debugScanner()` dan `isDebugEnabled()` yang tersebar โ€” ganti dengan `createLogger("scanner")` dari `@tailwind-styled/shared`
49
- - Cache HIT/MISS/write-fail sekarang semua melalui `log.debug()` โ€” terkontrol via `TWS_LOG_LEVEL`
13
+ | Domain | Package |
14
+ |---|---|
15
+ | Core | `@tailwind-styled/core`, `@tailwind-styled/runtime`, `@tailwind-styled/shared` |
16
+ | Compiler | `@tailwind-styled/compiler`, `@tailwind-styled/syntax`, `@tailwind-styled/atomic` |
17
+ | Build | `@tailwind-styled/engine`, `@tailwind-styled/scanner`, `@tailwind-styled/analyzer` |
18
+ | Adapters | `@tailwind-styled/next`, `@tailwind-styled/vite`, `@tailwind-styled/rspack` |
19
+ | Styling | `@tailwind-styled/animate`, `@tailwind-styled/theme`, `@tailwind-styled/preset`, `@tailwind-styled/runtime-css` |
20
+ | Plugins | `@tailwind-styled/plugin`, `@tailwind-styled/plugin-api`, `@tailwind-styled/plugin-registry` |
21
+ | Infra | `@tailwind-styled/dashboard`, `@tailwind-styled/devtools`, `@tailwind-styled/studio-desktop` |
22
+ | Framework | `@tailwind-styled/vue`, `@tailwind-styled/svelte` |
23
+ | DX | `@tailwind-styled/testing`, `@tailwind-styled/storybook-addon` |
50
24
 
51
- #### Engine (`packages/domain/engine/src/index.ts`)
52
- - Plugin `onError` hook dipanggil sebelum error dipropagasi โ€” plugin tidak bisa crash engine
53
- - `watch()` emit event `{ type: "error" }` saat watcher atau transform gagal
25
+ ### ๐Ÿฆ€ Rust Native Engine
54
26
 
55
- #### Shared Logger (`packages/domain/shared/src/logger.ts`)
56
- - Sudah support `TWS_LOG_LEVEL=debug|info|warn|error|silent`
57
- - `TWS_DEBUG_SCANNER=1` sebagai shorthand untuk debug scanner
27
+ - **92 NAPI functions** tersedia via `napi-rs` โ€” scan, cache, parse, normalize, diff, analyze, minify, lint
28
+ - **137 Rust `pub fn`** di `native/src/` โ€” termasuk internal helpers
29
+ - **LightningCSS** sebagai post-processor: minify, vendor prefix, dead-code strip
30
+ - Pipeline: `Tailwind JS compile()` โ†’ `Rust processTailwindCssLightning()` โ†’ final CSS
31
+ - Persistent DashMap cache โ€” cold start scan `<10ms`, incremental `~0ms`
32
+ - `callOptional` pattern โ€” native-first, JS fallback jika binary tidak tersedia
58
33
 
59
- ---
34
+ ### ๐Ÿงช Testing
60
35
 
61
- ### Sprint 7 โ€” Platform Adapters
36
+ - **52 test files**, **675+ test cases** total
37
+ - Coverage: core, compiler, engine, scanner, analyzer, adapter Next/Vite/Rspack, Vue, Svelte, testing utils, storybook-addon, theme, animate, plugin-registry, CLI, devtools, dashboard
38
+ - `packages/domain/testing/` โ€” custom matchers: `expectClasses()`, `expectEngineMetrics()`, `toHaveEngineMetrics()`, `expandVariantMatrix()`
39
+ - Test pipeline: Vitest + `.mjs` integration tests
62
40
 
63
- #### Next.js (`packages/presentation/next/tsup.config.ts`)
64
- - Hapus `@tailwind-styled/compiler` dan `@tailwind-styled/plugin` dari `external`
65
- - Tambah `noExternal` agar compiler di-bundle inline ke adapter
66
- - `esbuildOptions` skip `*.node` native binaries Tailwind v4
41
+ ### โœ… Resolved (vs styled-components)
67
42
 
68
- #### Vite (`packages/presentation/vite/tsup.config.ts`, `src/plugin.ts`)
69
- - Hapus `@tailwind-styled/compiler`, `engine`, `scanner` dari `external`
70
- - Tambah `noExternal` untuk semua internal packages
71
- - `preserveImports: true` di `loaderOptions` transform hook
43
+ | Kekurangan styled-components | Status |
44
+ |---|---|
45
+ | Runtime overhead ~15KB | โœ… ~4.5KB runtime, CSS di-extract build time |
46
+ | SSR complexity (`ServerStyleSheet`) | โœ… Tidak diperlukan โ€” RSC entries dikecualikan dari loader otomatis |
47
+ | Class name tidak deterministik | โœ… Pakai Tailwind class asli langsung, zero hash |
48
+ | RSC tidak support | โœ… `tw.server.*` namespace + auto RSC boundary detection di loader |
49
+ | TypeScript verbose (`$prop`) | โœ… Variants API di config object, generics otomatis |
50
+ | Tidak tree-shakeable | โœ… DSE (Dead Style Eliminator) terintegrasi di pipeline |
72
51
 
73
- #### Rspack (`packages/presentation/rspack/tsup.config.ts` โ€” file baru, `src/loader.ts`)
74
- - Buat `tsup.config.ts` dari scratch
75
- - `noExternal: ["@tailwind-styled/compiler"]`
76
- - `preserveImports: true` di `runLoaderTransform` call
52
+ ### โš ๏ธ Catatan
77
53
 
78
- #### Semua Loaders
79
- - `turbopackLoader.ts`, `webpackLoader.ts`, `plugin.ts`, `loader.ts` โ€” semua set `preserveImports: true`
80
- - `cv`, `cx`, `cn` dijamin tidak distrip oleh compiler
54
+ - `stateEngine.ts` menggunakan runtime `<style>` injection di dev mode / fallback โ€” tidak aktif di production build
55
+ - `TW_MAP` di `stateEngine.ts` hanya dipakai saat compiler tidak tersedia (`TWS_NO_NATIVE=1`) โ€” tidak relevan di production
56
+ - E2E tests belum ada โ€” 52 test files semuanya unit/integration level
57
+ - HMR belum ada di adapter Next.js (sudah ada di Vite)
81
58
 
82
59
  ---
83
60
 
84
- ### Sprint 8 โ€” Developer Tooling
85
-
86
- #### CLI (`packages/infrastructure/cli/src/analyze.ts`, `src/stats.ts`)
87
- - Suppress `console.log("Analyzing...")` saat `--json` aktif โ€” output JSON sekarang clean parseable
88
- - `tw analyze --json` dan `tw stats --json` bisa di-pipe ke tools lain
89
-
90
- #### DevTools (`packages/infrastructure/devtools/src/index.tsx`)
91
- - Hapus tombol "Run Rust Workspace Scan" โ€” tidak bisa jalan di browser environment
92
- - Hapus `getRustAnalyzer()`, `runRustScan`, `rustReport`, `rustScanning`
93
- - Ganti dengan panel **Engine Metrics** yang fetch dari `http://localhost:3000/metrics` (dashboard)
94
- - Fallback message: "Rust analyzer hanya tersedia via CLI atau dashboard โ€” `tw analyze . | tw dashboard`"
95
- - DOM Scan tetap ada dan berfungsi
61
+ ## [4.5.0-alpha.1] โ€” 2026-04-18
96
62
 
97
- #### VSCode Extension (`packages/infrastructure/vscode/src/extension.ts`, `scripts/postbuild.cjs`)
98
- - `startLspServer` cek `dist/lsp.mjs` sebagai kandidat pertama (bundled bersama extension)
99
- - Tambah `packages/infrastructure/vscode/scripts/postbuild.cjs` โ€” copy `scripts/v48/lsp.mjs` ke `dist/lsp.mjs` setiap build
100
- - `package.json` tambah `"postbuild": "node scripts/postbuild.cjs"`
101
-
102
- ---
63
+ ### ๐Ÿš€ Performance (Rust Native)
103
64
 
104
- ### Sprint 9 โ€” Studio Desktop (Electron)
65
+ - **10x** variant resolution via `resolve_variants` di Rust
66
+ - **23x** class deduplication via `normalizeAndDedupClasses` di Rust
67
+ - **30x** class parsing via `parseClasses` di Rust
105
68
 
106
- #### Main Process (`packages/infrastructure/studio-desktop/src/main.js`)
107
- - `STUDIO_SCRIPT` sekarang di-resolve via `resolveStudioScript()` โ€” cek `process.resourcesPath` (packaged), `__dirname/../..` (dev), dan `cwd` (fallback)
108
- - Engine IPC handlers baru: `engine-scan`, `engine-build`, `engine-watch-start`, `engine-watch-stop`, `engine-reset`
109
- - `createEngine` dari `@tailwind-styled/engine` di-lazy-load per project
110
- - Engine di-reset otomatis saat `change-project` dipanggil
111
- - Engine events di-forward ke renderer via `mainWindow.webContents.send("engine-event")`
69
+ ### ๐Ÿ›ก๏ธ Reliability
112
70
 
113
- #### Preload (`packages/infrastructure/studio-desktop/src/preload.js`)
114
- - Ekspos `engineScan`, `engineBuild`, `engineWatchStart`, `engineWatchStop`, `onEngineEvent` ke renderer via `contextBridge`
71
+ - Health check monitoring untuk native bridge
72
+ - Auto-fallback dengan exponential backoff
73
+ - Telemetry: Prometheus / JSON / Console exporters
74
+ - Error message jelas jika native binary tidak ditemukan
115
75
 
116
- #### Package (`packages/infrastructure/studio-desktop/package.json`)
117
- - Tambah `@tailwind-styled/shared` ke dependencies
118
- - Script `dev` update dengan fallback message jika Electron belum terinstall
76
+ ### ๐Ÿงช Testing & Quality
119
77
 
120
- ---
78
+ - Integration tests untuk semua core functions
79
+ - Unit tests untuk health check & telemetry
80
+ - Benchmark suite untuk performance regression
121
81
 
122
- ### Sprint 10 โ€” Testing & Documentation
82
+ ### โš ๏ธ Breaking
123
83
 
124
- #### Testing Package (`packages/domain/testing/src/index.ts`)
125
- - Tambah `EngineMetricsSnapshot` interface
126
- - Tambah `expectEngineMetrics(metrics, expectations)` โ€” assert minFiles, maxBuildTimeMs, minUniqueClasses, cacheHitRateMin
127
- - Tambah `toHaveEngineMetrics(expectations)` โ€” Jest/Vitest custom matcher
128
- - Tambah `tailwindMatchersWithMetrics` โ€” combined export semua matchers
84
+ - JS fallbacks dihapus โ€” native binary sekarang required
85
+ - Jalankan `npx tw setup` setelah install
129
86
 
130
- #### Test Suites Baru
131
- - `packages/domain/testing/test/sprint9-platform.test.mjs` โ€” 23 tests: next/vite/rspack adapter configs, preserveImports, studio-desktop engine IPC
132
- - `packages/domain/testing/test/sprint10-integration.test.mjs` โ€” 28 tests: Sprint 6โ€“8 error handling, logging, engine propagation, DevTools safety, VSCode LSP, metrics matchers
87
+ ### ๐Ÿ“Š Benchmark
133
88
 
134
- #### Test Results
135
- - Total: **84/86 tests pass**
136
- - 2 failing tests: pre-existing `twMerge/cn` extraction (unrelated to engine changes)
89
+ | Operasi | v4.4 (JS) | v4.5 (Rust) | Peningkatan |
90
+ |---|---|---|---|
91
+ | Variant resolution | 0.52ms | 0.048ms | **10.8ร—** |
92
+ | Class deduplication | 2.1ms | 0.09ms | **23.3ร—** |
93
+ | Class parsing | 3.0ms | 0.10ms | **30ร—** |
137
94
 
138
95
  ---
139
96
 
140
- ## v4.2.0 โ€” Sprint 1 & 2 Complete (2026-03-15)
141
-
142
- ### New Packages
143
-
144
- - **`@tailwind-styled/vue`** โ€” Vue 3 adapter: `tw()`, `cv()`, `extend()`, `TailwindStyledPlugin`. Full variant/compound variant support with `twMerge` conflict resolution.
145
- - **`@tailwind-styled/svelte`** โ€” Svelte 4/5 adapter: `cv()`, `tw()`, `use:styled` action, `createVariants()` (Svelte 5 runes compatible).
146
-
147
- ### New Features
148
-
149
- #### Parser & Compiler (v4.6)
150
- - `tw parse <file>` โ€” Full AST traversal with 3-tier strategy: `oxc-parser` (Rust) โ†’ `@babel/parser` โ†’ regex fallback. Extracts classes from JSX `className`, template literals, `twMerge()`, `cn()`, `clsx()` calls.
151
- - Real tree shaking (`tw shake <css>`) โ€” CSS selector analysis against source scan. Removes unused rules based on actual class usage, not sentinel strings. Supports `@layer`, `@media` preservation.
152
-
153
- #### Compiler Optimization (v4.7/v4.9)
154
- - `tw optimize <file>` โ€” Constant folding (`true ? A : B โ†’ A`), class deduplication, `twMerge` literal pre-computation.
155
-
156
- #### Parallel & Ecosystem (v4.8)
157
- - `scripts/v48/lint-parallel.mjs` โ€” Multi-threaded linting via `worker_threads`
158
- - LSP server (`tw lsp`) โ€” hover, completion (Tailwind class autocomplete), diagnostics via `vscode-languageserver`
97
+ ## [4.5.0] โ€” Sprint 6โ€“10 Platform Overhaul โ€” 2026-03-21
159
98
 
160
- #### Dashboard & Metrics
161
- - `@tailwind-styled/dashboard` โ€” Live metrics server with file-watch IPC. Reads `.tw-cache/metrics.json` written by engine. Real-time HTML UI with build history chart.
162
- - `packages/domain/engine/src/metricsWriter.ts` โ€” Connects engine build results โ†’ `.tw-cache/metrics.json` โ†’ dashboard.
163
-
164
- #### Plugin Registry
165
- - `@tailwind-styled/plugin-registry` โ€” `tw-plugin search/install/list` CLI. Registry now includes 4 official + 2 community plugins with docs and install commands.
166
-
167
- #### Testing & Storybook
168
- - `@tailwind-styled/testing` โ€” `expectClasses()`, `expectNoClasses()`, `expandVariantMatrix()`, `testAllVariants()`, `expectClassesEqual()`, Jest/Vitest custom matchers (`tailwindMatchers`).
169
- - `@tailwind-styled/storybook-addon` โ€” `generateArgTypes()`, `withTailwindStyled()` decorator, `getVariantClass()`, `createVariantStoryArgs()`.
170
-
171
- #### AI & Studio (v4.5)
172
- - `tw ai "describe"` โ€” Anthropic API integration for component generation. Fallback to smart static templates (card/nav/button detection) when `ANTHROPIC_API_KEY` not set.
173
- - `tw studio` โ€” Web-based component studio: scans project for `tw()`/`cv()` components, HTML UI with search + AI generator endpoint.
174
- - `tw sync <init|pull|push|diff>` โ€” W3C DTCG design token sync. Push to CSS variables (`--color-primary: #3b82f6`) or Tailwind `@theme {}` block.
99
+ ### Sprint 6 โ€” Error Handling & Logging
175
100
 
176
- #### Distributed Build (v5.0 preview)
177
- - `tw cluster <init|build|status>` โ€” Real `worker_threads` pool. Distributes file scan across CPU cores. Reports throughput (files/sec).
101
+ - `cache_read` dan `scan_workspace` sekarang return `napi::Result` โ€” error dipropagasi ke JS dengan pesan deskriptif
102
+ - Scanner logging terpusat via `createLogger("scanner")` dari `@tailwind-styled/shared`
103
+ - Cache HIT/MISS/write-fail dikontrol via `TWS_LOG_LEVEL`
104
+ - Plugin `onError` hook dipanggil sebelum error propagasi โ€” plugin tidak bisa crash engine
105
+ - `watch()` emit `{ type: "error" }` saat watcher atau transform gagal
106
+ - `TWS_LOG_LEVEL=debug|info|warn|error|silent` + `TWS_DEBUG_SCANNER=1`
178
107
 
179
- ### Tests Added (Sprint 2)
180
- - `packages/domain/scanner/test/parse-v46.test.mjs` โ€” 20 unit tests for parse pipeline
181
- - `packages/domain/compiler/test/shake-v47.test.mjs` โ€” 10 unit tests for tree shaking
182
- - `packages/presentation/vue/test/vue-adapter.test.mjs` โ€” 9 unit tests for Vue cv()
183
- - `packages/presentation/svelte/test/svelte-adapter.test.mjs` โ€” 12 unit tests for Svelte cv()/tw()
184
- - `packages/domain/testing/test/testing-utils.test.mjs` โ€” 18 unit tests for testing utilities
185
- - `examples/integration-test/sprint2.integration.test.mjs` โ€” 9 integration tests (parseโ†’shake pipeline, dashboard HTTP, real-world component patterns)
108
+ ### Sprint 7 โ€” Platform Adapters
186
109
 
187
- ### Benchmark
188
- - `scripts/benchmark/sprint2-bench.mjs` โ€” Measures parse (files/sec), shake (% CSS reduction), cluster (throughput) with memory snapshot. Output: `docs/benchmark/sprint2-results.json`.
110
+ - Next.js, Vite, Rspack: compiler di-bundle inline โ€” tidak perlu install `@tailwind-styled/compiler` terpisah
111
+ - `preserveImports: true` di semua loaders โ€” `cv`, `cx`, `cn` dijamin tidak distrip
112
+ - Rspack `tsup.config.ts` dibuat dari scratch
113
+ - RSC Auto-inject: `detectRSCBoundary()` dan `autoInjectClientBoundary()` sebagai public API
114
+ - `webpackLoader.ts` dan `turbopackLoader.ts` auto-inject `"use client"` berdasarkan `analyzeFile()`
189
115
 
190
- ### Documentation
191
- - `docs/known-limitations/tw-parse.md` โ€” Fallback modes, `.vue`/`.svelte` support gap, dynamic class limitations
192
- - `docs/known-limitations/tw-transform.md` โ€” JSX runtime requirements, hoist behavior, source map availability
193
- - `docs/known-limitations/tw-lint.md` โ€” Worker config, exit codes, missing `--format json`
116
+ ### Sprint 8 โ€” Developer Tooling
194
117
 
195
- ### CI & Quality
196
- - Smoke tests expanded to cover Sprint 1+2 features (Oxide pipeline, plugin registry, sync, AI, cluster)
197
- - All packages bumped to `4.2.0`
118
+ - CLI: `tw analyze --json` dan `tw stats --json` output clean parseable (suppress `console.log`)
119
+ - DevTools: hapus "Run Rust Workspace Scan" โ€” ganti panel **Engine Metrics** dari `localhost:3000/metrics`
120
+ - VSCode: `startLspServer` cek `dist/lsp.mjs` bundled dulu, `postbuild.cjs` otomatis copy
121
+ - Tambah keybindings (`Ctrl+Shift+T/N/S`), `configuration` settings, `menus` context
198
122
 
199
- ---
123
+ ### Sprint 9 โ€” Studio Desktop (Electron)
200
124
 
201
- ## v2.1.0-alpha.1 โ€” Tailwind v4 Upgrade Path
125
+ - Engine IPC handlers: `engine-scan`, `engine-build`, `engine-watch-start`, `engine-watch-stop`, `engine-reset`
126
+ - `createEngine` lazy-load per project, reset otomatis saat `change-project`
127
+ - Engine events di-forward ke renderer via `mainWindow.webContents.send("engine-event")`
128
+ - `contextBridge` ekspos: `engineScan`, `engineBuild`, `engineWatchStart`, `engineWatchStop`, `onEngineEvent`
129
+ - Studio Desktop: `loading-error.html` fallback dengan auto-retry
130
+ - Auto-updater via `electron-updater` โ€” check 10 detik setelah startup, manual via Tools menu
131
+ - Tray icon: toggle window, double-click focus, context menu (Open, Browser, Quit)
202
132
 
203
- ### Added
204
- - New workspace packages: `@tailwind-styled/scanner` and `@tailwind-styled/engine`.
205
- - Core Tailwind v4 helpers: parser, CSS-first theme reader, merge layer, styled resolver.
206
- - CLI phase upgrades: `init`, `scan`, `migrate`, and interactive `migrate --wizard`.
207
- - Vite plugin build-end integration with scanner reports and optional engine build call.
208
- - Native parser scaffold (`native/`) plus benchmark script (`benchmarks/native-parser-bench.mjs`).
209
- - Release workflow/docs scaffold: `.github/workflows/publish-alpha.yml`, `RELEASE.md`, `ANNOUNCEMENT.md`.
133
+ ### Sprint 10 โ€” Testing & Documentation
210
134
 
211
- ### Notes
212
- - Native parser remains optional and uses fallback strategy until binding is shipped in CI artifacts.
135
+ - `EngineMetricsSnapshot` interface + `expectEngineMetrics()` + `toHaveEngineMetrics()` + `tailwindMatchersWithMetrics`
136
+ - `sprint9-platform.test.mjs` โ€” 23 tests: adapter configs, preserveImports, studio IPC
137
+ - `sprint10-integration.test.mjs` โ€” 28 tests: error handling, logging, DevTools safety, VSCode LSP, metrics
138
+ - **84/86 tests pass** โ€” 2 failing pre-existing (unrelated `twMerge/cn`)
213
139
 
214
140
  ---
215
141
 
216
- ## v2.0.0 โ€” Major Upgrade (Compiler-Driven)
142
+ ## [4.3.0โ€“4.5.0] โ€” 2026-03-16
217
143
 
218
- ### Breaking Changes
219
- - **Removed `styled-components` dependency** โ€” peer dep dihapus.
220
- - **`styledFactory`, `shouldForwardProp`, `blockProp`, `allowProp`** โ€” dihapus.
221
- - **`propEngine`, `responsiveEngine`** โ€” dipindahkan ke compiler.
222
- - **`ThemeContext`** โ€” dihapus.
223
-
224
- ### New Features
225
- - **Zero-runtime output** โ€” `tw.div\`...\`` dikompilasi ke pure `React.forwardRef`.
226
- - **Compiler-driven variants** โ€” Variant config dikompilasi ke static lookup table.
227
- - **RSC-aware** โ€” Auto detect server vs client components.
228
- - **`withTailwindStyled()` plugin** โ€” Next.js plugin dengan Turbopack + Webpack support.
229
- - **`tailwindStyledPlugin()` Vite plugin** โ€” Same compiler pipeline untuk Vite 5+.
144
+ ### Fitur Baru
230
145
 
231
- ---
146
+ - **`tw ai`** โ€” Anthropic API untuk component generation, multi-provider (`anthropic|openai|ollama`), fallback ke static templates
147
+ - **`tw studio`** โ€” Web-based component studio: scan project, search, AI generator endpoint
148
+ - **`tw cluster`** โ€” `worker_threads` pool: distribusi scan ke CPU cores
149
+ - **`tw registry`** โ€” Local/team HTTP registry, npm-compatible packument protocol, tarball publish/install
150
+ - **`tw sync`** โ€” W3C DTCG design token sync: pull/push HTTP/HTTPS, S3 protocol, Figma multi-mode
151
+ - **`tw preflight`** โ€” 8 checks: Node version, bundler, Tailwind config, deprecated patterns, TypeScript, auto-fix
152
+ - **`tw audit`** โ€” Deprecated class scanner, a11y checks, npm audit security, `--scope` dan `--json`
153
+ - **`@tailwind-styled/shared`** โ€” Package baru: `LRUCache` (TTL), `createLogger`, `hashContent/File`, `debounce/throttle`, `parseVersion`
232
154
 
233
- ## v4.3โ€“v4.5 Upgrade (2026-03-16)
155
+ ### tw parse โ€” Multi-format
234
156
 
235
- ### v4.3 โ€” Command Densification
236
- - `tw studio` โ€” sekarang spawn `scripts/v45/studio.mjs` langsung (sebelumnya: `console.log` placeholder)
237
- - `tw dashboard` โ€” direct spawn `packages/infrastructure/dashboard/src/server.mjs` tanpa butuh build (sebelumnya: `npm run dev`)
238
- - `tw storybook` โ€” tanpa `--variants` โ†’ launch Storybook dev server via `npx storybook dev`; dengan `--variants` โ†’ enumerate JSON (CI mode)
157
+ - `.vue/.svelte/.mdx/.html` โ€” regex-direct strategy, skip Babel (lebih cepat)
158
+ - `.js/.jsx/.ts/.tsx` โ€” Oxc-first โ†’ Babel โ†’ regex
159
+ - Native Rust Tier 0: coba `native/index.mjs` (.node binding) sebelum Oxc
160
+ - Parse chain: **native โ†’ oxc โ†’ babel โ†’ regex**
239
161
 
240
- ### v4.4 โ€” DX & Quality
241
- - `tw preflight [--fix] [--json]` โ€” command baru: 8 checks (Node version, package.json, tailwind-styled, bundler, tailwind-merge, Tailwind config, deprecated patterns, TypeScript), auto-fix sederhana
242
- - `tw audit` โ€” real checks: deprecated class scanner, a11y (img alt, onClick keyboard, div onClick, focus state), npm audit security, class count estimate; `--scope=deprecated|a11y|security|performance` dan `--json`
243
- - `tw deploy` โ€” baca package.json, tulis `.tw-cache/deploy-manifest.json`, `--dry-run` support
244
- - `tw share` โ€” baca manifest yang ada, generate payload dengan installCommand dan importExample
162
+ ### Next.js Route CSS
245
163
 
246
- ### v4.5 โ€” Platform Mode
247
- - `tw sync figma <pull|push|diff>` โ€” CLI sekarang route subcommand `figma` ke `scripts/v45/figma-sync.mjs`
248
- - `tw ai` โ€” multi-provider: `--provider=anthropic|openai|ollama`, `--model=name`, auto-fallback ke Anthropic โ†’ static template
249
- - `@tailwind-styled/shared` โ€” package baru: `LRUCache` (TTL support), `createLogger`, `hashContent`/`hashFile`, `debounce`/`throttle`, `parseVersion`/`satisfiesMinVersion`
250
- - `packages/domain/compiler` โ€” migrasi `hashFileContent` ke `@tailwind-styled/shared`
164
+ - `routeCssMiddleware.ts` โ€” `getRouteCssLinks()`, `injectRouteCssIntoHtml()`
165
+ - `withTailwindStyled` write `css-manifest.json` ke `.next/static/css/tw/`
166
+ - Dynamic route CSS: `[id]`, `[...slug]` dengan cache per params kombinasi
251
167
 
252
168
  ### Tests
253
- - `packages/domain/testing/test/v43-v45.test.mjs` โ€” 28 tests covering shared package, audit, AI provider, preflight
254
-
255
- ### v4.2.0 patch (2026-03-16)
256
169
 
257
- - `scripts/v49/critical-css.mjs` โ€” upgraded: real CSS rule parsing, `--inline`, `--out=file`, id/tag/class extraction, savedPercent metric
258
- - `scripts/v48/lint-parallel.mjs` โ€” `--format=sarif` (SARIF 2.1 untuk GitHub Code Scanning), `--fix` auto-deduplicate duplicate classes
259
- - `scripts/v46/parse.mjs` โ€” bugfix: regex fallback sekarang mengekstrak kelas dari `twMerge()`, `cn()`, `cx()`, `clsx()` calls
260
- - `packages/infrastructure/vscode/package.json` โ€” tambah keybindings (Ctrl+Shift+T/N/S), `configuration` settings, `menus` context
261
- - `packages/domain/shared/tsconfig.json` โ€” tsconfig untuk build
262
- - `.github/workflows/benchmark.yml` โ€” sprint2-bench, plugin-registry SLO, toolchain benchmark
263
- - `scripts/validate/dependency-matrix-check.mjs` โ€” validasi packages baru v4.2
264
- - `packages/infrastructure/cli/src/index.ts` โ€” fix preflight handler (hapus `--input-type=module` orphan)
265
- - `docs/known-limitations/` โ€” update status aktual untuk tw-lint, tw-split-optimize, tw-v50
170
+ - `v43-v45.test.mjs` โ€” 28 tests: shared package, audit, AI provider, preflight
171
+ - `sprint7.test.mjs` โ€” 30 tests, semua pass
266
172
 
267
173
  ---
268
174
 
269
- ## v4.3โ€“v6.0 Sprint 6 (2026-03-16)
175
+ ## [4.2.0] โ€” Sprint 1 & 2 โ€” 2026-03-15
270
176
 
271
- ### New Features
177
+ ### Packages Baru
272
178
 
273
- #### Registry (`tw registry`)
274
- - `scripts/v45/registry.mjs` โ€” Lightweight local/team HTTP registry server
275
- - `tw deploy --registry=http://localhost:4040` โ€” Real HTTP publish ke registry
276
- - `tw registry serve|list|info` โ€” Manage registry dari CLI
277
- - Token auth via `TW_REGISTRY_TOKEN` env var
179
+ - **`@tailwind-styled/vue`** โ€” Vue 3: `tw()`, `cv()`, `extend()`, `TailwindStyledPlugin`
180
+ - **`@tailwind-styled/svelte`** โ€” Svelte 4/5: `cv()`, `tw()`, `use:styled`, `createVariants()` (Svelte 5 runes)
181
+ - **`@tailwind-styled/testing`** โ€” `expectClasses()`, `expandVariantMatrix()`, `testAllVariants()`, Jest/Vitest matchers
182
+ - **`@tailwind-styled/storybook-addon`** โ€” `generateArgTypes()`, `withTailwindStyled()` decorator
183
+ - **`@tailwind-styled/dashboard`** โ€” Live metrics server, file-watch IPC, HTML UI dengan build history chart
184
+ - **`@tailwind-styled/plugin-registry`** โ€” `tw-plugin search/install/list` CLI, 4 official + 2 community plugins
278
185
 
279
- #### Remote build (`tw cluster-server`)
280
- - `scripts/v50/cluster-server.mjs` โ€” Remote build worker HTTP server
281
- - `tw cluster build src/ --remote=http://host:7070 --token=secret` โ€” Dispatch ke remote workers
282
- - `tw cluster-server [--port=7070] [--workers=N] [--token=secret]`
186
+ ### Fitur Compiler
283
187
 
284
- #### Remote token sync
285
- - `tw sync pull --from=https://cdn.example.com/tokens.json` โ€” HTTP/HTTPS URL pull
286
- - `tw sync push --to-url=https://api.example.com/tokens` โ€” HTTP push ke endpoint
287
- - Figma subcommand sekarang tersedia: `tw sync figma pull|push|diff`
188
+ - `tw parse <file>` โ€” 3-tier AST: `oxc-parser` โ†’ `@babel/parser` โ†’ regex. Extract dari JSX, template literal, `twMerge()`, `cn()`, `clsx()`
189
+ - `tw shake <css>` โ€” Real tree shaking berbasis CSS selector analysis, support `@layer`, `@media`
190
+ - `tw optimize <file>` โ€” Constant folding, class deduplication, `twMerge` literal pre-computation
191
+ - LSP server (`tw lsp`) โ€” hover, completion (Tailwind autocomplete), diagnostics via `vscode-languageserver`
192
+ - `tw cluster build` โ€” `worker_threads` pool, throughput report (files/sec)
288
193
 
289
- #### Next.js route CSS injection
290
- - `packages/presentation/next/src/routeCssMiddleware.ts` โ€” `getRouteCssLinks(route)`, `injectRouteCssIntoHtml()`
291
- - `withTailwindStyled` sekarang write `css-manifest.json` ke `.next/static/css/tw/`
292
- - Konsumsi di layout: `import { getRouteCssLinks } from 'tailwind-styled-v4/next/route-css'`
293
-
294
- #### Vite plugin route CSS
295
- - `routeCss: true` option di `tailwindStyledPlugin()` โ€” run split-routes + shake per route
296
- - `routeCssDir` โ€” konfigurasi output dir
297
- - `deadStyleElimination: true` โ€” shake setiap route CSS chunk
194
+ ### Tests
298
195
 
299
- #### Studio Desktop
300
- - `packages/infrastructure/studio-desktop/src/loading-error.html` โ€” loading fallback dengan auto-retry + error state
301
- - `packages/infrastructure/studio-desktop/src/updater.js` โ€” electron-updater integration (GitHub Releases)
302
- - Auto-update check 10 detik setelah startup, manual via Tools menu
196
+ - 6 test suites baru, 78 unit tests + 9 integration tests
197
+ - `scripts/benchmark/sprint2-bench.mjs` โ€” parse/shake/cluster metrics ke `docs/benchmark/sprint2-results.json`
303
198
 
304
199
  ---
305
200
 
306
- ## Sprint 7 (2026-03-16)
201
+ ## [4.5.0] โ€” Implementation Session โ€” 2026-04
307
202
 
308
- ### Tarball Registry (npm-compatible)
309
- - `scripts/v45/registry-tarball.mjs` โ€” `tw registry publish` buat + upload tarball, `tw install <pkg>` download + install, `tw registry versions <pkg>` list versions
310
- - `scripts/v45/registry.mjs` โ€” upgrade: PUT `/packages/:name` endpoint, GET `/packages/:name/versions`, GET `/packages/:name/-/:tarball.tgz`, tarball storage di `tarballs/`, version history di `.versions.json`
311
- - `tw install` shorthand command di CLI
203
+ ### Bug Fixes
312
204
 
313
- ### RSC Auto-inject
314
- - `packages/domain/compiler/src/rscAnalyzer.ts` โ€” export `detectRSCBoundary()` dan `autoInjectClientBoundary()` sebagai public API Sprint 7
315
- - `packages/presentation/next/src/webpackLoader.ts` โ€” import rscAnalyzer, auto-inject `"use client"` berdasarkan `analyzeFile()` analysis
316
- - `packages/presentation/next/src/turbopackLoader.ts` โ€” import rscAnalyzer (Sprint 7 alignment)
205
+ - VSCode Extension: `extension.ts` pakai `completionProvider.ts` dan `hoverProvider.ts` yang benar (sebelumnya inline hardcoded)
206
+ - CLI scan: flag `--save` menulis `.tailwind-styled/scan-cache.json` format lengkap untuk VSCode EngineService
207
+ - `TWS_DISABLE_NATIVE` env var dikenali di `nativeBridge.ts` dan `nativeBinding.ts`
208
+ - `TwError` upgrade: `fromZod()`, `source`, `originalCause`, `toJSON()`, `toCliMessage()`
209
+ - `ReverseLookup`: `clearCache()`, `pruneCache()`, `MAX_CACHE_BYTES` untuk mencegah memory leak
210
+ - `cssToIr`: `createIdGenerator()` factory โ€” eliminasi race condition
211
+ - DSE: `runDeadStyleElimination()` sekarang memanggil `eliminateDeadCss` + `optimizeCss`
212
+ - `CvFn/TwComponentFactory`: eliminasi `any`, proper generics dengan `InferVariantProps<C>`
213
+ - `extend()`: overload baru support `extend({ classes, variants })` dalam satu call
214
+ - `astTransform`: `mode` option dihapus dari destructuring
317
215
 
318
- ### Figma Multi-mode
319
- - `scripts/v45/figma-multi.mjs` โ€” pull dari multiple Figma files (`--file=key1,key2`), mode selection (`--mode=dark`), diff antar mode (`diff --from=light --to=dark`), `modes` command untuk list available modes
320
- - `tw sync figma` CLI otomatis route ke `figma-multi.mjs` jika ada `--file=`, `--mode=`, atau `modes` command
321
-
322
- ### Dynamic Route CSS (Sprint 7)
323
- - `packages/presentation/next/src/routeCssMiddleware.ts` โ€” `getDynamicRouteCssPaths()`, `getDynamicRouteCssLinks()`, `resolveDynamicRoute()`, `invalidateDynamicRouteCache()`
324
- - Support `[id]`, `[...slug]` dynamic segments dengan cache per kombinasi params
325
- - Fallback otomatis ke parent route jika tidak ada CSS spesifik
326
-
327
- ### Oxc Minify Full Pipeline
328
- - `scripts/v47/minify.mjs` โ€” 3-tier: oxc-minify (mangle+dead-code+compress) โ†’ esbuild (transform) โ†’ regex fallback
329
- - Opsi: `--mangle`, `--dead-code`, `--comments=false`, `--target=`, `--json`, `--write`, `--out=`
330
- - Report: mode, original/minified bytes, reduction%, durationMs
331
-
332
- ### Tests
333
- - `packages/domain/testing/test/sprint7.test.mjs` โ€” 30 tests, semua pass
334
-
335
- ---
336
-
337
- ## Sprint 8 (2026-03-16)
216
+ ### Added
338
217
 
339
- ### adopt โ€” Monorepo Detection
340
- - Auto-detect: npm workspaces, pnpm (`pnpm-workspace.yaml`), Nx (`nx.json`), Turborepo (`turbo.json`)
341
- - `--all` flag: jalankan analisis di semua workspace packages sekaligus
342
- - `--project=<dir>` tetap override monorepo detection
343
- - Informational log saat monorepo terdeteksi
218
+ - Zod schemas untuk semua native binding responses (`native-schemas.ts`)
219
+ - Engine facade: `scanWorkspace()`, `analyzeWorkspace()`, `generateSafelist()`, `build()`
220
+ - `CONTRIBUTING.md`: section "Berkontribusi tanpa Rust"
221
+ - `docs/api/engine.md`, `analyzer.md`, `cli.md`
222
+ - `.github/workflows/plugin-registry-test.yml` matrix CI
223
+ - `tsconfig.build.json` + `tsconfig.dev.json` โ€” separation of concerns
344
224
 
345
- ### tw lint โ€” Custom Rules
346
- - `--rules=path/to/rules.json` โ€” load custom rules dari file JSON
347
- - `.tw-lint.json` di CWD auto-loaded tanpa flag
348
- - `--rule="pattern:message"` โ€” inline custom rule (repeatable)
349
- - Rule format: `{ id, pattern, message, severity: "error"|"warning" }`
350
- - Output report: `customRulesLoaded` field
225
+ ### Tests Ditambah
351
226
 
352
- ### tw lint โ€” `--no-exit-0` & `--severity`
353
- - `--no-exit-0` โ€” exit 0 meski ada issues (CI-safe mode, e.g. untuk warning-only runs)
354
- - `--severity=error|warning` โ€” set minimum severity yang memicu exit code 1
355
- - Output report: `noExit0` dan `severity` fields
227
+ - **39 test files baru**, **318 test cases** baru
228
+ - Coverage: semua domain packages, semua adapters, Vue, Svelte, CLI, infrastructure
356
229
 
357
230
  ---
358
231
 
359
- ## Sprint 9 (2026-03-16)
232
+ ## [2.0.0] โ€” Major Upgrade (Compiler-Driven)
360
233
 
361
- ### Studio Desktop โ€” Tray Icon
362
- - `packages/infrastructure/studio-desktop/src/icons/tray.png` + `tray@2x.png` โ€” gradient blue-to-teal PNG icon
363
- - `createTray()` fully implemented: `new Tray(iconPath)`, tooltip, context menu
364
- - Context menu: Open Studio, Open in Browser, separator, project name, Quit
365
- - `tray.on("click")` โ€” toggle window visibility
366
- - `tray.on("double-click")` โ€” focus window
234
+ ### Breaking Changes
367
235
 
368
- ### Plugin Marketplace
369
- - `scripts/v45/marketplace.mjs` โ€” publish, search, featured, info, unpublish
370
- - Auto-inference of category (animation/layout/theme/ui/typography/utilities)
371
- - Offline fallback: publish to local `tw registry`, search in `.tw-registry/`
372
- - `tw plugin marketplace` + `tw plugin publish` commands di CLI
236
+ - Hapus dependency `styled-components`
237
+ - Hapus `styledFactory`, `shouldForwardProp`, `blockProp`, `allowProp`
238
+ - Hapus `propEngine`, `responsiveEngine` โ€” dipindahkan ke compiler
239
+ - Hapus `ThemeContext`
373
240
 
374
- ### tw parse โ€” .vue .svelte .mdx
375
- - Hybrid strategy: `.vue/.svelte/.mdx/.html` โ†’ regex-direct (skip Babel, faster)
376
- - `extractFromVue()` โ€” extract `<script>` + `class=` from template
377
- - `extractFromSvelte()` โ€” extract `<script>` + `class=` / `class:directive`
378
- - `extractFromMdx()` โ€” extract JSX blocks + imports
379
- - `.js/.jsx/.ts/.tsx` tetap Oxc-first โ†’ Babel โ†’ regex
241
+ ### Features
380
242
 
381
- ### tw transform โ€” .mdx
382
- - `.mdx` pre-processing: strip markdown prose, keep JSX/imports for transform
383
- - mode: `mdx-extracted`
243
+ - **Zero-runtime output** โ€” `tw.div\`...\`` dikompilasi ke pure `React.forwardRef`
244
+ - **Compiler-driven variants** โ€” dikompilasi ke static lookup table
245
+ - **RSC-aware** โ€” auto detect server vs client components
246
+ - **`withTailwindStyled()`** โ€” Next.js plugin dengan Turbopack + Webpack support
247
+ - **`tailwindStyledPlugin()`** โ€” Vite 5+ support
384
248
 
385
249
  ---
386
250
 
387
- ## Sprint 10 (2026-03-16)
388
-
389
- ### tw lint โ€” Tailwind config custom rules validation
390
- - `loadTailwindConfigClasses()` โ€” static analysis dari `tailwind.config.js/ts/mjs/cjs`
391
- - Ekstrak: `addUtilities()`, `addComponents()`, `extend:` theme keys
392
- - Config classes suppress false-positive deprecated warnings
393
- - `knownConfigClasses` diteruskan ke worker threads via `workerData`
394
-
395
- ### Registry โ€” npm packument protocol
396
- - `GET /:name` endpoint โ€” returns npm packument format: `dist-tags`, `versions`, `dist.tarball`
397
- - Compatible dengan `npm install --registry=http://localhost:4040`
398
- - `tw registry help` command added
251
+ ## Roadmap
399
252
 
400
- ### VS Code โ€” LSP client
401
- - `startLspServer()` / `stopLspServer()` โ€” manage `lsp.mjs` process lifecycle
402
- - Reads `tailwindStyled.lsp.enable` setting (default: true)
403
- - Auto-restart on settings change via `onDidChangeConfiguration`
404
- - Clean shutdown di `deactivate()`
253
+ ### v5 (target: ~8 minggu)
405
254
 
406
- ### tw sync โ€” S3:// protocol
407
- - `tw sync pull --from=s3://bucket/key` โ€” resolve via `AWS_ENDPOINT_URL` โ†’ HTTP
408
- - Native `@aws-sdk/client-s3` fallback jika available
409
- - Helpful error message jika tidak ada credentials
255
+ Berdasarkan `compiler-v5-upgrade-plan.md`:
410
256
 
411
- ### tw parse โ€” Native Rust tier 0
412
- - Mencoba `native/index.mjs` (.node binding) sebagai Tier 0 sebelum Oxc
413
- - Graceful fallback: native โ†’ Oxc โ†’ Babel โ†’ regex
414
- - `mode: 'native-rust'` jika compiled binding tersedia
257
+ - [ ] Hapus semua JS fallback โ€” Rust native only wajib
258
+ - [ ] Pangkas 120+ exports compiler โ†’ ~20 public API
259
+ - [ ] Hapus `mode` option โ€” zero-runtime only
260
+ - [ ] Hapus Tailwind v3 support โ€” v4 only
261
+ - [ ] Integrasikan DSE ke pipeline utama (sekarang masih standalone)
262
+ - [ ] Pisahkan atomic CSS ke `@tailwind-styled/atomic` (sudah ada packagenya)
263
+ - [ ] E2E + integration tests
415
264
 
416
- ---
417
-
418
- ## Sprint 10+ (2026-03-16)
419
-
420
- ### Manifest dev mode serving
421
- - `withTailwindStyled({ devManifest: true })` โ€” default aktif di dev mode
422
- - Next.js rewrites: `/__tw/css-manifest.json` โ†’ `.next/static/css/tw/css-manifest.json`
423
- - `/__tw/:path*.css` โ†’ route CSS chunks di `.next/static/css/tw/`
424
- - `routeCssMiddleware` โ€” tambah `public/__tw/` sebagai path candidate
425
-
426
- ### Plugin registry checksum & auto-update
427
- - `PluginRegistry.verifyIntegrity(name)` โ€” sha256 hash comparison
428
- - `PluginRegistry.checkForUpdate(name)` โ€” semver diff vs installed version
429
- - `PluginRegistry.checkAllUpdates()` โ€” batch update check semua plugins
430
- - CLI: `tw plugin update-check` + `tw plugin verify <name>` (+ `--json`)
431
-
432
- ### CSS generation heading fix (tw-v50.md)
433
- - Heading diupdate: "Output hanya classCount โ€” full CSS generation Sprint 10+" โ†’ "CSS Generation โ€” cluster output Sprint 10+"
434
- - Workaround diperjelas: `tw cluster build src/ && tw split src/ artifacts/route-css`
435
-
436
- ## [Implementation Session 2026-04] โ€” Major Test Coverage + Bug Fixes
437
-
438
- ### Fixed
439
- - **VSCode Extension**: `extension.ts` sekarang menggunakan `providers/completionProvider.ts` dan `hoverProvider.ts` yang benar (sebelumnya inline hardcoded)
440
- - **CLI scan**: flag `--save` menulis `.tailwind-styled/scan-cache.json` dengan format lengkap untuk VSCode EngineService
441
- - **RC Gate workflow**: referensi `.mjs` yang broken diganti dengan runner yang benar
442
- - **TWS_DISABLE_NATIVE**: env var sekarang dikenali di `nativeBridge.ts` dan `nativeBinding.ts`
443
- - **TwError**: upgrade dengan `fromZod()`, `source`, `originalCause`, `toJSON()`, `toCliMessage()`
444
- - **ReverseLookup**: `clearCache()`, `pruneCache()`, MAX_CACHE_BYTES untuk mencegah memory leak (QA #33)
445
- - **cssToIr**: `createIdGenerator()` factory pattern โ€” eliminasi race condition (QA #32)
446
- - **DSE**: `runDeadStyleElimination()` sekarang memanggil `eliminateDeadCss` + `optimizeCss` (Phase 3 compiler v5)
447
- - **ImpactTracker**: `analyzeWithBundle()` dan `analyzeAll()` โ€” bundleAnalyzer sekarang digunakan
448
- - **CvFn/TwComponentFactory**: eliminasi `any`, proper generics dengan `InferVariantProps<C>` (CRITIQUE-20 #1)
449
- - **extend()**: overload baru yang support `extend({ classes, variants })` dalam satu call (CRITIQUE-20 #2)
450
- - **CLI prototype commands**: graceful handler dengan info berguna daripada crash
451
- - **CLI docs**: label prototype di help dengan path script
452
- - **test fixtures**: `generate.mjs` ESM rewrite (QA #30)
453
- - **tsconfig**: pisahkan `tsconfig.build.json` (tanpa path aliases) dan `tsconfig.dev.json` (QA #24)
454
- - **astParser**: zero-let โ€” `loadOxcParseSync()` factory
455
- - **astTransform**: `mode` option dihapus dari destructuring
265
+ ### v6 (setelah v5 stabil)
456
266
 
457
- ### Added
458
- - `packages/domain/shared/src/errors.ts`: standalone TwError file
459
- - `packages/domain/shared/src/generated/`: scaffold untuk auto-generated schemas
460
- - `packages/domain/shared/src/native-schemas.ts`: Zod schemas untuk semua native binding responses (QA #19)
461
- - Engine facade: `scanWorkspace()`, `analyzeWorkspace()`, `generateSafelist()`, `build()`
462
- - `CONTRIBUTING.md`: section "Berkontribusi tanpa Rust" (CRITIQUE-20 #20)
463
- - `docs/plugin-registry.md`: complete documentation (Track B Issue 7)
464
- - `docs/api/engine.md`, `analyzer.md`, `cli.md`: English translation
465
- - `artifacts/.gitkeep`: scaffold untuk RC gate artifacts
466
- - `.github/workflows/plugin-registry-test.yml`: matrix CI (Track B Issue 1)
467
- - `tsconfig.build.json`, `tsconfig.dev.json`: separation of concerns (QA #24)
468
-
469
- ### Tests Added (39 test files, 318 test cases)
470
- - `packages/domain/shared/tests/`: errors, hash, cache, nativeBinding, native-schemas
471
- - `packages/domain/compiler/tests/`: transformSource, extractAllClasses, incrementalEngine, variants, dse
472
- - `packages/domain/engine/tests/`: facade functions
473
- - `packages/domain/scanner/tests/`: isScannableFile, scanFile, scanWorkspace
474
- - `packages/domain/analyzer/tests/`: classToCss, analyzeWorkspace
475
- - `packages/domain/atomic/tests/`: parseAtomicClass, generateAtomicCss, toAtomicClasses
476
- - `packages/domain/preset/tests/`: defaultPreset, designTokens, generateTailwindCss
477
- - `packages/domain/plugin-registry/__tests__/`: 20 integration tests
478
- - `packages/domain/plugin-registry/benchmark/`: SLO benchmark
479
- - `packages/presentation/vue/__tests__/`: cv(), tw(), extend()
480
- - `packages/presentation/svelte/__tests__/`: cv(), tw()
481
- - `packages/domain/testing/__tests__/`: all matchers (18 tests)
482
- - `packages/infrastructure/storybook-addon/tests/`: generateArgTypes, enumerateVariantProps (18 tests)
483
- - `packages/domain/theme/tests/`: liveToken, tokenRef, tokenVar, ThemeRegistry
484
- - `packages/domain/runtime-css/tests/`: batchedInjector
485
- - `packages/domain/runtime/tests/`: cx(), createComponent
486
- - `packages/presentation/vite/tests/`: tailwindStyledPlugin
487
- - `packages/presentation/next/tests/`: withTailwindStyled
488
- - `packages/presentation/rspack/tests/`: TailwindStyledRspackPlugin
489
- - `packages/infrastructure/cli/tests/`: scan (--save), preflight, args
490
- - `packages/domain/plugin-api/tests/`: createPluginRegistry, createPluginContext
491
- - `packages/domain/plugin/tests/`: createTwPlugin, registerTransform
492
- - `packages/domain/animate/tests/`: AnimationRegistry, animate, compileAnimation
493
- - `packages/infrastructure/dashboard/tests/`: state, metrics, normalizeMetrics
494
- - `packages/infrastructure/devtools/tests/`: exports
495
- - `packages/domain/core/tests/`: cv(), cx(), cxm()
496
- - `packages/domain/syntax/tests/`: parseClasses(), extractAllClasses()
497
- - `tests/smoke/`: root-imports, pipeline, adapters
267
+ - [ ] Docs website
268
+ - [ ] HMR di adapter Next.js (sudah ada di Vite)
269
+ - [ ] macOS & Windows binary publish ke npm (CI matrix sudah ready)
270
+ - [ ] Plugin starter/codegen
271
+ - [ ] devtools traces lintas tooling