Skip to content

Commit

Permalink
chore: upgrade Yarn to a supported version
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Dec 11, 2024
1 parent 86d92bb commit a41f729
Show file tree
Hide file tree
Showing 8 changed files with 15,349 additions and 10,986 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@ jobs:
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v2
id: dist
name: Cache dist
Expand All @@ -50,19 +42,11 @@ jobs:
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v2
id: lint-cache
name: Load lint cache
Expand All @@ -85,20 +69,11 @@ jobs:
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
fi
- uses: actions/setup-node@v1
with:
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
- uses: actions/setup-node@v4
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v2
id: dist
name: Cache dist
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,11 @@ jobs:
run: ./devSetup.sh
shell: bash
if: steps.setup-cache.outputs.cache-hit != 'true'
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v2
id: dist
name: Cache dist
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,11 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v2
id: dist
name: Cache dist
Expand Down
16 changes: 11 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ coverage
.tmp
.eslintcache

# package managers
yarn-error.log
lerna-debug.log

# IDEs and editors
.idea
.project
Expand All @@ -31,4 +27,14 @@ lerna-debug.log
# For vim
*.swp

public
public

# Yarn
# See: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
## Patternfly Design Tokens
# Patternfly Design Tokens

# Export tokens from Figma
## Export tokens from Figma
Information about exporting tokens from the Figma Design Tokens & Styles library is with the [custom exporter](https://github.com/patternfly/design-tokens/tree/main/packages/module/plugins/export-patternfly-tokens).

# Usage
## Prerequisites

Makes sure you have [Node.js](https://nodejs.org/en/download/package-manager) and [Yarn](https://yarnpkg.com/getting-started/install) installed.

## Usage
Once the design token JSON files are exported from Figma to the [tokens directories](https://github.com/patternfly/design-tokens/tree/main/packages/module/tokens), use `yarn build:scss` to build the SCSS files to the /build directory

By default `yarn build:scss` outputs the SCSS with `:root` as a selector, but you can also pass the `--selector` flag (or just `-s` for short) and specify any selector you want, i.e. `yarn build:scss -s .foo` will replace the `:root` selector with `.foo` in the generated SCSS files.

To generate token variables for PatternFly core, use
To generate token variables for PatternFly core, use:

yarn build:scss -s "@mixin pf-v6-tokens"
```sh
yarn build:scss -s "@mixin pf-v6-tokens"
```

`yarn build:docs` and `yarn serve:docs` will build and run the docs locally.

# Note
## Note
We are temporarily pushing the built SCSS files to the repo for ease of access. Additional PRs should rebuild and repush updated SCSS files if they would be affected by the PR changes, to keep them up to date.

# Docs build
## Docs build

Whenever `yarn build:docs` is executed:
- the [build:scss](https://github.com/patternfly/design-tokens/blob/main/packages/module/build.js) script is run which transforms tokens pulled from Figma (split into separate token json files in the `/tokens` directory) into combined default and dark theme files (in addition to the .scss files within `build/css`).
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.0",
"description": "This library provides patternfly extensions",
"license": "MIT",
"packageManager": "[email protected]+sha512.3003a14012e2987072d244c720506549c1aab73ee728208f1b2580a9fd67b92d61ba6b08fe93f6dce68fd771e3af1e59a0afa28dd242dd0940d73b95fedd4e90",
"workspaces": [
"packages/*"
],
Expand All @@ -23,29 +24,28 @@
"serve:a11y": "yarn workspace @patternfly/design-tokens serve:a11y"
},
"devDependencies": {
"react": "^18",
"react-dom": "^18",
"typescript": "^4.7.4",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/preset-flow": "^7.18.6",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"concurrently": "^5.3.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "8.5.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.4",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.21.4",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-config-prettier": "8.5.0",
"prettier": "2.7.1",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-flow": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"serve": "^14.1.2"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"react": "^18",
"react-dom": "^18",
"serve": "^14.1.2",
"typescript": "^4.7.4"
}
}
Loading

0 comments on commit a41f729

Please sign in to comment.