releases.shpreview
Figma/Code Connect

Code Connect

Mon
Wed
Fri
JunJulAugSepOctNovDecJanFebMarAprMay
Less
More
Releases5Avg2/moVersionsv1.4.4 to v1.4.7
v1.4.7

Fixed

General
  • The --file (-f) option on figma connect publish, unpublish, and parse now accepts multiple files, so you can target several Code Connect files in one command (e.g. figma connect publish --file a.figma.ts b.figma.ts). Previously only a single file path was accepted.
  • Tweak retry behavior for publish command to reduce 429s errors
  • Shared flags (--verbose, --token, --config, --dir, --file, --out-file, --out-dir, --api-url, --skip-update-check, --exit-on-unreadable-files, --dry-run) now work whether you write them before or after the subcommand name. Previously, only figma connect publish -v toggled verbose mode; figma connect -v publish was silently ignored.
Compose
  • Fixed a crash that prevented the Code Connect Gradle plugin from being used with projects on Kotlin 2.3 or newer. The plugin now runs Kotlin source parsing in an isolated worker process, so it no longer ships an embedded Kotlin compiler in the consumer's build environment and cannot conflict with the host project's Kotlin Gradle Plugin across version upgrades.
  • Fixed parseCodeConnect / createCodeConnect failing in multi-module Gradle projects when the plugin is applied to more than one subproject. The task now resolves the -PfilePath/-PoutputDir arguments against the root project so every subproject finds the input the CLI wrote at the build root.
  • The Code Connect Gradle tasks now work cleanly with Gradle's configuration cache enabled. Previously, enabling --configuration-cache caused an opaque serialization error; the tasks now store and reuse the configuration cache entry as expected.
v1.4.5

Fixed

General
  • The preview command now prints a clearer single-line message if the preview service is temporarily unavailable, instead of repeating a per-file error.
  • figma connect preview now splits requests into smaller chunks when previewing many components at once, so previews of large component libraries no longer fail with “Payload Too Large” errors.
v1.4.4

Fixed

General
  • Bumped Lodash version from 4.17 to 4.18 to address vulnerability CVE-2021-23337
Storybook
  • Storybook files with .ts, .jsx, or .js extensions (e.g. Button.stories.jsx) are now discovered by the CLI. Previously only .stories.tsx files were picked up.
Template files
  • --exit-on-unreadable-files is now respected for template files (.figma.ts / .figma.js)
  • Fixed batch data not being picked up when rendering Code Connect snippets

Features

General
  • Added --force flag to figma connect publish. When Figma already has UI-created Code Connect mappings for one or more nodes, publishing will now show a warning instead of failing silently. Use --force to overwrite those existing mappings with the Code Connect files from your codebase.
  • The connect create command can now generates template files.
  • Added preview command: you can now run npx figma connect preview {fileUrl} to locally preview a Code Connect file without having to publish it.
Template files
  • Added batch template support (.figma.batch.json + .figma.batch.ts). A batch file defines a shared template and an array of component entries, allowing hundreds of similar components (e.g. icons) to be Code Connected without individual template files. Per-entry data is available in the template via figma.batch.
v1.4.3

Fixed

Template files
  • Fixed getBoolean() returning undefined instead of false when a boolean property is set to false in a template file.
  • Fixed some TS discrepancies in the figma.* API in template files
  • Some fixes for the migration script
Swift & Compose
  • Fixed args inconsistency in Swift and Compose helpers that could cause errors during template rendering.

Features

CLI
  • Added --file (-f) option to parse, publish, and unpublish commands to process a single Code Connect file instead of the entire project (e.g. figma connect parse --file=src/Button.figma.tsx).
Template files
  • The migrate command now outputs TypeScript (.figma.ts) files by default. Pass --javascript to output JavaScript (.figma.js) files instead.
  • The migrate command now outputs import figma from "figma" (ESM syntax) when using the --typescript flag
  • The migrate command now removes __props metadata blocks by default. Pass --include-props to preserve them.
  • Storybook connections can now be migrated by the template migration script
v1.4.2

Fixed

General
  • Fixed incorrect documentUrlSubstitutions when one key is a prefix of another (e.g. SearchInput and SearchInputMenu). The CLI now processes longer keys first so the correct substitution is applied.
  • Publishing with --batch-size now retries automatically on rate-limit (429) and server error (5xx) responses, respecting the Retry-After header when present, rather than failing immediately
  • Fixed an issue around .figma.js/.figma.ts files being incorrectly treated as template files
CLI
  • The --include-template-files flag 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 set defaultBranch in your figma.config.json.
Template files
  • Variant restrictions are now handled by the migrate script. 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 figma API, add "@figma/code-connect/figma-types" to the types array in your tsconfig.json.
    • JavaScript files are the default output of the migrate command. Can pass --typescript to output TypeScript (.figma.ts) files instead.
v1.4.1

Fixed

  • Fixed issue with publishing template files without a source value
v1.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.js instead of .figma.template.js. The old .figma.template.js extension is still fully supported for backwards compatibility.
  • Removed --include-template-files flag. Template files (.figma.js and .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 component and source comment fields (e.g., // component=Button)
v1.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 apiUrl field
  • Add language config 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.
v1.3.12

Fixed

General
  • Fixed a problem with path alias imports incorrectly importing index files
  • Fixed parsing failure for Compose in Windows.
v1.3.11
Swift
  • Fixed a corner case where the swift parser generated invalid code-connect code.
v1.3.10
General
  • Updated glob dependency to 11.0.4 to fix security vulnerability
v1.3.9

Fixed

General
  • Improve response of publish command to display succeeded and failed nodes
Compose / Swift
  • Fixed parsing failure in create command
v1.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.toml Kotlin version to 2.2.21.
v1.3.7

Fixed

General
  • unpublish command 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-syntax dependency to include support for 602.0.0. Thanks to @luispadron for the PR
v1.3.6

Fixed

General
  • Updated npx connect unpublish --node to require a --label param so it can unpublish any label type.
Compose
  • Fixed parsing issue with multi-module projects.
SwiftUI
  • Updated swift-syntax to support 602.0.0. Thanks to @luispadron for the PR
  • Fixed protocol inheritance for Swift 6.2. Thanks to @rmenezes for the PR
v1.3.5

Fixed

General
  • Fixed "Failed to fetch embeddings" error if empty payload in interactive setup
  • Retain the temporary file and directory when --verbose is enabled for improved debugging.
SwiftUI
  • Fixed SourcePackages directory not found.
  • Added optional sourcePackagesPath parameter for when the default derived data folder is not used.
  • Updated swift-syntax to support 601.0.1.
v1.3.3

Features

Compose
  • Enhanced --verbose command to output detailed stacktrace.

Fixed

General
  • Bumped Undici version to address security issue
v1.3.1

Fixed

Features

  • Added interactiveSetupFigmaFileUrl to the interactive setup, allowing you to specify the Figma file to use for connecting components in your figma.config.json file.
  • Rename --include-raw-templates flag to --include-template-files. Further details of this feature can be found in the documentation.
SwiftUI
  • Updated swift-syntax to point to the new URL. Thanks to @pontusJPaf for the PR.
Last Checked
9h ago
Latest
v1.4.7
Tracking since Apr 16, 2024