Repository navigation
fix(platform): pick the newest Figma build on Windows (numeric version sort) - #60
Closed
UnKnownnPasta wants to merge 1 commit into
Closed
UnKnownnPasta wants to merge 1 commit into
UnKnownnPasta wants to merge 1 commit into
Conversation
silships
pushed a commit
that referenced
this pull request
Nov 19, 2026
…n sort) (#60) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thank you! This is in figma-cli 2.4.0 on npm: the numeric version sort. Commit e659ff1 keeps you as the author |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Windows,
connectcould patch one Figma build while Figma launched another, sothe debug port never opened.
connectthen sat on "Open a file in Figma to connect"and every command reported "Not connected to Figma".
Figma installs each version in
%LOCALAPPDATA%\Figma\app-<version>. BothfindWindowsFigmaPathandfindWindowsFigmaExechoose the newest folder with.sort().reverse(), which is a plain string sort. As text,app-126.9.16ranksabove
app-126.10.13, so the older build wins.I hit it right after Figma auto-updated:
app-126.9.16,app-126.9.13andapp-126.10.13were all present. The CLI patched 9.16, Figma ran 10.13, whichwas unpatched, so
--remote-debugging-port=9222was passed but ignored (the flagshowed in the process list, nothing listened on 9222).
Fix
Sort the folders numerically, newest first, in both lookups:
Testing
app-126.9.13,app-126.9.16,app-126.10.13:getAsarPath()returnedapp-126.9.16before and returnsapp-126.10.13after.connectpatched the right build, the port opened and the CLIconnected.
npm test: 548 pass, 1 fail. The failure isextract → instantiate roundtrip (gated on a connected Figma), which fails the same way without my change.win32-only block, sotesting it would mean exporting the comparator. Happy to do that if you want it.
Not related to #22 (macOS App Management) or #45 (port only exists when the CLI
launches Figma), although the symptom looks similar.