Add a validation for non-existent node-id

Aperta
#337 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
figma, typescript
Ambito
tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
1.6k
Fork
126
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di figma/code-connect

Tutte le issue di figma/code-connect

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.