npm / @figma/code-connect
@figma/code-connect
What changed in @figma/code-connect 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
4 breaking3 new APIs and options1 performance3 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@figma/code-connect 215 changes
Breaking changes 4
The command always generates a parserless template file, including in projects configured for a framework-specific parser.
Unsupported output filenames are rejected with guidance to use
.figma.tsor.figma.js.Framework-specific parsers can now be used only with migrate and unpublish; other commands exit with guidance to migrate to template files.
Framework-specific parsers will no longer receive updates or support; template files are the only actively maintained way to use Code Connect.
New APIs and options 3
Set this environment variable to 1 to disable telemetry of preflight validation failure counts sent by
figma connect publish.Running a command with this flag shows the stack trace for a network request failure.
The command now accepts a component template file declared in a .figma.batch.json file, allowing that component to be previewed individually.
Performance 1
Performance optimizations were made for the preview command.
Behavior and default changes 3
JSON output now includes each connection's source file.
Publishing now sends preflight validation failure counts to Figma; set DO_NOT_TRACK=1 to disable this telemetry.
On Professional plans, publishing now confirms the active library and framework when they are first selected, and explains how to change the selection or upgrade if the limit is exceeded.
Fixes and other changes 4
File discovery now works in project folders with special characters while preserving configured exclusions and project-relative includes with a leading slash.
The command leaves existing template files unchanged and reports success when no components need migrating.
Filtering text layers by parent path no longer crashes, including when the text is inside nested instances.
Network request failures now show the underlying reason, such as a timeout or connection error, instead of only “fetch failed.”