Skip to content

Commit c4e1275

Browse files
Remove build & source data for v1 tokens
1 parent d2f69e0 commit c4e1275

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+50
-3452
lines changed

.changeset/four-bulldogs-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/primitives': major
3+
---
4+
5+
remove v1 tokens and build process

.eslintignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
CHANGELOG.md
22

3-
43
# Ignore all files relating to v1 tokens
54
# TODO: Remove after v1 tokens have been removed
6-
data/
75
dist/
86
src/@types/
9-
scripts/lib/
10-
scripts/build.ts

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
- name: Install dependencies
2525
run: npm ci --no-audit --no-fund --ignore-scripts
2626

27-
- name: Build v1 tokens
28-
run: npm run build
29-
3027
- name: Build v8 tokens
3128
run: npm run build:v8
3229

.github/workflows/consumer_test.yml

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,49 @@ jobs:
2020
name: Primer Brand
2121
runs-on: ubuntu-latest
2222
steps:
23-
- name: Checkout current repo
24-
uses: actions/checkout@v4
23+
- run: |
24+
echo "Re-enable this workflow when primer/brand has been updated to usev8 tokens"
25+
# - name: Checkout current repo
26+
# uses: actions/checkout@v4
2527

26-
- name: Checkout Primer Brand repo
27-
uses: actions/checkout@v4
28-
with:
29-
repository: primer/brand
30-
path: ${{env.TEST_FOLDER}}
28+
# - name: Checkout Primer Brand repo
29+
# uses: actions/checkout@v4
30+
# with:
31+
# repository: primer/brand
32+
# path: ${{env.TEST_FOLDER}}
3133

32-
- name: Set up Node
33-
uses: actions/setup-node@v4
34-
with:
35-
node-version: 20
34+
# - name: Set up Node
35+
# uses: actions/setup-node@v4
36+
# with:
37+
# node-version: 20
3638

37-
- name: Caching dependencies
38-
uses: actions/cache@v4
39-
with:
40-
path: ~/.npm
41-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
42-
restore-keys: |
43-
${{ runner.os }}-node-
39+
# - name: Caching dependencies
40+
# uses: actions/cache@v4
41+
# with:
42+
# path: ~/.npm
43+
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
44+
# restore-keys: |
45+
# ${{ runner.os }}-node-
4446

45-
- name: Install local dependencies
46-
run: npm install --legacy-peer-deps --ignore-scripts
47+
# - name: Install local dependencies
48+
# run: npm install --legacy-peer-deps --ignore-scripts
4749

48-
- name: Install consumer dependencies (reference)
49-
run: pushd ${{env.TEST_FOLDER}}; npm install --legacy-peer-deps; popd
50+
# - name: Install consumer dependencies (reference)
51+
# run: pushd ${{env.TEST_FOLDER}}; npm install --legacy-peer-deps; popd
5052

51-
- name: Build and pack
52-
run: npm pack
53+
# - name: Build and pack
54+
# run: npm pack
5355

54-
- name: Retrieving package version
55-
id: package-version
56-
uses: martinbeentjes/npm-get-version-action@main
56+
# - name: Retrieving package version
57+
# id: package-version
58+
# uses: martinbeentjes/npm-get-version-action@main
5759

58-
- name: Installing local build
59-
run: |
60-
cd ${{env.TEST_FOLDER}}
61-
cp ../primer-primitives-${{ steps.package-version.outputs.current-version}}.tgz ./
62-
cp ../primer-primitives-${{ steps.package-version.outputs.current-version}}.tgz ./packages/design-tokens
63-
npm install primer-primitives-${{steps.package-version.outputs.current-version}}.tgz --workspace packages/design-tokens
60+
# - name: Installing local build
61+
# run: |
62+
# cd ${{env.TEST_FOLDER}}
63+
# cp ../primer-primitives-${{ steps.package-version.outputs.current-version}}.tgz ./
64+
# cp ../primer-primitives-${{ steps.package-version.outputs.current-version}}.tgz ./packages/design-tokens
65+
# npm install primer-primitives-${{steps.package-version.outputs.current-version}}.tgz --workspace packages/design-tokens
6466

65-
- name: Build consumer tokens
66-
run: pushd ${{env.TEST_FOLDER}}; npm run build --workspace=packages/design-tokens; popd
67+
# - name: Build consumer tokens
68+
# run: pushd ${{env.TEST_FOLDER}}; npm run build --workspace=packages/design-tokens; popd

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
with:
1818
node_version: 20
1919
install: npm ci --legacy-peer-deps --no-audit --no-fund && npm run install:storybook
20-
build: npm run build && npm run build:next && cd docs/storybook && npm run build:prod
20+
build: npm run build:next && cd docs/storybook && npm run build:prod
2121
output_dir: docs/public
2222

.github/workflows/deploy_preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
node_version: 20
1818
install: npm ci --no-audit --no-fund --ignore-scripts && npm run install:storybook
19-
build: npm run build && npm run build:next && cd docs/storybook && npm run build:preview
19+
build: npm run build:next && cd docs/storybook && npm run build:preview
2020
output_dir: docs/public
2121

2222
post_storybook:

.github/workflows/diff.yml

Lines changed: 0 additions & 107 deletions
This file was deleted.

.github/workflows/hasChanged.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ on:
55
outputs:
66
outputAffected:
77
description: "Boolean value indicating changes in any file or folder that has an effect on the output"
8-
value: ${{ jobs.hasChanged.outputs.oldTokens || jobs.hasChanged.outputs.src || jobs.hasChanged.outputs.buildScripts }}
8+
value: ${{ jobs.hasChanged.outputs.src || jobs.hasChanged.outputs.buildScripts }}
99
tokens:
1010
description: "Boolean value indicating change in src/tokens folder"
1111
value: ${{ jobs.hasChanged.outputs.tokens }}
12-
oldTokens:
13-
description: "Boolean value indicating change in data folder"
14-
value: ${{ jobs.hasChanged.outputs.oldTokens }}
1512
src:
1613
description: "Boolean value indicating change in src folder"
1714
value: ${{ jobs.hasChanged.outputs.src }}
@@ -37,7 +34,6 @@ jobs:
3734
outputs:
3835
outputAffected: ${{ steps.filter.outputs.outputAffected }}
3936
tokens: ${{ steps.filter.outputs.tokens }}
40-
oldTokens: ${{ steps.filter.outputs.oldTokens }}
4137
src: ${{ steps.filter.outputs.src }}
4238
scripts: ${{ steps.filter.outputs.scripts }}
4339
buildScripts: ${{ steps.filter.outputs.buildScripts }}
@@ -52,32 +48,27 @@ jobs:
5248
filters: |
5349
tokens:
5450
- 'src/tokens/**'
55-
oldTokens:
56-
- 'data/**'
5751
src:
5852
- 'src/**/**.ts'
5953
- 'src/**/**.json'
6054
- 'src/**/**.json5'
6155
scripts:
6256
- 'scripts/**'
6357
buildScripts:
64-
- 'scripts/build.ts'
6558
- 'scripts/buildTokens.ts'
6659
- 'scripts/themes.config.ts'
6760
- 'tsconfig.json'
68-
- 'tsconfig.build.json'
6961
- 'package.json'
7062
dependencies:
7163
- 'package.json'
7264
- 'package-lock.json'
7365
docs:
7466
- 'docs/**'
7567
- name: Detecting changes that effect output
76-
if: steps.filter.outputs.tokens == 'true' || steps.filter.outputs.oldTokens == 'true' || steps.filter.outputs.src == 'true' || steps.filter.outputs.scripts == 'true' || steps.filter.outputs.dependencies == 'true' || steps.filter.outputs.docs == 'true'
68+
if: steps.filter.outputs.tokens == 'true' || steps.filter.outputs.src == 'true' || steps.filter.outputs.scripts == 'true' || steps.filter.outputs.dependencies == 'true' || steps.filter.outputs.docs == 'true'
7769
run: |
7870
echo Changes detected
7971
echo - tokens: ${{ steps.filter.outputs.tokens }}
80-
echo - oldTokens: ${{ steps.filter.outputs.oldTokens }}
8172
echo - src: ${{ steps.filter.outputs.src }}
8273
echo - scripts: ${{ steps.filter.outputs.scripts }}
8374
echo - buildScripts: ${{ steps.filter.outputs.buildScripts }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: npm ci --no-audit --no-fund && pushd docs; npm ci --no-audit --no-fund; popd
2929

3030
- name: Build tokens
31-
run: npm run build
31+
run: npm run build:next
3232

3333
- id: get-access-token
3434
uses: camertron/github-app-installation-auth-action@v1

.github/workflows/release_canary.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ jobs:
2727
- name: Install dependencies
2828
run: npm ci --no-audit --no-fund --include=dev
2929

30-
- name: Build tokens
31-
run: npm run build
32-
3330
- name: Build v8 tokens
3431
run: npm run build:v8
3532

.github/workflows/release_candidate.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
- name: Install dependencies
2727
run: npm ci --no-audit --no-fund --include=dev
2828

29-
- name: Build tokens
30-
run: npm run build
31-
3229
- name: Build tokens v8
3330
run: npm run build:v8
3431

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
3-
npm run build & npm run test
3+
npm run build:next & npm run test
44
npm run tokenJson:check
55
if npm run lint ; then
66
echo "Lint check passed"

.prettierignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ dist/
44
coverage/
55
storybook-static
66

7-
# Ignore all files relating to v1 tokens
8-
# TODO: Remove after v1 tokens have been removed
9-
data/

data/colors/deprecated.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

data/colors/index.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

data/colors/prefix

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)