Skip to content

Commit 16ffebf

Browse files
authored
chore: upgrade to Node.js version 20 (#10325)
Signed-off-by: Jon Koops <[email protected]>
1 parent 3176c64 commit 16ffebf

File tree

10 files changed

+45
-98
lines changed

10 files changed

+45
-98
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
- name: Set up Node.js
1515
uses: actions/setup-node@v4
1616
with:
17-
node-version: 18
17+
node-version: 20
1818
check-latest: true
1919

2020
- name: Get Yarn configuration

CONTRIBUTING.md

+30-21
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ To make contributing components and packages easier a generator utility has been
130130

131131
To start the generator run:
132132

133-
```bash
133+
```sh
134134
yarn generate
135135
```
136136

@@ -179,9 +179,9 @@ Please ensure that all React UI components contributed meet the following guidel
179179

180180
Adhering to the following process is the best way to get your work included in the project:
181181

182-
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
182+
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
183183

184-
```bash
184+
```sh
185185
# Clone your fork of the repo into the current directory
186186
git clone https://github.com/<your-username>/patternfly-react.git
187187
# Navigate to the newly cloned directory
@@ -192,15 +192,24 @@ git remote add upstream https://github.com/patternfly/patternfly-react.git
192192
git fetch upstream
193193
```
194194

195-
2. Create a branch:
195+
2. Set up tooling
196196

197-
```text
198-
$ git checkout -b my-branch upstream/main
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:
198+
199+
```sh
200+
yarn install
201+
yarn build
199202
```
200203

201-
3. Generate your component
204+
3. Create a branch:
205+
206+
```sh
207+
git checkout -b my-branch upstream/main
208+
```
202209

203-
```bash
210+
4. Generate your component
211+
212+
```sh
204213
# Run the tool to Generate the component scaffolding
205214
yarn generate
206215
```
@@ -214,37 +223,37 @@ $ git checkout -b my-branch upstream/main
214223
ComponentName.md - Component Docs
215224
```
216225

217-
4. Develop your component. After development is complete, run build and ensure tests and lint standards pass.
226+
5. Develop your component. After development is complete, run build and ensure tests and lint standards pass.
218227

219-
```text
220-
$ yarn build
221-
$ yarn test
228+
```sh
229+
yarn build
230+
yarn test
222231
```
223232

224233
Ensure no lint errors are introduced in `yarn-error.log` after running this command.
225234

226235
***Note to Windows users:*** you may need to change the path for the lint script in package.json to be `node_modules/eslint/bin/eslint`
227236

228-
5. Add a commit using `git commit`:
237+
6. Add a commit using `git commit`:
229238

230239
This project uses [`lerna`](https://lernajs.io/) to do automatic releases and generate a changelog based on the commit history. So we follow [a convention][3] for commit messages. Please follow this convention for your commit messages.
231240

232-
6. Rebase
241+
7. Rebase
233242

234243
Use `git rebase` (not `git merge`) to sync your work from time to time. Ensure all commits related to a single issue have been [squashed](https://github.com/ginatrapani/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit).
235244

236-
```text
237-
$ git fetch upstream
238-
$ git rebase upstream/main
245+
```sh
246+
git fetch upstream
247+
git rebase upstream/main
239248
```
240249

241-
7. Push
250+
8. Push
242251

243-
```text
244-
$ git push origin my-branch
252+
```sh
253+
git push origin my-branch
245254
```
246255

247-
8. Create a pull request
256+
9. Create a pull request
248257

249258
[Open a pull request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `main` branch. Please be sure to include all of the following in your PR:
250259

README.md

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

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

5050

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://github.com/patternfly/patternfly-react.git"
99
},
1010
"engines": {
11-
"node": ">=18.0.0",
11+
"node": ">=20",
1212
"yarn": ">=1.6.0"
1313
},
1414
"keywords": [

packages/eslint-plugin-patternfly-react/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This package provides PatternFly React all ESLint rules bundled together for use
44

55
### Installing
66

7-
```
7+
```sh
88
yarn add -D eslint-plugin-patternfly-react
99
```
1010

1111
or
1212

13-
```
13+
```sh
1414
npm install eslint-plugin-patternfly-react --save-dev
1515
```
1616

packages/react-charts/README.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,15 @@
22

33
This package provides PatternFly charting components for [PatternFly][patternfly].
44

5-
### Prerequisite
6-
7-
#### Node Environment
8-
9-
This project currently supports Node [Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react.
10-
11-
For example, to develop with Node 8, use the following:
12-
13-
```
14-
nvm install 8
15-
nvm use 8
16-
```
17-
18-
This project also requires a Yarn version of >=1.6.0. The latest version can be installed [here](https://yarnpkg.com/).
19-
205
### Installing
216

22-
```
7+
```sh
238
yarn add @patternfly/react-charts
249
```
2510

2611
or
2712

28-
```
13+
```sh
2914
npm install @patternfly/react-charts --save
3015
```
3116

packages/react-code-editor/README.md

+4-19
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,27 @@
22

33
This package provides a PatternFly wrapper for the Monaco code editor, using the `@monaco-editor/react` package.
44

5-
### Prerequisite
6-
7-
#### Node Environment
8-
9-
This project currently supports Node [Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react.
10-
11-
For example, to develop with Node 18, use the following:
12-
13-
```
14-
nvm install 18
15-
nvm use 18
16-
```
17-
18-
This project also requires a Yarn version of >=1.6.0. The latest version can be installed [here](https://yarnpkg.com/).
19-
205
### Installing
216

22-
```
7+
```sh
238
yarn add @patternfly/react-code-editor
249
```
2510

2611
or
2712

28-
```
13+
```sh
2914
npm install @patternfly/react-code-editor
3015
```
3116

3217
[!NOTE] For TypeScript type definitions, this package uses the `monaco-editor` package as a peer dependency. So, if you need types and don't already have the `monaco-editor package` installed, you will need to do so:
3318

34-
```
19+
```sh
3520
yarn add --dev monaco-editor
3621
```
3722

3823
or
3924

40-
```
25+
```sh
4126
npm install --dev monaco-editor
4227
```
4328

packages/react-core/CONTRIBUTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ $ git checkout -b my-branch -t upstream/main
6666

6767
While developing, you can run the patternfly-react workspace to view the component docs with live examples.
6868

69-
**Note:** Be sure you are using node version >= 18.0.0
70-
7169
```bash
7270
# Start up the workspace locally on port 8002
7371
yarn install && yarn start

packages/react-table/README.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,15 @@
22

33
This package provides Table PatternFly components based on [PatternFly][patternfly]
44

5-
### Prerequisite
6-
7-
#### Node environment
8-
9-
This project currently supports Node [Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react.
10-
11-
For example, to develop with Node 18, use the following:
12-
13-
```
14-
nvm install 18
15-
nvm use 18
16-
```
17-
18-
This project also requires a Yarn version of >=1.6.0. The latest version can be installed [here](https://yarnpkg.com/).
19-
205
### Installing
216

22-
```
7+
```sh
238
yarn add @patternfly/react-table
249
```
2510

2611
or
2712

28-
```
13+
```sh
2914
npm install @patternfly/react-table --save
3015
```
3116

packages/react-templates/README.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,15 @@
22

33
This package provides wrapped Patternfly component demos with a streamlined API for ease of use.
44

5-
### Prerequisite
6-
7-
#### Node Environment
8-
9-
This project currently supports [Node Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react.
10-
11-
For example, to develop with Node 18, use the following:
12-
13-
```
14-
nvm install 18
15-
nvm use 18
16-
```
17-
18-
This project also requires a Yarn version of >=1.6.0. The latest version can be installed from the [Yarn](https://yarnpkg.com/) home page.
19-
205
### Installing
216

22-
```
7+
```sh
238
yarn add @patternfly/react-templates
249
```
2510

2611
or
2712

28-
```
13+
```sh
2914
npm install @patternfly/react-templates --save
3015
```
3116

0 commit comments

Comments
 (0)