-
Notifications
You must be signed in to change notification settings - Fork 46
Add Code Link Plugin and CLI #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
85f2cc0 to
82924c4
Compare
82924c4 to
1d341eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment @cursor review or bugbot run to trigger another review on this PR
|
|
||
| let name = sanitizedVariableName(inputName) ?? "MyComponent" | ||
| if ( | ||
| (!hasValidExtension(extension) || extension === tsxExtension) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Extension comparison always fails due to dot mismatch
The comparison extension === tsxExtension will always be false. The splitExtension function returns the extension without the leading dot (e.g., "tsx"), but tsxExtension is defined as ".tsx" with a dot. This means "tsx" === ".tsx" is never true. Additionally, hasValidExtension(extension) is called with just the extension string rather than a full filename, causing it to always return false since its regex expects a dot before the extension. These two bugs compound but accidentally produce correct behavior for the CLI because it always passes capitalizeReactComponent=false. However, if the shared library is used with the default parameter, all file types would be capitalized instead of just .tsx files.
Additional Locations (1)
| debug(` Local unchanged, remote changed -> REMOTE`) | ||
| autoResolvedRemote.push(conflict) | ||
| } else if (remoteUnchanged && localClean) { | ||
| debug(` Both unchanged, skipping`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Conflicts silently dropped when both sides appear unchanged
When autoResolveConflicts encounters a conflict where both remoteUnchanged and localClean are true, the conflict is logged as "skipping" but not added to any of the three result arrays (autoResolvedLocal, autoResolvedRemote, or remainingConflicts). This means the conflict is silently dropped. Since conflicts only exist when content differs, this edge case represents a logical inconsistency that gets ignored rather than resolved. The sync completes successfully and transitions to watching mode, but the files remain out of sync with no user notification. This could happen due to timestamp drift or other timing issues, leading to persistent data inconsistency between local and remote files.
|
This PR has been automatically marked as stale because it has not had any activity in the last 7 days. It will be closed if no further activity occurs in the next 7 days. |
Description
Adds a Code Link Plugin and
framer-code-linkCLI tool for a 2-way link between code files in framer and local filesystem.Todo
Testing