Skip to content

Commit

Permalink
Merge branch 'main' into extend-lh-value
Browse files Browse the repository at this point in the history
  • Loading branch information
langermank authored Sep 16, 2024
2 parents f4882ab + 8892a4c commit 83e7261
Show file tree
Hide file tree
Showing 36 changed files with 396 additions and 880 deletions.
5 changes: 0 additions & 5 deletions .changeset/bright-lions-push.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/olive-rabbits-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/primitives": patch
---

Update `skeleton` pattern color
19 changes: 9 additions & 10 deletions .github/workflows/a11y-contrast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
changes:
uses: ./.github/workflows/hasChanged.yml


build:
needs: changes
if: needs.changes.outputs.tokens == 'true' || github.event_name == 'workflow_dispatch'
Expand All @@ -32,8 +31,8 @@ jobs:
- name: Install dependencies
run: npm ci --no-audit --no-fund --ignore-scripts

- name: Build v8 tokens
run: npm run build:v8
- name: Build tokens
run: npm run build:tokens

- name: Run required checks
run: |
Expand All @@ -47,7 +46,7 @@ jobs:
script: |
const results = require('./color-contrast-check.json');
const faildChecks = results.reduce((acc, {failingContrast}) => acc + failingContrast, 0);
// prepare comment body
const resultsMarkdown = '## Design Token Contrast Check\n\n' +
results.map(({theme, failingContrast, markdownTable}) =>
Expand All @@ -71,24 +70,24 @@ jobs:
else {
core.info('\u001b[32;1m✅ All contrast checks passed!')
}
- name: Report check results as comment
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const resultsMarkdown = `${{ steps.check-results.outputs.markdown }}`
// get comments
const {data: comments} = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
});
// get token issue
const tokenCheckComment = comments.filter(comment => comment.body.includes('## Design Token Contrast Check'));
// if token issue exists, update it
if(tokenCheckComment.length > 0) {
await github.rest.issues.updateComment({
Expand Down Expand Up @@ -118,7 +117,7 @@ jobs:
// output results to summary
core.summary.addRaw(resultsMarkdown, true)
core.summary.write({overwrite: true})
Fail_action_on_contrast_failing:
needs: build
name: Fail action on contrast failing
Expand Down Expand Up @@ -146,7 +145,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo
});
// get token issue
const tokenCheckComment = comments.filter(comment => comment.body.includes('## Design Token Contrast Check'));
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- name: Install dependencies
run: npm ci --no-audit --no-fund --ignore-scripts

- name: Build v8 tokens
run: npm run build:v8
- name: Build tokens
run: npm run build:tokens

- name: Build fallbacks
run: npm run build:fallbacks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/consumer_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: |
echo "Re-enable this workflow when primer/brand has been updated to usev8 tokens"
echo "Re-enable this workflow when primer/brand has been updated to latest tokens"
# - name: Checkout current repo
# uses: actions/checkout@v4

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Posts a comment listing all the variables that changed in a PR
name: v8 Diff for design tokens
name: Diff for design tokens
on:
pull_request:
branches-ignore:
Expand Down Expand Up @@ -34,18 +34,18 @@ jobs:
run: npm ci --no-audit --no-fund --include=dev --ignore-scripts

- name: Build tokens (pr)
run: npm run build:v8
run: npm run build:tokens

- name: Install dependencies (base)
run: pushd base; npm i --no-audit --no-fund --ignore-scripts; popd

- name: Build tokens (base)
run: pushd base; npm run build:v8; popd
run: pushd base; npm run build:tokens; popd

- name: Install dependecies for diffing
run: npm install shelljs

- name: Diff v8 tokens
- name: Diff tokens
id: diff-files
uses: actions/github-script@v7
with:
Expand All @@ -55,7 +55,7 @@ jobs:
const globber = await glob.create(cssFolder + '/**/**/*.css')
const files = await globber.glob()
const fs = require('fs')
// create file to store diffs
const diffFilePath = 'diff_output.json'
shell.touch(diffFilePath)
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
.filter(item => {
return item.diff !== ''
})
// store diffs in file
fs.writeFileSync(diffFilePath, JSON.stringify(diffs, null, ' '))
Expand All @@ -101,7 +101,7 @@ jobs:
script: |
const fs = require('fs')
const diffFilePath = "${{ steps.diff-files.outputs.diffFilePath }}"
// check if file exists
if(!fs.existsSync(diffFilePath)) {
return
Expand All @@ -110,9 +110,9 @@ jobs:
const diffs = JSON.parse(fs.readFileSync(diffFilePath, 'utf8'))
core.summary.clear()
core.summary.addHeading('V8 Design Token Diff', '1')
core.summary.addHeading('Design Token Diff', '1')
if (diffs.length === 0) {
core.summary.addRaw('No design tokens changed', true)
} else {
Expand All @@ -139,7 +139,7 @@ jobs:
script: |
const fs = require('fs')
const diffFilePath = "${{ steps.diff-files.outputs.diffFilePath }}"
// check if file exists
if(!fs.existsSync(diffFilePath)) {
return
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo
});
// get comment if exists
const existingComment = comments.filter(comment => comment.body.includes('## Design Token Diff'));
Expand All @@ -228,4 +228,4 @@ jobs:
// remove summary
core.summary.clear()
core.summary.write({overwrite: true})
core.summary.write({overwrite: true})
6 changes: 3 additions & 3 deletions .github/workflows/release_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Install dependencies
run: npm ci --no-audit --no-fund --include=dev

- name: Build v8 tokens
run: npm run build:v8
- name: Build tokens
run: npm run build:tokens

- name: Create .npmrc
run: |
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
core.setOutput('packageVersion', package.version);
// Output the package name for next step
core.setOutput('packageName', package.name);
- name: Output canary version to summary
env:
VERSION: ${{ steps.commitStatus.outputs.packageVersion }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Install dependencies
run: npm ci --no-audit --no-fund --include=dev

- name: Build tokens v8
run: npm run build:v8
- name: Build tokens
run: npm run build:tokens

- name: Create .npmrc
run: |
Expand Down Expand Up @@ -71,4 +71,4 @@ jobs:
PACKAGE_NAME: ${{ steps.commitStatus.outputs.packageName }}
run: |
echo "### Latest release candidate" >> $GITHUB_STEP_SUMMARY
echo "[v$VERSION](https://unpkg.com/$PACKAGE_NAME@$VERSION/)" >> $GITHUB_STEP_SUMMARY
echo "[v$VERSION](https://unpkg.com/$PACKAGE_NAME@$VERSION/)" >> $GITHUB_STEP_SUMMARY
4 changes: 2 additions & 2 deletions .github/workflows/update_visual_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
run: npm ci --no-audit --no-fund --ignore-scripts
- name: Install browsers
run: npx playwright install --with-deps
- name: Build v8 tokens
run: npm run build:v8
- name: Build tokens
run: npm run build:tokens
- name: Build storybook
working-directory: docs/storybook
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/visual_regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]

steps:
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build v8 tokens
- name: Build tokens
run: npm run build

- name: Build storybook
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: vrt-runner

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -99,4 +99,4 @@ jobs:

- name: Check vrt-runner job status
if: ${{ needs.vrt-runner.result == 'failure' }}
run: exit 1
run: exit 1
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @primer/primitives

## 9.1.1

### Patch Changes

- [#1043](https://github.com/primer/primitives/pull/1043) [`faead48`](https://github.com/primer/primitives/commit/faead480aceb8a07e2812244d351cdc5d57fa0ad) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Update exports.default to module.exports in commonJs

## 9.1.0

### Minor Changes
Expand Down
Binary file modified blob-report/report.zip
Binary file not shown.
Loading

0 comments on commit 83e7261

Please sign in to comment.