Update dependency @figma/code-connect to v1.4.9#2731
Conversation
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2731 +/- ##
=======================================
Coverage 81.80% 81.80%
=======================================
Files 149 149
Lines 2957 2957
Branches 928 934 +6
=======================================
Hits 2419 2419
Misses 504 504
Partials 34 34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bec712e to
8093f98
Compare
352c000 to
8aad1ed
Compare
2843388 to
d559577
Compare
d559577 to
65276cb
Compare
e8236ad to
4a745e1
Compare
4a745e1 to
b3dbd16
Compare
cb13da4 to
7e1f588
Compare
16a8109 to
c2265cd
Compare
15a5b59 to
eea0eb9
Compare
eea0eb9 to
5fa92b2
Compare
5fa92b2 to
96be8df
Compare
07be561 to
fc40b1b
Compare
fc40b1b to
92a2a03
Compare
1753463 to
193fc3d
Compare
38686a1 to
f54c941
Compare
a94fb40 to
2f6aef4
Compare
b1252e1 to
db99ebe
Compare
db99ebe to
dae728a
Compare
94509a2 to
2010514
Compare
2010514 to
e89edcc
Compare
This PR contains the following updates:
1.3.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 }.v1.4.8Compare Source
Fixed
General
@figma/code-connectin Storybook or webpack environments would fail with "Can't resolve 'child_process'" or "Console is not a constructor" errors. Node.js-only modules (child_process,console) are now imported dynamically only when needed by CLI commands, making the package safe to use in browser environments.Template files
getInstanceSwap(...)?.executeTemplate is not a function" error that could break a template whengetInstanceSwap('prop')referenced an instance-swap property that isn't present on the selected node (for example a property that is conditionally hidden by a boolean). The missing property now renders an inline error, consistent with the other accessors, instead of failing the whole template.figma.textContent('...')helper) producing a TypeScript error and silently rendering nothing when the layer was missing. Migration now preserves the original behavior — the text renders when the layer is found, and a clear error is shown when it isn't.Features
Template files
figma connect migratecommand now uses the same--dirand--filefiltering behavior aspublish,parse, andunpublish. The migrate-only positional glob argument has been removed.figma connect migratecommand can now migrate compatible large source files into batch template files. Files with 10 or more Code Connect docs are attempted automatically,--batch allforces a batch attempt, and--batch nonedisables batch migration.v1.4.7Compare Source
Fixed
General
--file(-f) option onfigma connect publish,unpublish, andparsenow 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.publishcommand to reduce 429s errors--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, onlyfigma connect publish -vtoggled verbose mode;figma connect -v publishwas silently ignored.Compose
parseCodeConnect/createCodeConnectfailing in multi-module Gradle projects when the plugin is applied to more than one subproject. The task now resolves the-PfilePath/-PoutputDirarguments against the root project so every subproject finds the input the CLI wrote at the build root.--configuration-cachecaused an opaque serialization error; the tasks now store and reuse the configuration cache entry as expected.v1.4.5Compare Source
Fixed
General
previewcommand now prints a clearer single-line message if the preview service is temporarily unavailable, instead of repeating a per-file error.figma connect previewnow 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.4Compare Source
Fixed
General
Storybook
.ts,.jsx, or.jsextensions (e.g.Button.stories.jsx) are now discovered by the CLI. Previously only.stories.tsxfiles were picked up.Template files
--exit-on-unreadable-filesis now respected for template files (.figma.ts/.figma.js)Features
General
--forceflag tofigma 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--forceto overwrite those existing mappings with the Code Connect files from your codebase.connect createcommand can now generates template files.previewcommand: you can now runnpx figma connect preview {fileUrl}to locally preview a Code Connect file without having to publish it.Template files
.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 viafigma.batch.v1.4.3Compare Source
Fixed
Template files
getBoolean()returningundefinedinstead offalsewhen a boolean property is set tofalsein a template file.figma.*API in template filesSwift & Compose
Features
CLI
--file(-f) option toparse,publish, andunpublishcommands to process a single Code Connect file instead of the entire project (e.g.figma connect parse --file=src/Button.figma.tsx).Template files
migratecommand now outputs TypeScript (.figma.ts) files by default. Pass--javascriptto output JavaScript (.figma.js) files instead.migratecommand now outputsimport figma from "figma"(ESM syntax) when using the--typescriptflagmigratecommand now removes__propsmetadata blocks by default. Pass--include-propsto preserve them.v1.4.2Compare Source
Fixed
General
documentUrlSubstitutionswhen one key is a prefix of another (e.g.SearchInputandSearchInputMenu). The CLI now processes longer keys first so the correct substitution is applied.--batch-sizenow retries automatically on rate-limit (429) and server error (5xx) responses, respecting theRetry-Afterheader when present, rather than failing immediately.figma.js/.figma.tsfiles being incorrectly treated as template filesCLI
--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
master/main. For cases where it can't be detected automatically, you can setdefaultBranchin yourfigma.config.json.Template files
migratescript. These are inlined into one template file with if/else blocks..figma.template.ts/.figma.ts).import figma from 'figma'import type) are supportedfigmaAPI, add"@​figma/code-connect/figma-types"to thetypesarray in yourtsconfig.json.migratecommand. Can pass--javascriptto output JavaScript (.figma.js) files instead.v1.4.1Compare Source
Fixed
sourcevaluev1.4.0Compare Source
Features
React
figma.slot()to map Figma slot layer properties in Code Connect files.Parserless
figma connect migrate..figma.jsinstead of.figma.template.js. The old.figma.template.jsextension is still fully supported for backwards compatibility.--include-template-filesflag. Template files (.figma.jsand.figma.template.js) are now always included when detected.instance.getSlot(name)in templates to reference "slot" properties.componentandsourcecomment fields (e.g.,// component=Button)v1.3.13Compare Source
Features
apiUrlfieldlanguageconfig option to override syntax highlighting language in figma.config.jsonParserless
Fixed
v1.3.12Compare Source
General
Fixed
v1.3.11Compare Source
Swift
v1.3.10Compare Source
Fixed
General
v1.3.9Compare Source
Fixed
General
Compose / Swift
createcommandConfiguration
📅 Schedule: (in timezone Asia/Seoul)
* 10-19 1-7 * MON)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.