Add a validation for non-existent node-id
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- figma, typescript
- 領域
- tooling
研究方向
Start by reading the publish command’s validation and upload flow to find where linked Figma node IDs are handled; the issue does not name specific files or tests. Check how the command currently reports validation and upload results, then verify the expected behavior for a node ID that no longer resolves. Done means publishing reports the unresolved link as an error or warning, as proposed.
由索引模型根據 Issue 內容生成。
描述
When a component is removed in Figma or moved to another file, the Code Connect link in our codebase becomes stale.
Currently, the publish command still succeeds without errors, even though the linked node-id no longer exists in Figma.
Example CLI output
npx @figma/code-connect connect publish --dir .
No config file found in ., proceeding with default options
Using "react" parser as package.json containing a "react" dependency was found in /Users/xxx/WebstormProjects/xxx. If this is incorrect, please check you are running Code Connect from your project root, or add a `parser` key to your config file. See https://github.com/figma/code-connect for more information.
Validating Code Connect files...
All Code Connect files are valid (9394ms)
Uploading to Figma...
Successfully uploaded to Figma, for Storybook:
-> Icon https://www.figma.com/design/xxx/xxx?node-id=xxx&m=dev
-> Button https://www.figma.com/design/xxx/xxx?node-id=xxx&m=dev
Done.
For context, When I open the "Icon" link, it opens the file on the first page and does not select any node, as it does not exist anymore. I would expect an error that the Icon could not be published.
Proposed change:
The publish script should fail (non-zero exit code) or at least emit an error/warning when any linked Figma node cannot be resolved.
- 主要語言
- TypeScript
- 星號
- 1.6k
- 分支
- 126
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
figma/code-connect 的其他 Issue
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffix未關閉
難度 2/5 1-3 小時 新手友好度 72/100
figma/code-connect#419 ·
-
feature request
難度 2/5 1-3 小時 新手友好度 66/100
figma/code-connect#403 ·
-
feature request
難度 5/5 一週以上 新手友好度 38/100
figma/code-connect#414 ·
-
feature request
難度 4/5 3-5 天 新手友好度 48/100
figma/code-connect#413 · 1 則留言 ·
-
feature request
難度 4/5 3-5 天 新手友好度 54/100
figma/code-connect#412 · 1 則留言 ·
查看 figma/code-connect 的全部 Issue
相似的 Issue
-
bug parity
難度 2/5 1-3 小時 新手友好度 70/100
WenyuChiou/agent-board#1489 ·
維護者通常 1 天內回覆
-
area: bazaar bug complexity: medium
難度 2/5 1-3 小時 新手友好度 74/100
accensa/x402-facilitator-stellar#779 ·
維護者通常 1 天內回覆
-
bug good first issue P4 size:S web-ui
難度 2/5 半天 新手友好度 85/100
josephfung/curia#2600 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
cloudflare/partykit#444 ·