You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed parser invocation failing when a path or argument contained a space. This affected the Swift parser (Xcode project / Swift package paths), the Compose parser (Gradle wrapper paths), and the custom parser (any user-provided parserCommand referencing a path with spaces).
Template files
Fixed template-only projects unnecessarily building and running a native parser. When every Code Connect file is a parserless template (.figma.ts/.figma.js), the CLI no longer invokes the Swift or Compose parser — which is slow at best and can fail outright (for example a Swift package targeting macOS 12 whose Figma dependency requires macOS 13, producing "the library '...' requires macos 12.0, but depends on the product 'Figma' which requires macos 13.0"). Projects that also contain native source files are unaffected and still run the parser.
Swift
Raised the supported swift-syntax upper bound to allow the 603.x release. Previously the cap below 603 could silently downgrade swift-syntax in projects that depend on both Code Connect and swift-syntax (directly or transitively) on a Swift 6.3 toolchain. Older toolchains remain supported.
Features
General
Added @figma/code-connect/figma-types-no-require, a variant of the template type definitions for projects that have @types/node installed. The default @figma/code-connect/figma-types entry declares a global require (so const figma = require('figma') works without @types/node), but that declaration overrides Node's own require type and causes errors like Property 'resolve' does not exist on require.resolve(...) elsewhere in projects that use @types/node. Such projects can now use "@​figma/code-connect/figma-types-no-require" in their types array instead, adding it to their main tsconfig.json without a separate config. The default entry is unchanged, so no existing setup needs to change.
Template files
Augmented the getSlot API: getSlot('SlotName') still renders the same way, and the returned value now also exposes connectedInstances (the connected instances directly in the slot). This lets you render a slot's connected children inline. For example getSlot('body').connectedInstances.map((c) => c.executeTemplate().example).
React & HTML
Augmented the figma.slot API: figma.slot('SlotName') still maps the slot the same way, and you can now also write figma.slot('SlotName').connectedInstances in a props object to render the slot's code-connected instances inline. For example props: { content: figma.slot('Content').connectedInstances }.
Configuration
📅 Schedule: (in timezone Asia/Tokyo)
Branch creation
At any time (no schedule defined)
Automerge
At any time (no schedule defined)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.4.8→1.4.9Release Notes
figma/code-connect (@figma/code-connect)
v1.4.9Compare Source
Fixed
General
parserCommandreferencing a path with spaces).Template files
.figma.ts/.figma.js), the CLI no longer invokes the Swift or Compose parser — which is slow at best and can fail outright (for example a Swift package targeting macOS 12 whoseFigmadependency requires macOS 13, producing "the library '...' requires macos 12.0, but depends on the product 'Figma' which requires macos 13.0"). Projects that also contain native source files are unaffected and still run the parser.Swift
swift-syntaxupper bound to allow the 603.x release. Previously the cap below 603 could silently downgradeswift-syntaxin projects that depend on both Code Connect andswift-syntax(directly or transitively) on a Swift 6.3 toolchain. Older toolchains remain supported.Features
General
@figma/code-connect/figma-types-no-require, a variant of the template type definitions for projects that have@types/nodeinstalled. The default@figma/code-connect/figma-typesentry declares a globalrequire(soconst figma = require('figma')works without@types/node), but that declaration overrides Node's ownrequiretype and causes errors likeProperty 'resolve' does not existonrequire.resolve(...)elsewhere in projects that use@types/node. Such projects can now use"@​figma/code-connect/figma-types-no-require"in theirtypesarray instead, adding it to their maintsconfig.jsonwithout a separate config. The default entry is unchanged, so no existing setup needs to change.Template files
getSlotAPI:getSlot('SlotName')still renders the same way, and the returned value now also exposesconnectedInstances(the connected instances directly in the slot). This lets you render a slot's connected children inline. For examplegetSlot('body').connectedInstances.map((c) => c.executeTemplate().example).React & HTML
figma.slotAPI:figma.slot('SlotName')still maps the slot the same way, and you can now also writefigma.slot('SlotName').connectedInstancesin apropsobject to render the slot's code-connected instances inline. For exampleprops: { content: figma.slot('Content').connectedInstances }.Configuration
📅 Schedule: (in timezone Asia/Tokyo)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.