Skip to content

Commit

Permalink
sentry release (#995)
Browse files Browse the repository at this point in the history
* Add license key tests

* Add autocomplete to composition tokens (#919)

* skip to start screen when create new file

* resolve test error

* add env

* convert input to DownShiftInput in compositionToken

* modify css

* add color picker

* delete color picker

Co-authored-by: hiroshi <[email protected]>

* Allow root folder git (#902)

* feat: Allow root folder in Git storage

* fix: Fixed subfolder

* chore: Updated tests

* chore: Updated test coverage

* fix: FT-320 fixed subfolders for Gitlab

* fix: Fixed Gitlab push in subfolders

* fix: Fixed Github cache
octokit/octokit.js#890

* fix: Update tests

* Apply border width to specific sides left top right bottom (#925)

* Add border width to specific sides

* remove logs

* wip:

* fix transformer references (#932)

* added expected output

* add composition examples

* fix tests

* Fix composition tokens - resolveReferences: flag

Co-authored-by: razvanpop <[email protected]>

* Tests add cypress test for creating composition tokens (#935)

* skip to start screen when create new file

* resolve test error

* add env

* select composition token

* add cypress test for composition token

* code refresh

* fix: composition token cypress

Co-authored-by: hiroshi <[email protected]>

* bump release of token-transformer

* Create missing tests for src utils alias (#808)

* add test for tokentooltipcontent

* remove usedTokens test

* Fix/ado (#789)

* fix check for ado

* fix: Fixed ADO sync

Co-authored-by: Liam Martens <[email protected]>

* Fix validate calls (#793)

* Fix license validation calls & flags

* Fix tests Initiator

* feat: add tests for URLTokenStorage (#794)

* Bug un applying a token no longer removes token (#791)

* skip to start screen when create new file

* resolve test error

* add env

* check not unapplying tokens

* get pluginValues from findNodesWithData

* check compositionToken unapply error

* fix: remove property when unapplying composition token

Co-authored-by: hiroshi <[email protected]>

* fix type error

* value test

* add alias test

* remove tokentooltipcontent

* add test files

* add contain alias test

* add #value

* merge into one

* Create jest.yml

* Delete jest.yml

* Update node.js.yml

* Add jest coverage (#816)

* add coverage

* remove mock

* fx command

* add coverage option and github_token

* resolve conflict

* add test cases and fix bugs

* fix bug with commit

* resolve conflict

* resolve conflict

* fix test case statement

* install deps

* fix tests for tooltips

* fix alias test

* update test for alias

* fix alias contain test

Co-authored-by: Jan Six <[email protected]>
Co-authored-by: Liam Martens <[email protected]>
Co-authored-by: Razvan <[email protected]>
Co-authored-by: SwordEdge <[email protected]>
Co-authored-by: hiroshi <[email protected]>

* wip: Implement tests

* Ft 103 add ability to import a local file json and a folder (#926)

* Ft 253 tests add cypress test for using the branch switcher (#936)

* wip: Mocking AsyncMessageChannel to work

* fix scrollbar color (#946)

* Multi file sync handle set deletions (#915)

* skip to start screen when create new file

* resolve test error

* add env

* github multifile deletiong and rename

* gitlab multisync deletion & rename

* adomultifile sync deletion and rename

* fix: gitlab remove all files

* modify multifileSchema

* modify test coverage

* fix: reading directory

* fix: adoTokenStorage test coverage

* gitHubTokenStoragetest

* modify writeChangeSet on ado snyc

* remove cache

* modify test coverage fro adoTokenStorage

* add test coverage for delete & rename multi file github sync

* add test coverage for rename delete gitlab multi sync

* add test coverage for delete & rename for add multi sync

* add test coverage for gitHubTokenStorage

* add test coverage when there is no tree on github sync

Co-authored-by: hiroshi <[email protected]>
Co-authored-by: Jan Six <[email protected]>

* feat: Implement working startup logic tests based on actual logic

* feat: Added startup tests with and without license

* fix: Fixed build - cleaning up lockfile

* fix: Increase test coverage

* fix: Fixed build somehow

* Ft 272 gh unable to remove tokens from multiple parent component variants at once (#949)

* Ft 250 tests add cypress test for creating typography boxshadow tokens that reference typography boxshadow tokens (#941)

* Ft 251 tests add cypress test for creating themes based on token sets (#911)

* Losing scroll collapse on switching between tokens sets or main nav tabs (#943)

* skip to start screen when create new file

* resolve test error

* add env

* save collapsedTokenSet in the tokenState

* add collapsedTokenTypeObj to save collapse token type

* add scrollPosition to save scroll position

* remove document.getElementById

* code refresh

* rename function name

* resolve test error

* code review

Co-authored-by: hiroshi <[email protected]>

* fix issue url sync provider gets duplicated on edit (#954)

* move coverage to its own step (#960)

* Ft 271 create test for unrecognized token values (#956)

* Ft 341 gh composition tokens dont pick up values of 0 (#955)

* Ft 340 bugfix branch switch menu scroll doesnt work (#953)

* chore: Updated with PR feedback

* fix: Fixed tests

* fix: scroll color on branchselector

* Documentation value token for 0 cannot be applied (#963)

* skip to start screen when create new file

* resolve test error

* add env

* fix: set documentation value zero

Co-authored-by: hiroshi <[email protected]>

* Read pro features in free (#939)

* add themes dropdown to free users

* add pro badge to branch selector

* remove pro condition to read multi file sync

* make probadge functional

* fix git access when multifile was disabled

* fix tests

* fix test, coverage

* add more tests

* add feature flags to checkandsetaccess

* fix tests

* build(deps): bump shell-quote from 1.7.2 to 1.7.3 (#924)

* fix minor issues with next branch (#967)

* fix minor issues with next branch

* add rc to version

* fix set values on node (#975)

* fix set values on node for text layers

* remove log

* merge tests

* fixes coverage action (#973)

* 982 112rc2 composition token autocomplete doesnt autosuggest border tokens for new individual stroke widths (#987)

* skip to start screen when create new file

* resolve test error

* add env

* choose borderWidth when selecting borderWidthTop

Co-authored-by: hiroshi <[email protected]>

* fix: token sets show as list for free users even when using multi file sync (#983)

* fix set list showing up as list for free-users when using MFS

* bump version

* Add cypress test for using the multi inspector incl remap functionality (#986)

* skip to start screen when create new file

* resolve test error

* add env

* add default tokens

* display applied token on inspector

* remap token

* code refresh

* remove console

* Update cypress/integration/inspector.spec.js

Co-authored-by: hiroshi <[email protected]>
Co-authored-by: Jan Six <[email protected]>

* add sentry config

update md

* adjust config

* adjust yarn file

* ADO sync tokens are being pulled from main instead of the current branch (#971)

* skip to start screen when create new file

* resolve test error

* add env

* fix: sync with ado from current branch

Co-authored-by: hiroshi <[email protected]>
Co-authored-by: Jan Six <[email protected]>

* remove sentryplugin

* adjust script

Co-authored-by: razvanpop <[email protected]>
Co-authored-by: SwordEdge <[email protected]>
Co-authored-by: hiroshi <[email protected]>
Co-authored-by: Liam Martens <[email protected]>
Co-authored-by: MightyDevKnight <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
7 people authored Jul 8, 2022
1 parent 29dd65d commit 60ea3ff
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 11 deletions.
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ cypress/videos
package
.idea
storybook-static
coverage
coverage
.DS_Store
3 changes: 3 additions & 0 deletions .sentryclirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[defaults]
org=figma-tokens
project=figma-tokens
13 changes: 13 additions & 0 deletions .sentryignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
node_modules
settings.json
yarn-error.log
main.css
dist
cypress/screenshots
cypress/videos
.env
.env.production
package
.idea
storybook-static
coverage
46 changes: 46 additions & 0 deletions developer-knowledgebase/creating-a-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Creating a release

## Prerequisites

In order to release a new version, first make sure you have the correct `.env` variables setup.
Important: You'll need to provide the `SENTRY_AUTH_TOKEN` in `.env` as that's where the script is looking for it.


`.env.production`

MIXPANEL_ACCESS_TOKEN=INSERT_MIXPANEL_ACCESS_TOKEN
STORYBLOK_ACCESS_TOKEN=INSERT_STORYBLOK_ACCESS_TOKEN
ENVIRONMENT=production
LICENSE_API_URL=https://figmatokens-api.herokuapp.com
LAUNCHDARKLY_SDK_CLIENT=626fb05d52e5c715abd11b5e

`.env`
SENTRY_AUTH_TOKEN=INSERT_SENTRY_TOKEN
## Bundling the files

Make sure that package.json contains the correct version number in the field `plugin_version`, for example 112.
Then, to create the necessary bundle, run `yarn build`.

## Launching in Figma

Once that is done, launch the plugin in Figma once. Check if the version number is correct and that the plugin is running smooth.

Then you'll need to go to `Manage plugins in development`.
Click on Figma Tokens and choose `Publish a new release`

## Creating a Sentry release

In order to provide source maps for Sentry, we need to publish a release everytime we publish a release in Figma.

To do that, change the VERSION constant of the `script/release.sh` script to match the version that you're publishing (eg 112).

Once that is done and the plugin is published, you can run `bin script/release.sh`.

If that gives you an error, make sure that the file has the required permissions, e.g. `chmod …`

The script basically does the following:

VERSION=VERSION_NUMBER
sentry-cli releases new "$VERSION"
sentry-cli releases -p figma-tokens files "$VERSION" upload-sourcemaps --ext ts --ext tsx --ext map --ext js --ignore-file .sentryignore .
sentry-cli releases finalize "$VERSION"
3 changes: 3 additions & 0 deletions script/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VERSION=112.rc-3
sentry-cli releases new "$VERSION"
sentry-cli releases -p figma-tokens files "$VERSION" upload-sourcemaps --ext ts --ext tsx --ext map --ext js --ignore-file .sentryignore .
3 changes: 3 additions & 0 deletions src/constants/AliasRegex.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
// evaluates start of alias tokens such as $foo or {foo
export const checkAliasStartRegex = /(\$[^\s,]+\w)|({([^]*))/g;

// evaluates tokens such as $foo or {foo}
export const AliasRegex = /(\$[^\s,]+\w)|({([^}]*)})/g;
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"strictNullChecks": true,
"skipLibCheck": true,
"baseUrl": "./",
"sourceMap": true,
"inlineSources": true,
"sourceRoot": "/",
"typeRoots": [
"./node_modules/@types",
"./node_modules/@figma"
Expand Down
23 changes: 13 additions & 10 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = (env, argv) => ({
mode: argv.mode === 'production' ? 'production' : 'development',

// This is necessary because Figma's 'eval' works differently than normal eval
devtool: argv.mode === 'production' ? false : 'inline-source-map',
devtool: argv.mode === 'production' ? 'source-map' : 'inline-source-map',

entry: {
ui: './src/app/index.tsx', // The entry point for your UI code
Expand Down Expand Up @@ -45,14 +45,16 @@ module.exports = (env, argv) => ({
{ test: /\.(png|jpg|gif|webp)$/, use: [{ loader: 'url-loader' }] },
{
test: /\.svg$/,
use: [{
loader: '@svgr/webpack',
options: {
svgoConfig: {
plugins: [{ removeViewBox: false }]
}
}
}],
use: [
{
loader: '@svgr/webpack',
options: {
svgoConfig: {
plugins: [{ removeViewBox: false }],
},
},
},
],
},
{
type: 'javascript/auto',
Expand All @@ -78,6 +80,7 @@ module.exports = (env, argv) => ({

output: {
filename: '[name].js',
sourceMapFilename: "[name].js.map",
path: path.resolve(__dirname, 'dist'), // Compile into a folder called "dist"
},

Expand All @@ -104,6 +107,6 @@ module.exports = (env, argv) => ({
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
}),
],
});

1 comment on commit 60ea3ff

@vercel
Copy link

@vercel vercel bot commented on 60ea3ff Jul 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

figma-tokens – ./

figma-tokens-git-main-six7.vercel.app
figma-tokens.vercel.app
figma-tokens-six7.vercel.app

Please sign in to comment.