Skip to content

Commit

Permalink
chore: upgrade Yarn to a supported version
Browse files Browse the repository at this point in the history
Closes patternfly#9959

Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed May 15, 2024
1 parent 84da22c commit 805eb5c
Show file tree
Hide file tree
Showing 14 changed files with 39,553 additions and 19,820 deletions.
10 changes: 7 additions & 3 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ runs:
node-version: 20
check-latest: true

- name: Enable Corepack
shell: bash
run: corepack enable

- name: Get Yarn configuration
id: yarn-config
shell: bash
run: |
echo "cache-directory=$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "cache-folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
# TODO: This can be simplified to use the `cache` option of the `actions/setup-node` action when it supports Corepack.
# See: https://github.com/actions/setup-node/issues/531
Expand All @@ -31,14 +35,14 @@ runs:
# Also cache Cypress binary.
path: |
~/.cache/Cypress
${{ steps.yarn-config.outputs.cache-directory }}
${{ steps.yarn-config.outputs.cache-folder }}
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-
- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
run: yarn install --immutable

- uses: actions/cache@v4
if: inputs.skip-build != 'true' && inputs.skip-build-cache != 'true'
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: pnpm
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ git fetch upstream

2. Set up tooling

[Install Node.js](https://nodejs.org/en/download/package-manager) version 20 (or higher). Then install the project dependencies and build it by running:
[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:

```sh
yarn install
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Before you begin, check out this [overview of PatternFly](http://patternfly.org/
Install a package manager before using the PatternFly libraries.

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


#### Start with PatternFly React seed
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"url": "https://github.com/patternfly/patternfly-react.git"
},
"engines": {
"node": ">=20",
"yarn": ">=1.6.0"
"node": ">=20"
},
"packageManager": "[email protected]+sha512.c44e283c54e02de9d1da8687025b030078c1b9648d2895a65aab8e64225bfb7becba87e1809fc0b4b6778bbd47a1e2ab6ac647de4c5e383a53a7c17db6c3ff4b",
"keywords": [
"react",
"patternfly",
Expand All @@ -29,10 +29,12 @@
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
"@octokit/rest": "^20.0.0",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "14.5.2",
"@types/jest": "29.5.11",
"@types/node": "^20.12.7",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^5.59.2",
Expand All @@ -58,6 +60,7 @@
"react": "^18",
"react-dom": "^18",
"rimraf": "^5.0.5",
"semver": "^7.6.0",
"surge": "^0.23.1",
"ts-node": "^10.9.1",
"ts-patch": "^2.1.0",
Expand Down Expand Up @@ -111,6 +114,5 @@
"packages": [
"packages/**"
]
},
"dependencies": {}
}
}
1 change: 0 additions & 1 deletion packages/eslint-plugin-patternfly-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "eslint-plugin-patternfly-react",
"version": "5.4.0-prerelease.1",
"private": false,
"main": "./lib/index.js",
"license": "MIT",
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"build:single:packages": "node ../../scripts/build-single-packages.js --config single-packages.config.json"
},
"devDependencies": {
"@types/lodash": "^4.14.157",
"@types/lodash": "^4.17.0",
"css": "^2.2.3",
"fs-extra": "^11.0.0",
"glob": "^7.1.2"
Expand Down
1 change: 1 addition & 0 deletions packages/react-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@patternfly/react-icons": "^5.4.0-prerelease.3",
"@patternfly/react-styles": "^5.4.0-prerelease.3",
"@patternfly/react-tokens": "^5.4.0-prerelease.3",
"file-selector": "^0.6.0",
"focus-trap": "7.5.2",
"react-dropzone": "^14.2.3",
"tslib": "^2.6.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

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

import { NavList } from '../../NavList';
import { NavContext } from '../../Nav';
Expand Down
4 changes: 3 additions & 1 deletion packages/react-drag-drop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/modifiers": "^6.0.1",
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.2",
"@patternfly/react-core": "^5.4.0-prerelease.11",
"@patternfly/react-icons": "^5.4.0-prerelease.3",
"@patternfly/react-styles": "^5.4.0-prerelease.3",
"memoize-one": "^5.1.0",
"resize-observer-polyfill": "^1.5.1"
"resize-observer-polyfill": "^1.5.1",
"tslib": "^2.6.2"
},
"peerDependencies": {
"react": "^17 || ^18",
Expand Down
4 changes: 4 additions & 0 deletions packages/react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
"lodash": "^4.17.19",
"tslib": "^2.6.2"
},
"devDependencies": {
"@types/lodash": "^4.17.0",
"typescript": "^4.7.4"
},
"peerDependencies": {
"react": "^17 || ^18",
"react-dom": "^17 || ^18"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"react": "^17 || ^18",
"react-dom": "^17 || ^18"
}
}
}
4 changes: 2 additions & 2 deletions packages/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"assumeChangesOnlyAffectDirectDependencies": true,
"jsx": "react",
"lib": [
"es2015",
"dom"
"ES2017",
"DOM"
],
"target": "es2015",
"module": "es2015",
Expand Down
Loading

0 comments on commit 805eb5c

Please sign in to comment.