@fictjs/compiler 0.8.0 → 0.10.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.
- package/README.md +19 -0
- package/dist/index.cjs +1052 -222
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +1052 -222
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,7 +39,17 @@ createFictPlugin({
|
|
|
39
39
|
|
|
40
40
|
- `dev` (default: `NODE_ENV !== 'production' && NODE_ENV !== 'test'`): enables compiler warnings/diagnostics. Set to `false` to silence warnings.
|
|
41
41
|
- `onWarn`: custom warning handler (only called when `dev` is enabled).
|
|
42
|
+
- `fineGrainedDom` (default: `true`): emits template-first fine-grained DOM operations for supported JSX.
|
|
43
|
+
- `lazyConditional` (default: `true`): enables control-flow lazy lowering for reactive branch returns where supported.
|
|
44
|
+
- `getterCache` (default: `true`): caches repeated getter reads within the same synchronous block.
|
|
45
|
+
- `optimize` (default: `true`): enables optimizer passes.
|
|
46
|
+
- `optimizeLevel` (default: `'safe'`): conservative algebraic optimization level.
|
|
42
47
|
- `inlineDerivedMemos` (default: `true`): allow the compiler to inline single-use derived values. Set to `false` for a “strict memo” mode where user-named derived values keep explicit memo accessors (unless `"use no memo"` disables memoization).
|
|
48
|
+
- `strictReactivity` (default: `false`): treat control-flow fallback diagnostics (`FICT-R003`, `FICT-R006`) as build errors. Useful for CI gates that require deterministic fine-grained reactivity without fallback paths.
|
|
49
|
+
- `strictGuarantee` (default: `true`): fail-closed mode for reactivity guarantees. Non-guaranteed reactivity diagnostics (including control-flow fallback and props fallback classes) are treated as hard errors and cannot be suppressed/downgraded.
|
|
50
|
+
- Opt-out: set `strictGuarantee: false` to compile in non-strict mode.
|
|
51
|
+
- CI override: set `FICT_STRICT_GUARANTEE=1` to force-enable `strictGuarantee` even when options request opt-out.
|
|
52
|
+
- Contract fixtures: see `packages/compiler/test/reactivity-guarantee-contract.test.ts` for the maintained guarantee/fallback/unsupported matrix checks.
|
|
43
53
|
- `emitModuleMetadata`:
|
|
44
54
|
- `true`: always write adjacent `.fict.meta.json` sidecar files next to source files.
|
|
45
55
|
- `false`: never write metadata files.
|
|
@@ -49,3 +59,12 @@ createFictPlugin({
|
|
|
49
59
|
- `reactiveScopes`: function names whose **first callback argument** is treated as a component-like reactive scope.
|
|
50
60
|
- Only **direct calls** are recognized (e.g., `renderHook(() => ...)` or `utils.renderHook(() => ...)`).
|
|
51
61
|
- **Aliases/indirect calls** are not recognized (e.g., `const rh = renderHook; rh(() => ...)`).
|
|
62
|
+
|
|
63
|
+
## Recommended Profiles
|
|
64
|
+
|
|
65
|
+
Use `docs/config-profiles.md` for copy-paste presets:
|
|
66
|
+
|
|
67
|
+
- strict default app profile (`strictGuarantee: true`)
|
|
68
|
+
- CI hard-gate profile
|
|
69
|
+
- migration/benchmark profile (`strictGuarantee: false`)
|
|
70
|
+
- one-shot build profile (`emitModuleMetadata: false`)
|