Skip to content

Commit 3079721

Browse files
authored
chore(v5-updates): Standardize on React 18, node 18, eslint, and PF v5 (#43)
* chore(v5-updates): Standardize on React 18, node 18, eslint, and PF v5 * Updated PF version to the latest 5.0 alpha for documenation. * Updated with review comments. * Update realease.config.js * Updated with review comments. * Enabled dry run temporarily.
1 parent 4c7fe68 commit 3079721

File tree

10 files changed

+1260
-2063
lines changed

10 files changed

+1260
-2063
lines changed

.github/workflows/check-pr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
pull_request:
44
branches:
55
- main
6+
- v4
67
jobs:
78
call-build-lint-test-workflow:
89
uses: ./.github/workflows/build-lint-test.yml

.github/workflows/release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- main
6+
- v4
67
jobs:
78
call-build-lint-test-workflow:
89
uses: ./.github/workflows/build-lint-test.yml

jest.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ module.exports = {
1313
moduleNameMapper: {
1414
'\\.(css|less)$': '<rootDir>/styleMock.js'
1515
},
16-
testEnvironment: 'jsdom'
16+
testEnvironment: 'jsdom',
17+
setupFiles: ['./jest.setup.js']
1718
};

jest.setup.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const { TextEncoder } = require('util');
2+
global.TextEncoder = TextEncoder;

package.json

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@patternfly/react-user-feedback-root",
33
"private": true,
4-
"version": "0.0.0",
4+
"version": "5.0.0-alpha.0",
55
"description": "This library provides patternfly extensions",
66
"license": "MIT",
77
"workspaces": [
@@ -26,34 +26,40 @@
2626
"prepare": "husky install"
2727
},
2828
"devDependencies": {
29+
"babel-jest": "^29.2.2",
2930
"@babel/core": "^7.19.6",
3031
"@babel/preset-env": "^7.19.4",
31-
"@babel/preset-flow": "^7.18.6",
3232
"@babel/preset-react": "^7.18.6",
33+
"@babel/preset-flow": "^7.18.6",
3334
"@babel/preset-typescript": "^7.18.6",
34-
"@testing-library/jest-dom": "5.16.5",
35-
"@testing-library/react": "^12.1.5",
36-
"@testing-library/user-event": "13.5.0",
35+
"react": "^18",
36+
"react-dom": "^18",
37+
"typescript": "^4.7.4",
3738
"@typescript-eslint/eslint-plugin": "^5.42.0",
3839
"@typescript-eslint/parser": "^5.42.0",
39-
"babel-jest": "^29.2.2",
40+
"@types/react": "^18",
41+
"@types/react-dom": "^18",
4042
"concurrently": "^5.3.0",
4143
"eslint": "^8.0.1",
42-
"eslint-config-prettier": "8.5.0",
43-
"eslint-config-standard-with-typescript": "^23.0.0",
4444
"eslint-plugin-import": "^2.25.2",
4545
"eslint-plugin-markdown": "^1.0.2",
46-
"eslint-plugin-n": "^15.0.0",
4746
"eslint-plugin-prettier": "^3.1.4",
48-
"eslint-plugin-promise": "^6.0.0",
4947
"eslint-plugin-react": "^7.21.4",
48+
"eslint-config-standard-with-typescript": "^23.0.0",
49+
"eslint-plugin-n": "^15.0.0",
50+
"eslint-plugin-promise": "^6.0.0",
5051
"eslint-plugin-react-hooks": "^4.6.0",
51-
"husky": "^8.0.3",
52+
"eslint-config-prettier": "8.5.0",
53+
"prettier": "2.7.1",
5254
"jest": "^29.2.2",
55+
"husky": "^8.0.3",
56+
"@testing-library/react":"^13.4.0",
57+
"@testing-library/user-event": "14.4.3",
58+
"@testing-library/jest-dom":"5.16.5",
59+
"@testing-library/dom": "9.0.0",
5360
"jest-environment-jsdom": "^29.2.2",
54-
"prettier": "2.7.1",
55-
"react": "^17",
56-
"react-dom": "^17",
57-
"serve": "^14.1.2"
61+
"jest-canvas-mock": "^2.4.0",
62+
"serve": "^14.1.2",
63+
"rimraf": "^2.6.2"
5864
}
5965
}

packages/module/package.json

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
22
"name": "@patternfly/react-user-feedback",
3-
"version": "1.0.0",
3+
"version": "5.0.0-alpha.0",
44
"description": "A feedback extension to allow users to provide input on products.",
55
"main": "dist/esm/index.js",
66
"module": "dist/esm/index.js",
7+
"publishConfig": {
8+
"access": "public",
9+
"tag": "alpha"
10+
},
711
"scripts": {
812
"build": "yarn build:js && yarn build:esm && yarn build:fed:packages && yarn copy:files:esm && yarn copy:files:cjs",
913
"build:esm": "tsc --build --verbose ./tsconfig.json && yarn build:css && yarn transform:css",
@@ -28,34 +32,31 @@
2832
"url": "https://github.com/patternfly/react-user-feedback/issues"
2933
},
3034
"homepage": "https://github.com/patternfly/react-user-feedback#readme",
31-
"publishConfig": {
32-
"access": "public"
33-
},
3435
"resolutions": {
3536
"@patternfly/react-icons": "^4.93.6"
3637
},
3738
"dependencies": {
38-
"@patternfly/react-core": "^4.276.6",
39-
"@patternfly/react-icons": "^4.93.6"
39+
"@patternfly/react-core": "^5.0.0-alpha.50",
40+
"@patternfly/react-icons": "^5.0.0-alpha.7"
4041
},
4142
"peerDependencies": {
42-
"react": "^16.8 || ^17 || ^18",
43-
"react-dom": "^16.8 || ^17 || ^18"
43+
"react": "^17 || ^18",
44+
"react-dom": "^17 || ^18"
4445
},
4546
"devDependencies": {
4647
"copyfiles": "2.4.1",
4748
"utility-types": "^3.10.0",
48-
"react": "^17.0.0",
49-
"react-dom": "^17.0.0",
49+
"react": "^18",
50+
"react-dom": "^18",
5051
"rimraf": "^2.6.2",
5152
"typescript": "^4.7.4",
52-
"@types/react": "^17.0.0",
53-
"@types/react-dom": "^17.0.0",
54-
"@patternfly/patternfly-a11y": "4.3.1",
55-
"@patternfly/documentation-framework": "^1.2.55",
56-
"@patternfly/patternfly": "^4.224.2",
57-
"@patternfly/react-table": "^4.112.39",
58-
"@patternfly/react-code-editor": "^4.82.113",
53+
"@types/react": "^18",
54+
"@types/react-dom": "^18",
55+
"@patternfly/patternfly-a11y": "^4.3.1",
56+
"@patternfly/documentation-framework": "^2.0.0-alpha.31",
57+
"@patternfly/patternfly": "^5.0.0-alpha.33",
58+
"@patternfly/react-table": "^5.0.0-alpha.51",
59+
"@patternfly/react-code-editor": "^5.0.0-alpha.51",
5960
"node-sass-package-importer": "^5.3.2",
6061
"fs-extra": "^9.1.0",
6162
"glob": "^7.2.3",

packages/module/release.config.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
branches: [{ name: 'main', channel: 'prerelease' }],
2+
branches: [{ name: 'v4', channel: 'prerelease' }, { name: 'main', channel: 'alpha', prerelease: 'alpha' }],
33
analyzeCommits: {
44
preset: 'angular'
55
},
@@ -9,5 +9,6 @@ module.exports = {
99
'@semantic-release/github',
1010
'@semantic-release/npm'
1111
],
12-
tagFormat: 'v${version}'
12+
tagFormat: 'v${version}',
13+
dryRun: true
1314
};

packages/module/src/Feedback/FeedbackError.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const FeedbackError = ({ onCloseModal }: FeedbackErrorProps) => {
1313
const intl = React.useContext(LocaleContext);
1414
return (
1515
<div className="chr-c-feedback-success-content">
16-
<CheckIcon size="md" color="var(--pf-global--success-color--100)" className="pf-u-mx-auto" />
16+
<CheckIcon color="var(--pf-global--success-color--100)" className="pf-u-mx-auto" />
1717
<TextContent>
1818
<Text component={TextVariants.h1}>{intl.somethingWentWrong}</Text>
1919
<Text>

packages/module/src/Feedback/FeedbackSuccess.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const FeedbackSuccess = ({ onCloseModal, successTitle, successDescription }: Fee
1515
const intl = React.useContext(LocaleContext);
1616
return (
1717
<div className="chr-c-feedback-success-content">
18-
<CheckIcon size="md" color="var(--pf-global--success-color--100)" className="pf-u-mx-auto" />
18+
<CheckIcon color="var(--pf-global--success-color--100)" className="pf-u-mx-auto" />
1919
<TextContent>
2020
<Text component={TextVariants.h1}>{successTitle}</Text>
2121
<Text>{successDescription}</Text>

0 commit comments

Comments
 (0)