Skip to content

Commit 3542f19

Browse files
committed
chore: upgrade Yarn to a supported version
Closes #9959 Signed-off-by: Jon Koops <jonkoops@gmail.com>
1 parent 71d32a6 commit 3542f19

16 files changed

Lines changed: 22625 additions & 16605 deletions

File tree

.github/actions/setup-project/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ runs:
1717
node-version: 20
1818
check-latest: true
1919

20+
- name: Enable Corepack
21+
shell: bash
22+
run: corepack enable
23+
2024
- name: Get Yarn configuration
2125
id: yarn-config
2226
shell: bash
2327
run: |
24-
echo "cache-directory=$(yarn cache dir)" >> $GITHUB_OUTPUT
28+
echo "cache-folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
2529
2630
# TODO: This can be simplified to use the `cache` option of the `actions/setup-node` action when it supports Corepack.
2731
# See: https://github.com/actions/setup-node/issues/531
@@ -31,14 +35,14 @@ runs:
3135
# Also cache Cypress binary.
3236
path: |
3337
~/.cache/Cypress
34-
${{ steps.yarn-config.outputs.cache-directory }}
38+
${{ steps.yarn-config.outputs.cache-folder }}
3539
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('yarn.lock') }}
3640
restore-keys: |
3741
${{ runner.os }}-yarn-cache-
3842
3943
- name: Install dependencies
4044
shell: bash
41-
run: yarn install --frozen-lockfile
45+
run: yarn install --immutable
4246

4347
- uses: actions/cache@v4
4448
if: inputs.skip-build != 'true' && inputs.skip-build-cache != 'true'

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ git fetch upstream
194194

195195
2. Set up tooling
196196

197-
[Install Node.js](https://nodejs.org/en/download/package-manager) version 20 (or higher). Then install the project dependencies and build it by running:
197+
[Install Node.js](https://nodejs.org/en/download/package-manager) version 20 (or higher), and make sure to [enable Corepack](https://nodejs.org/api/corepack.html). Then install the project dependencies and build it by running:
198198

199199
```sh
200200
yarn install

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Before you begin, check out this [overview of PatternFly](http://patternfly.org/
4545
Install a package manager before using the PatternFly libraries.
4646

4747
* [Use npm](https://nodejs.org/en/download/package-manager)
48-
* [Use Yarn](https://yarnpkg.com/en/docs/getting-started)
48+
* [Use Yarn](https://yarnpkg.com/getting-started/install)
4949

5050

5151
#### Start with PatternFly React seed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"url": "https://github.com/patternfly/patternfly-react.git"
99
},
1010
"engines": {
11-
"node": ">=20",
12-
"yarn": ">=1.6.0"
11+
"node": ">=20"
1312
},
13+
"packageManager": "yarn@4.2.2+sha512.c44e283c54e02de9d1da8687025b030078c1b9648d2895a65aab8e64225bfb7becba87e1809fc0b4b6778bbd47a1e2ab6ac647de4c5e383a53a7c17db6c3ff4b",
1414
"keywords": [
1515
"react",
1616
"patternfly",
@@ -38,6 +38,7 @@
3838
"@testing-library/react": "^16.0.0",
3939
"@testing-library/user-event": "^14.5.2",
4040
"@types/jest": "29.5.12",
41+
"@types/node": "^20.12.7",
4142
"@types/react": "^18",
4243
"@types/react-dom": "^18",
4344
"@typescript-eslint/eslint-plugin": "^5.62.0",
@@ -86,7 +87,7 @@
8687
"clean:build": "rimraf .cache .eslintcache coverage",
8788
"clean:exports": "lerna run clean:exports --parallel --stream",
8889
"generate": "yarn plop",
89-
"lint": "node --max-old-space-size=4096 node_modules/.bin/eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
90+
"lint": "eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
9091
"lint:all": "yarn lint:md && yarn lint:versions && yarn lint:ts",
9192
"lint:md": "yarn eslint packages --ext md --no-eslintrc --config .eslintrc-md.json --cache --cache-strategy content",
9293
"lint:ts": "yarn lint packages/*/src",
@@ -119,6 +120,5 @@
119120
"packages": [
120121
"packages/**"
121122
]
122-
},
123-
"dependencies": {}
123+
}
124124
}

packages/eslint-plugin-patternfly-react/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "eslint-plugin-patternfly-react",
33
"version": "5.4.0-prerelease.3",
4-
"private": false,
54
"main": "./lib/index.js",
65
"license": "MIT",
76
"publishConfig": {

packages/react-core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@patternfly/react-icons": "^5.4.0-prerelease.5",
5050
"@patternfly/react-styles": "^5.4.0-prerelease.6",
5151
"@patternfly/react-tokens": "^5.4.0-prerelease.5",
52+
"file-selector": "^0.6.0",
5253
"focus-trap": "7.5.4",
5354
"react-dropzone": "^14.2.3",
5455
"tslib": "^2.6.2"

packages/react-core/src/components/Nav/__tests__/Generated/NavList.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import { render } from '@testing-library/react';
4-
import * as ReactCoreUtils from '@patternfly/react-core/src/helpers/util';
4+
import * as ReactCoreUtils from '../../../../helpers/util';
55

66
import { NavList } from '../../NavList';
77
import { NavContext } from '../../Nav';

packages/react-core/src/components/TextInput/__tests__/TextInput.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event';
55

66
import { TextInput, TextInputBase } from '../TextInput';
77
import { ValidatedOptions } from '../../../helpers/constants';
8-
import * as ReactCoreUtils from '@patternfly/react-core/src/helpers/util';
8+
import * as ReactCoreUtils from '../../../helpers/util';
99

1010
const props = {
1111
onChange: jest.fn(),

packages/react-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@patternfly/react-tokens": "^5.4.0-prerelease.5"
3535
},
3636
"devDependencies": {
37-
"@patternfly/documentation-framework": "^5.15.7",
37+
"@patternfly/documentation-framework": "^5.16.3",
3838
"@patternfly/patternfly-a11y": "4.3.1"
3939
},
4040
"keywords": [

0 commit comments

Comments
 (0)