Add a validation for non-existent node-id

Offen
#337 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
figma, typescript
Bereich
tooling

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

feature request

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.

Vorherrschende Sprache
TypeScript
Sterne
1.6k
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus figma/code-connect

Alle Issues in figma/code-connect

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.