diff --git a/.gitignore b/.gitignore index f74dec7..691d21f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ bundle/ bundle-cli webpack-dist bundle-npm +bundle-local diff --git a/CHANGELOG.md b/CHANGELOG.md index c1706bc..ea5fede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# Code Connect v1.1.2 (10th September 2024) + +## Fixed + +### React +- Fixed an issue with `client` export used by the icon script (fixes https://github.com/figma/code-connect/issues/156) + # Code Connect v1.1.1 (10th September 2024) ## Fixed diff --git a/cli/package.json b/cli/package.json index 7232315..e92f202 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@figma/code-connect", - "version": "1.1.1", + "version": "1.1.2", "description": "A tool for connecting your design system components in code with your design system in Figma", "keywords": [], "author": "Figma", @@ -47,7 +47,7 @@ "test:swift": "npm run test -- --runInBand --testPathPattern=e2e_parse_command_swift.test.ts --testPathPattern=e2e_wizard_swift.test.ts --testPathPattern=e2e_parse_command_swift_xcodeproj.test.ts", "test:non-mac": "npm run test -- --testPathIgnorePatterns=e2e_parse_command_swift.test.ts --testPathIgnorePatterns=e2e_wizard_swift.test.ts --testPathIgnorePatterns=e2e_parse_command_swift_xcodeproj.test.ts", "bundle": "npm run build && npm pack && mkdir -p bundle && mv figma-code-connect*.tgz bundle", - "bundle:local": "cp package.json package.json.bak && grep -v 'workspace:' package.json > package.json && npm run build && npm pack && mkdir -p bundle-local && mv figma-code-connect*.tgz bundle-local; mv package.json.bak package.json", + "bundle:local": "cp package.json package.json.bak && grep -v 'workspace:' package.json > package.json.tmp && mv package.json.tmp package.json && npm run build && npm pack && mkdir -p bundle-local && mv figma-code-connect*.tgz bundle-local; mv package.json.bak package.json", "bundle:npm-readme:prepare": "mv README.md ../cli-README.md.bak && cp ../README.md . && npx ts-node ../scripts/make_readme_links_absolute.ts", "bundle:npm-readme:restore": "mv ../cli-README.md.bak README.md", "bundle:npm": "npm run build && npm run bundle:npm-readme:prepare && npm pack && mkdir -p bundle-npm && mv figma-code-connect*.tgz bundle-npm; npm run bundle:npm-readme:restore", diff --git a/cli/scripts/import-icons-size-prop.ts b/cli/scripts/import-icons-size-prop.ts index 8441570..577526f 100644 --- a/cli/scripts/import-icons-size-prop.ts +++ b/cli/scripts/import-icons-size-prop.ts @@ -1,5 +1,5 @@ // change to: "import { client } from '@figma/code-connect'" -import { client } from '../src' +import { client } from '../src/react/index_react' import fs from 'fs' import path from 'path' diff --git a/cli/scripts/import-icons.ts b/cli/scripts/import-icons.ts index 80b6204..19f442b 100644 --- a/cli/scripts/import-icons.ts +++ b/cli/scripts/import-icons.ts @@ -1,5 +1,5 @@ // change to: "import { client } from '@figma/code-connect'" -import { client } from '../src' +import { client } from '../src/react/index_react' import fs from 'fs' async function generateIcons() { diff --git a/cli/src/connect/index_common.ts b/cli/src/connect/index_common.ts index f20e679..f4e556f 100644 --- a/cli/src/connect/index_common.ts +++ b/cli/src/connect/index_common.ts @@ -15,7 +15,7 @@ import { FigmaConnectClient } from '../client/figma_client' export function getClient() { let client: FigmaConnectClient = {} as any if (typeof process !== 'undefined' && process.versions && process.versions.node) { - client = require('./client/external') + client = require('../client/external') } return client }