From c15ec1609987d34a0484ce30b0e6947f6f43d5a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 08:45:04 +0200 Subject: [PATCH] Version Packages (#14) Co-authored-by: github-actions[bot] --- .changeset/green-rivers-rest.md | 27 --------------------------- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 29 insertions(+), 28 deletions(-) delete mode 100644 .changeset/green-rivers-rest.md diff --git a/.changeset/green-rivers-rest.md b/.changeset/green-rivers-rest.md deleted file mode 100644 index 20d180f..0000000 --- a/.changeset/green-rivers-rest.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'@divriots/style-dictionary-to-figma': minor ---- - -BREAKING: no longer using default export, this is considered an anti-pattern for JS libraries. [Re-export wildstars with default exports in ESM](https://twitter.com/DasSurma/status/1509835337295609865) is one example quirk, another example is [CommonJS not supporting default exports next to named exports in a single file](https://github.com/divriots/style-dictionary-to-figma/issues/7). Now, the main export is a named export called "transform" and you have to import it as such. - -Before: - -```js -// ESM -import styleDictionaryToFigma from '@divriots/style-dictionary-to-figma'; -// CommonJS -const styleDictionaryToFigma = require('@divriots/style-dictionary-to-figma'); - -styleDictionaryToFigma({...}) // figma object -``` - -After: - -```js -// ESM -import { transform } from '@divriots/style-dictionary-to-figma'; -// CommonJS -const { transform } = require('@divriots/style-dictionary-to-figma'); - -transform({...}) // figma object -``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f78ba..719c719 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # @divriots/style-dictionary-to-figma +## 0.2.0 + +### Minor Changes + +- 00c39e3: BREAKING: no longer using default export, this is considered an anti-pattern for JS libraries. [Re-export wildstars with default exports in ESM](https://twitter.com/DasSurma/status/1509835337295609865) is one example quirk, another example is [CommonJS not supporting default exports next to named exports in a single file](https://github.com/divriots/style-dictionary-to-figma/issues/7). Now, the main export is a named export called "transform" and you have to import it as such. + + Before: + + ```js + // ESM + import styleDictionaryToFigma from '@divriots/style-dictionary-to-figma'; + // CommonJS + const styleDictionaryToFigma = require('@divriots/style-dictionary-to-figma'); + + styleDictionaryToFigma({...}) // figma object + ``` + + After: + + ```js + // ESM + import { transform } from '@divriots/style-dictionary-to-figma'; + // CommonJS + const { transform } = require('@divriots/style-dictionary-to-figma'); + + transform({...}) // figma object + ``` + ## 0.1.3 ### Patch Changes diff --git a/package.json b/package.json index 82235fd..c16a02e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@divriots/style-dictionary-to-figma", - "version": "0.1.3", + "version": "0.2.0", "description": "A utility that transforms a style-dictionary object into something Figma Tokens plugin understands", "license": "MIT", "author": "divRiots ",