Skip to content

refactor(core): rename resolveUrl to getDesign - #56

Merged
dryor merged 4 commits into
mainfrom
refactor/rename-resolveurl-to-getdesign
Aug 11, 2026
Merged

refactor(core): rename resolveUrl to getDesign#56
dryor merged 4 commits into
mainfrom
refactor/rename-resolveurl-to-getdesign

Conversation

@dryor

@dryor dryor commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • resolveUrl on FigmaScraperCore named plain URL parsing, but the method authenticates, fetches (with a retry on session expiry), and builds the resulting node/page tree — parsing the URL is just the first step, already handled internally by parseFigmaUrl.
  • Considered scrapeUrl and fetchDesign first, but both name a specific transport mechanism (web scraping, HTTP fetch). FigmaScraperCore is a port precisely so the underlying FigmaNodeSource can swap implementations later (Playwright today, Figma REST API or a Figma plugin bridge tomorrow) without a contract that presupposes one of them. getDesign describes the outcome without committing to how it's obtained.

Test plan

  • pnpm --filter @figtools/core test — 50/50 pass
  • pnpm --filter @figtools/cli test — 78/78 pass
  • pnpm --filter @figtools/core build and pnpm --filter @figtools/cli build — both compile
  • Confirmed no remaining resolveUrl references in the codebase

🤖 Generated with Claude Code

dryor and others added 4 commits August 11, 2026 11:42
resolveUrl implied plain URL parsing; the method actually
authenticates, fetches, retries on session expiry, and builds the
node/page tree. It's also implementation-agnostic by design (the
underlying FigmaNodeSource could be Playwright today, the Figma REST
API or a Figma plugin tomorrow), so the name shouldn't name a
mechanism (scrape, fetch) either.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Merging main (PR #55) brought in a test added after this branch was
cut, still calling the pre-rename resolveUrl.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PR #55 (security fix) merged to main without a changeset, so its
patch bump was never queued. Adding it here alongside this PR's own
changeset since this branch already has main merged in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dryor
dryor merged commit 45cc862 into main Aug 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant