Releases: matieydjato/react-intel
Releases · matieydjato/react-intel
Release list
v0.1.2
v0.1.1
Fixed
- CLI program name reported by
--helpis nowreact-spec-gen(wasreact-intel), matching the published npm package andnpxinvocation.
v0.1.0
Initial public release.
Added
- Zero-config CLI:
npx react-spec-gen <Component.tsx> - AST-based analysis for
.tsx/.jsxcomponents (@babel/parser+@babel/traverse) - Component detection: function declarations, arrow components,
React.FC<Props>, default and named exports - Props extraction from inline types, type aliases, and interfaces — including same-file
extendsand&intersections - Wrapper unwrapping:
React.forwardRef/forwardRef,React.memo/memo, and nested combinations (e.g.memo(forwardRef(...))) - Realistic prop value inference for strings, numbers, booleans, functions, literal & non-literal unions,
ReactNode - Per-value
as conston literal-union props so narrow types are preserved without making sibling array/object props readonly - Edge case detection (boolean flags, optional props, union variants)
- JSX root element detection with implicit ARIA role mapping for accurate
getByRoleassertions - Vitest + React Testing Library test file generation
- Storybook CSF 3 story file generation
--aiflag with pluggableAiProviderarchitecture (mock provider included)- AI enhancer with 10 s timeout, additive validation, and graceful failure (warnings, never throws)
oraspinner during AI runs- Post-write verification checklist (inferred values, assertion quality, event handlers)
-y/--yesflag to skip overwrite confirmation- Programmatic API:
import { run } from "react-spec-gen"
Notes
- Cross-file type resolution is not yet supported;
extends/&referencing external types emit a warning and are skipped. - Generic components and discriminated unions emit a warning and a minimal test.
- Files with multiple exported components pick the default export, falling back to the first.
- Generated tests target Vitest. Jest support is on the roadmap.