Releases: figma/code-connect
Releases · figma/code-connect
Code Connect 1.4.2
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:
Code Connect 1.4.1
Fixed
- Fixed issue with publishing template files without a
sourcevalue
Code Connect 1.4.0
Features
React
- Add support for
figma.slot()to map Figma slot layer properties in Code Connect files.
Parserless
- Added a beta migration script to migrate parser-based Code Connect files to parserless templates under
figma connect migrate. - The default extension for parserless/template files is now
.figma.jsinstead of.figma.template.js. The old.figma.template.jsextension is still fully supported for backwards compatibility. - Removed
--include-template-filesflag. Template files (.figma.jsand.figma.template.js) are now always included when detected. - Add support for
instance.getSlot(name)in templates to reference "slot" properties. - Parserless templates now support optional
componentandsourcecomment fields (e.g.,// component=Button)
Code Connect 1.3.13
Features
- Add --api-url option to use a different code-connect api endpoint. This option can also be configured in figma.config.json with the
apiUrlfield - Add
languageconfig option to override syntax highlighting language in figma.config.json
Parserless
- Syntax highlighting + formatting for parserless templates when publishing with a known label (e.g. React)
Fixed
- Fix crash that occurs when the provided Figma file has no components
- Set version number for annotations gradle plugin
- Security update: upgraded undici to fix CVE-2026-22036. Roll back and report if you encounter networking issues.
- Security update: upgraded lodash to fix CVE-2025-13465.
Code Connect 1.3.12
Fixed
General
- Fixed a problem with path alias imports incorrectly importing index files
- Fixed parsing failure for Compose in Windows.
Code Connect 1.3.11
Swift
- Fixed a corner case where the swift parser generated invalid code-connect code.
Code Connect 1.3.10
General
- Updated glob dependency to 11.0.4 to fix security vulnerability
Code Connect 1.3.9
Fixed
General
- Improve response of publish command to display succeeded and failed nodes
Compose / Swift
- Fixed parsing failure in
createcommand
Code Connect 1.3.8
Fixed
Compose
- Fixed an issue where if there were multiple modules/files connecting to the same FigmaNode the parser only recognize the first module/file found.
- Update
libs.versions.tomlKotlin version to2.2.21.
Code Connect 1.3.7
Fixed
General
unpublishcommand showing success message in certain cases where the action didn't complete properlty.- Fixed path alias imports not being resolved.
Compose
- Released a new Code Connect plugin version (1.2.3) that works with JDK 17.
- Fixed an issue that was happening in the parser where special characters weren't escaped properly, causing snippets to fail to evaluate.
SwiftUI
- Fixed
swift-syntaxdependency to include support for 602.0.0. Thanks to @luispadron for the PR