Skip to content

Commit

Permalink
Revert "Address code vulnerabilities (#1688)"
Browse files Browse the repository at this point in the history
This reverts commit f9e32a2.
  • Loading branch information
six7 authored Mar 19, 2023
1 parent f9e32a2 commit 7d96f09
Show file tree
Hide file tree
Showing 8 changed files with 21,549 additions and 93,578 deletions.
82 changes: 16 additions & 66 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# caching node_modules
path: node_modules
key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.cache-name }}-
# 3: Install dependencies
- name: Install dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
run: yarn --frozen-lockfile

# 5: Build package
- name: Build Package
run: npm run build
run: yarn build

# 6: Store artifact
- name: Store Artifact
Expand All @@ -64,26 +53,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# 3: Install dependencies.
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# caching node_modules
path: node_modules
key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.cache-name }}-
# This is very unlikely to happen, but we include it anyway in case some cache flushing happens
# 3: Install dependencies
- name: Install dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
run: yarn --frozen-lockfile

# 4: Run tests
- name: Run test command
run: npm run test
run: yarn test
coverage:
name: Test coverage
runs-on: ubuntu-latest
Expand All @@ -97,22 +73,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# 3: Install dependencies.
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# caching node_modules
path: node_modules
key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.cache-name }}-
# This is very unlikely to happen, but we include it anyway in case some cache flushing happens
# 3: Install dependencies
- name: Install dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
run: yarn --frozen-lockfile

# 4: Run test coverage report
- name: Run test coverage report
Expand All @@ -123,7 +86,7 @@ jobs:
runCommand: 'LAUNCHDARKLY_FLAGS=tokenThemes,gitBranchSelector,multiFileSync,tokenFlowButton npx jest --collectCoverageFrom=''["src/**/*.{js,jsx,ts,tsx}"]'' --coverage --collectCoverage=true --coverageDirectory=''./'' --coverageReporters=''json-summary'' --forceExit --detectOpenHandles'
total_delta: 1
delta: 1
afterSwitchCommand: npm ci
afterSwitchCommand: yarn --frozen-lockfile
useSameComment: true
test-transform:
name: Transformer Tests
Expand All @@ -138,34 +101,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# 3: Install dependencies.
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# caching node_modules
path: node_modules
key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.cache-name }}-
# This is very unlikely to happen, but we include it anyway in case some cache flushing happens
# 3: Install dependencies
- name: Install dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
run: yarn --frozen-lockfile

# 4: Build package
- name: build:transform
run: npm run build-transform
run: yarn build-transform

# 5: Install dependencies
- name: Install dependencies - transformer
run: cd token-transformer && npm ci
run: cd token-transformer && yarn --frozen-lockfile

# 6: Run tests
- name: Run test command
run: cd token-transformer && npm run test
run: cd token-transformer && yarn test
cypress-run:
name: Cypress
runs-on: ubuntu-latest
Expand All @@ -178,5 +128,5 @@ jobs:
- name: Cypress run
uses: cypress-io/github-action@v2
with:
build: npm run build:cy
start: npm run serve
build: yarn build:cy
start: yarn serve
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Whenever you apply a token to a layer, the plugin will store hidden information
Most information can be found in the [docs](https://docs.tokens.studio) or [our website](https://tokens.studio).

# Contribute
* Run `npm ci` to install dependencies.
* Run `npm run start` to start webpack in watch mode or `npm run build` to build once.
* Run `yarn` to install dependencies.
* Run `yarn start` to start webpack in watch mode or `yarn build` to build once.
* Open `Figma` -> `Plugins` -> `Development` -> `New Plugin...` and choose `manifest.json` file from this repo.
* Create a Pull request for your branch

Expand Down
Loading

0 comments on commit 7d96f09

Please sign in to comment.