Repository navigation
fix(figma): keep literal when redirect replacement cannot be exported - #1537
Merged
Merged
Conversation
…replacements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 0b8d2e2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Resolve conflicts by taking main's squash-merged #1531 and re-applying only the unexportable-replacement fix; replace the already-released changeset. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
Contributor
🧩 Component Schema Changes ReportNo component schema changes detected.This comment was automatically generated by the component schema diff tool. 🤖 |
Contributor
Run report for 0b8d2e2dTotal time: 2m 58s | Comparison time: 4m 59s | Estimated savings: 2m 1s (40.4% faster)
Changed files |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GarthDB
marked this pull request as ready for review
October 21, 2026 20:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged
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.
Description
Follow-up to #1531. When
--redirect-deprecatedfinds that a deprecated token's terminal replacement has a value thatvalue_to_figmacan't convert (for example10dp),compute_redirectsnow skips the redirect. The deprecated token keeps its own literal, and the skip is reported insummary.redirect_skippedas"<token>: replacement '<terminal>' has a value that cannot be exported". Default behavior is unchanged.Related Issue
Beads
spectrum-design-data-0aeb. Follows #1531.Motivation and Context
#1531 checks that the replacement has an exported variable and the same schema class, but not that its value converts for Figma. A deprecated token could be redirected to a replacement that can't be exported. This keeps the literal and reports why instead.
How Has This Been Tested?
moon run sdk:test: passed after merging main (1582 run, 2 skipped), including newredirect_deprecated_keeps_literal_when_replacement_cannot_be_exportedmoon run sdk:lint: passedmoon run sdk:fmt-check: passedmoon run sdk:codegen-check: passedpnpm changeset-lint check --fail-on-warnings: passeddesign-data figma export --redirect-deprecated --dry-runagainst the S2 Web POC file (read-only): 589 deprecated tokens redirected, no new unexportable-replacement skips (the only unexportable value,android-elevation, has no deprecated token pointing to it). Nothing written to Figma.Screenshots (if appropriate):
N/A
Types of changes
Checklist: