Skip to content

Commit 00068f2

Browse files
zahnsterSiTaggart
andauthored
chore: yarn v3 upgrade (#1952)
* chore(yarn3): run yarn migration * chore(yarn3): yarn3 update, gitignore update * chore(yarn3): update scripts to account for lack of prescript hooks * chore(yarn3): lock eslint related deps, add eslintignore rules * chore(yarn3): remove glob in lint script so lint gets the right files * chore(yarn3): update netlify-cli and add to projects, remove old script * chore(yarn3): update deprecated yarn flag * chore: try some caching and limiting workspaces * chore: netlify build from config, get cypress running * chore: replace lerna requirement in scripts * chore(yarn3): add form package to modal * chore(yarn3): yarn3 cleanup * chore(yarn3): placeholder bootstrap command * chore(yarn3): use fork of compressed-size-action * chore(yarn3): revert back to lerna for perf * chore(yarn3): empty bootstrap * fix: try unsetting the yarn version in config Co-authored-by: Si Taggart <[email protected]>
1 parent 3987a47 commit 00068f2

File tree

25 files changed

+51704
-184217
lines changed

25 files changed

+51704
-184217
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ packages/paste-token-contrast-checker/public
1616
.next
1717
.yarn
1818

19+
packages/**/dist/*
20+
1921
tsconfig.build.tsbuildinfo
2022
**/*.d.ts

.eslintrc.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,4 @@ module.exports = {
105105
// We don't use jasmine and this clashes with danger js
106106
'jest/no-jasmine-globals': 'off',
107107
},
108-
settings: {
109-
'import/resolver': {
110-
[path.join(__dirname, './.eslint/resolver')]: {
111-
someConfig: '',
112-
},
113-
node: {
114-
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
115-
},
116-
},
117-
},
118108
};

.github/workflows/cypress.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@ jobs:
1616
with:
1717
node-version: 12.x
1818

19-
- name: Get yarn cache
20-
id: yarn-cache
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
19+
- name: Get yarn cache directory path
20+
id: yarn-cache-dir-path
21+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
2222

23-
- uses: actions/cache@v2
24-
name: Load Yarn cache
23+
- name: Load Yarn cache
24+
uses: actions/cache@v2
25+
id: yarn_cache_id
2526
with:
26-
path: ${{ steps.yarn-cache.outputs.dir }}
27+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
2728
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2829
restore-keys: |
2930
${{ runner.os }}-yarn
3031
3132
- name: Install Dependencies
32-
run: yarn install --frozen-lockfile && yarn bootstrap
33+
run: yarn install --immutable
3334

3435
- name: Build packages
3536
run: yarn build

.github/workflows/package-size.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,19 @@ jobs:
1414
with:
1515
node-version: 12.x
1616

17-
- uses: preactjs/compressed-size-action@v2
17+
- name: Get yarn cache directory path
18+
id: yarn-cache-dir-path
19+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
20+
21+
- name: Load Yarn cache
22+
uses: actions/cache@v2
23+
id: yarn_cache_id
24+
with:
25+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-yarn
29+
- uses: zahnster/[email protected]
1830
with:
1931
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2032
build-script: "build:js"

.github/workflows/publish.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,21 @@ jobs:
2020
with:
2121
node-version: 12.x
2222

23-
- id: yarn-cache
24-
name: Get Yarn cache path
25-
run: echo "::set-output name=dir::$(yarn cache dir)"
23+
- name: Get yarn cache directory path
24+
id: yarn-cache-dir-path
25+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
2626

27-
- uses: actions/cache@v2
28-
name: Load Yarn cache
27+
- name: Load Yarn cache
28+
uses: actions/cache@v2
29+
id: yarn_cache_id
2930
with:
30-
path: ${{ steps.yarn-cache.outputs.dir }}
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3132
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3233
restore-keys: |
3334
${{ runner.os }}-yarn
3435
3536
- name: Install Dependencies
36-
run: yarn install --frozen-lockfile && yarn bootstrap
37+
run: yarn install --immutable
3738

3839
- name: Setup CI Git User
3940
run: |

.github/workflows/pull_request.yml

Lines changed: 25 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
with:
1515
node-version: 12.x
1616

17-
- name: Get yarn cache
18-
id: yarn-cache
19-
run: echo "::set-output name=dir::$(yarn cache dir)"
17+
- name: Get yarn cache directory path
18+
id: yarn-cache-dir-path
19+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
2020

2121
- name: Load Yarn cache
2222
uses: actions/cache@v2
2323
id: yarn_cache_id
2424
with:
25-
path: ${{ steps.yarn-cache.outputs.dir }}
25+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
2626
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2727
restore-keys: |
2828
${{ runner.os }}-yarn
@@ -38,10 +38,7 @@ jobs:
3838

3939
- name: Install Dependencies
4040
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
41-
run: yarn install --frozen-lockfile
42-
43-
- name: Bootstrap lerna
44-
run: yarn bootstrap
41+
run: yarn install --immutable
4542

4643
- name: Build packages
4744
run: yarn build
@@ -60,15 +57,15 @@ jobs:
6057
with:
6158
node-version: 12.x
6259

63-
- name: Get yarn cache
64-
id: yarn-cache
65-
run: echo "::set-output name=dir::$(yarn cache dir)"
60+
- name: Get yarn cache directory path
61+
id: yarn-cache-dir-path
62+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
6663

6764
- name: Load Yarn cache
6865
uses: actions/cache@v2
6966
id: yarn_cache_id
7067
with:
71-
path: ${{ steps.yarn-cache.outputs.dir }}
68+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
7269
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
7370
restore-keys: |
7471
${{ runner.os }}-yarn
@@ -84,10 +81,7 @@ jobs:
8481

8582
- name: Install Dependencies
8683
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
87-
run: yarn install --frozen-lockfile
88-
89-
- name: Bootstrap lerna
90-
run: yarn bootstrap
84+
run: yarn install --immutable
9185

9286
- name: Build packages
9387
run: yarn build
@@ -106,15 +100,15 @@ jobs:
106100
with:
107101
node-version: 12.x
108102

109-
- name: Get yarn cache
110-
id: yarn-cache
111-
run: echo "::set-output name=dir::$(yarn cache dir)"
103+
- name: Get yarn cache directory path
104+
id: yarn-cache-dir-path
105+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
112106

113107
- name: Load Yarn cache
114108
uses: actions/cache@v2
115109
id: yarn_cache_id
116110
with:
117-
path: ${{ steps.yarn-cache.outputs.dir }}
111+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
118112
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
119113
restore-keys: |
120114
${{ runner.os }}-yarn
@@ -130,10 +124,7 @@ jobs:
130124

131125
- name: Install Dependencies
132126
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
133-
run: yarn install --frozen-lockfile
134-
135-
- name: Bootstrap lerna
136-
run: yarn bootstrap
127+
run: yarn install --immutable
137128

138129
- name: Build packages
139130
run: yarn build
@@ -152,15 +143,15 @@ jobs:
152143
with:
153144
node-version: 12.x
154145

155-
- name: Get yarn cache
156-
id: yarn-cache
157-
run: echo "::set-output name=dir::$(yarn cache dir)"
146+
- name: Get yarn cache directory path
147+
id: yarn-cache-dir-path
148+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
158149

159150
- name: Load Yarn cache
160151
uses: actions/cache@v2
161152
id: yarn_cache_id
162153
with:
163-
path: ${{ steps.yarn-cache.outputs.dir }}
154+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
164155
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
165156
restore-keys: |
166157
${{ runner.os }}-yarn
@@ -176,10 +167,7 @@ jobs:
176167

177168
- name: Install Dependencies
178169
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
179-
run: yarn install --frozen-lockfile
180-
181-
- name: Bootstrap lerna
182-
run: yarn bootstrap
170+
run: yarn install --immutable
183171

184172
- name: Build packages
185173
run: yarn build
@@ -196,14 +184,14 @@ jobs:
196184
uses: actions/setup-node@v2
197185
with:
198186
node-version: 12.x
199-
- name: Get yarn cache
200-
id: yarn-cache
201-
run: echo "::set-output name=dir::$(yarn cache dir)"
187+
- name: Get yarn cache directory path
188+
id: yarn-cache-dir-path
189+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
202190
- name: Load Yarn cache
203191
uses: actions/cache@v2
204192
id: yarn_cache_id
205193
with:
206-
path: ${{ steps.yarn-cache.outputs.dir }}
194+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
207195
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
208196
restore-keys: |
209197
${{ runner.os }}-yarn
@@ -217,9 +205,7 @@ jobs:
217205
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
218206
- name: Install Dependencies
219207
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
220-
run: yarn install --frozen-lockfile
221-
- name: Bootstrap lerna
222-
run: yarn bootstrap
208+
run: yarn install --immutable
223209
- name: Run DangerJS
224210
run: yarn danger ci
225211
env:

.github/workflows/vrt_main.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323
with:
2424
node-version: 12.x
2525

26-
- name: Get yarn cache
27-
id: yarn-cache
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
26+
- name: Get yarn cache directory path
27+
id: yarn-cache-dir-path
28+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
2929

3030
- name: Load Yarn cache
3131
uses: actions/cache@v2
3232
id: yarn_cache_id
3333
with:
34-
path: ${{ steps.yarn-cache.outputs.dir }}
34+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3535
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3636
restore-keys: |
3737
${{ runner.os }}-yarn
@@ -47,10 +47,7 @@ jobs:
4747

4848
- name: Install Dependencies
4949
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
50-
run: yarn install --frozen-lockfile && yarn bootstrap
51-
52-
- name: Bootstrap lerna
53-
run: yarn bootstrap
50+
run: yarn install --immutable
5451

5552
- name: Build packages
5653
run: yarn build

.github/workflows/vrt_pull_request.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
with:
2121
node-version: 12.x
2222

23-
- name: Get yarn cache
24-
id: yarn-cache
25-
run: echo "::set-output name=dir::$(yarn cache dir)"
23+
- name: Get yarn cache directory path
24+
id: yarn-cache-dir-path
25+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
2626

2727
- name: Load Yarn cache
2828
uses: actions/cache@v2
2929
id: yarn_cache_id
3030
with:
31-
path: ${{ steps.yarn-cache.outputs.dir }}
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3232
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3333
restore-keys: |
3434
${{ runner.os }}-yarn
@@ -44,10 +44,7 @@ jobs:
4444

4545
- name: Install Dependencies
4646
if: steps.yarn_cache_id.outputs.cache-hit != 'true' || steps.node_modules_cache_id.outputs.cache-hit != 'true'
47-
run: yarn install --frozen-lockfile && yarn bootstrap
48-
49-
- name: Bootstrap lerna
50-
run: yarn bootstrap
47+
run: yarn install --immutable
5148

5249
- name: Build packages
5350
run: yarn build

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,12 @@ cypress/screenshots
9292

9393
# Local Netlify folder
9494
.netlify
95+
96+
# Yarn Folders
97+
.pnp.*
98+
.yarn/*
99+
!.yarn/patches
100+
!.yarn/plugins
101+
!.yarn/releases
102+
!.yarn/sdks
103+
!.yarn/versions

0 commit comments

Comments
 (0)