Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade Yarn to a supported version #10277

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: node-modules
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: 5 additions & 5 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 Down Expand Up @@ -38,6 +38,7 @@
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "29.5.12",
"@types/node": "^20.12.7",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^5.62.0",
Expand Down Expand Up @@ -86,7 +87,7 @@
"clean:build": "rimraf .cache .eslintcache coverage",
"clean:exports": "lerna run clean:exports --parallel --stream",
"generate": "yarn plop",
"lint": "node --max-old-space-size=4096 node_modules/.bin/eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
"lint": "eslint --ext js,jsx,ts,tsx --cache --cache-strategy content",
"lint:all": "yarn lint:md && yarn lint:versions && yarn lint:ts",
"lint:md": "yarn eslint packages --ext md --no-eslintrc --config .eslintrc-md.json --cache --cache-strategy content",
"lint:ts": "yarn lint packages/*/src",
Expand Down Expand Up @@ -119,6 +120,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.3",
"private": false,
"main": "./lib/index.js",
"license": "MIT",
"publishConfig": {
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event';

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

const props = {
onChange: jest.fn(),
Expand Down
2 changes: 1 addition & 1 deletion packages/react-integration/demo-app-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"react-router-dom": "^5.3.4"
},
"devDependencies": {
"@types/react-router-dom": "^5.3.3",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-react-swc": "^3.7.0",
"vite": "^5.2.12"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"serve:integration": "cd demo-app-ts && yarn preview",
"test:integration": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run"
"test:integration": "cypress run"
},
"devDependencies": {
"cypress": "^8.7.0",
Expand Down
Loading
Loading