Fixed
General
- Fixed incorrect
documentUrlSubstitutionswhen one key is a prefix of another (e.g.SearchInputandSearchInputMenu). The CLI now processes longer keys first so the correct substitution is applied. - Publishing with
--batch-sizenow retries automatically on rate-limit (429) and server error (5xx) responses, respecting theRetry-Afterheader when present, rather than failing immediately - Fixed an issue around
.figma.js/.figma.tsfiles being incorrectly treated as template files
CLI
- The
--include-template-filesflag now shows a deprecation warning instead of causing an error. The flag is no longer necessary as template files are automatically included by default.
Features
General
- Code Connect now supports default branch names other than
master/main. For cases where it can't be detected automatically, you can setdefaultBranchin yourfigma.config.json.
Template files
- Variant restrictions are now handled by the
migratescript. These are inlined into one template file with if/else blocks. - TypeScript is now supported for raw template files (
.figma.template.ts/.figma.ts).- ESM import syntax is now supported for the Figma API:
import figma from 'figma' - Type-only imports (
import type) are supported - Other module imports are not yet supported
- To enable types for the
figmaAPI, add"@figma/code-connect/figma-types"to thetypesarray in yourtsconfig.json. - JavaScript files are the default output of the
migratecommand. Can pass--typescriptto output TypeScript (.figma.ts) files instead.
- ESM import syntax is now supported for the Figma API:
Fetched March 26, 2026


