-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[react-transform] Support more component definitions & expand tests (#…
…441) * Add transform test for memo'ed components * Handle using memo and forwardRef on components in transform * Remove top-level restriction to transform components written in tests * Add notes about additional tests to add * Add some more tests * Start build test generator * Add call exp wrappers and restructure generators * Align prettier versions * Add var decl, assignment, obj prop, export default & named generation * Simplify hoc tests to only test valid names or not * Always check state first before checking name Since state should be a simple look up while reading name is an AST climb * Rename helpers extension to make TS importing work * Start using helpers in test file * Add TODO to refactor get function name methods * Fix assignment expression tests * Add some notes to assist future debugging * Change formatting a bit * Update transform to parse filename for export default components * WIP: Hook comment generation to tests Tests are failing cuz of bug :) * Fix searching for opt in/out comment through HoCs * Clean up code a bit * Use block comments instead of line comments in generated code * Remove some redundant tests * Remove some redundant helpers * Cover additional test cases * Rename some older tests to make them more scan-able * Support multiple test ids in debug helper * Setup inline variable comment tests * Fix object property tests * Update debug code again * Add some notes at the top of helpers.ts * Refactor function name functions * Add support for components assigned to member expressions * Support object method components * Add changeset * Clean up old tests
- Loading branch information
1 parent
fb6b050
commit 4c433c3
Showing
7 changed files
with
1,596 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@preact/signals-react-transform": patch | ||
--- | ||
|
||
Add support for auto-transforming more ways to specify components: object methods, member assignments, export default components, components wrapped in HoCs like memo and forwardRef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.