Skip to content

Commit d3a98e7

Browse files
committed
OCPBUGS-65887: Update a lot of deps
Bumps minimum OCP version to 4.19.0
1 parent 76c1ba0 commit d3a98e7

7 files changed

Lines changed: 1965 additions & 1294 deletions

File tree

.eslintrc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parser: '@typescript-eslint/parser'
1010
parserOptions:
1111
ecmaFeatures:
1212
jsx: true
13-
ecmaVersion: 2016
13+
ecmaVersion: 2021
1414
sourceType: module
1515
plugins:
1616
- prettier
@@ -19,6 +19,8 @@ plugins:
1919
rules:
2020
prettier/prettier:
2121
- error
22+
react/react-in-jsx-scope: # Not required with React 17+
23+
- off
2224
settings:
2325
react:
2426
version: detect

integration-tests/tests/example-page.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ describe('Console plugin template test', () => {
6868
cy.get('[data-quickstart-id="qs-nav-home"]').click();
6969
cy.get('[data-test="nav"]').contains('Plugin Example').click();
7070
cy.url().should('include', '/example');
71-
cy.get('[data-test="example-page-title"]').should('contain', 'Hello, Plugin!');
71+
cy.get('title').should('contain', 'Hello, Plugin!');
7272
});
7373
});

package.json

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,49 +24,47 @@
2424
"webpack": "node -r ts-node/register ./node_modules/.bin/webpack"
2525
},
2626
"devDependencies": {
27-
"@cypress/webpack-preprocessor": "^5.15.5",
28-
"@openshift-console/dynamic-plugin-sdk": "1.4.0",
29-
"@openshift-console/dynamic-plugin-sdk-webpack": "1.1.1",
27+
"@cypress/webpack-preprocessor": "^7.0.2",
28+
"@openshift-console/dynamic-plugin-sdk": "4.19.1",
29+
"@openshift-console/dynamic-plugin-sdk-webpack": "4.19.0",
3030
"@patternfly/react-core": "^6.2.2",
3131
"@patternfly/react-icons": "^6.2.2",
3232
"@patternfly/react-table": "^6.2.2",
3333
"@types/node": "^18.0.0",
3434
"@types/react": "^17.0.37",
35-
"@types/react-helmet": "^6.1.4",
36-
"@types/react-router-dom": "^5.3.2",
37-
"@typescript-eslint/eslint-plugin": "^5.14.0",
38-
"@typescript-eslint/parser": "^5.14.0",
39-
"copy-webpack-plugin": "^6.4.1",
35+
"@types/react-router-dom": "^5.3.3",
36+
"@typescript-eslint/eslint-plugin": "^5.62.0",
37+
"@typescript-eslint/parser": "^5.62.0",
38+
"copy-webpack-plugin": "^13.0.1",
4039
"css-loader": "^6.7.1",
41-
"cypress": "^12.17.4",
40+
"cypress": "^14.2.1",
4241
"cypress-multi-reporters": "^1.6.2",
4342
"eslint": "^8.10.0",
4443
"eslint-config-prettier": "^8.5.0",
4544
"eslint-plugin-cypress": "^2.12.1",
4645
"eslint-plugin-prettier": "^4.0.0",
4746
"eslint-plugin-react": "^7.29.1",
4847
"i18next-parser": "^3.11.0",
49-
"mocha-junit-reporter": "^2.2.0",
50-
"mochawesome": "^7.1.3",
48+
"mocha-junit-reporter": "^2.2.1",
49+
"mochawesome": "^7.1.4",
5150
"mochawesome-merge": "^4.3.0",
5251
"pluralize": "^8.0.0",
5352
"prettier": "^2.7.1",
5453
"prettier-stylelint": "^0.4.2",
5554
"react": "^17.0.1",
5655
"react-dom": "^17.0.1",
57-
"react-helmet": "^6.1.0",
5856
"react-i18next": "^11.7.3",
5957
"react-router": "5.3.x",
60-
"react-router-dom": "5.3.x",
58+
"react-router-dom-v5-compat": "^6.11.2",
6159
"style-loader": "^3.3.1",
6260
"stylelint": "^15.3.0",
6361
"stylelint-config-standard": "^31.0.0",
6462
"ts-loader": "^9.3.1",
65-
"ts-node": "^10.8.1",
66-
"typescript": "^4.7.4",
67-
"webpack": "5.75.0",
68-
"webpack-cli": "^4.9.2",
69-
"webpack-dev-server": "^4.7.4"
63+
"ts-node": "^10.9.2",
64+
"typescript": "^5.9.3",
65+
"webpack": "^5.75.0",
66+
"webpack-cli": "^5.1.4",
67+
"webpack-dev-server": "^5.1.0"
7068
},
7169
"consolePlugin": {
7270
"name": "console-plugin-template",
@@ -77,7 +75,7 @@
7775
"ExamplePage": "./components/ExamplePage"
7876
},
7977
"dependencies": {
80-
"@console/pluginAPI": "*"
78+
"@console/pluginAPI": "^4.19.0"
8179
}
8280
},
8381
"peerDependencies": {

src/components/ExamplePage.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import * as React from 'react';
2-
import Helmet from 'react-helmet';
1+
import { DocumentTitle, ListPageHeader } from '@openshift-console/dynamic-plugin-sdk';
32
import { useTranslation } from 'react-i18next';
4-
import { Content, PageSection, Title } from '@patternfly/react-core';
3+
import { Content, PageSection } from '@patternfly/react-core';
54
import { CheckCircleIcon } from '@patternfly/react-icons';
65
import './example.css';
76

@@ -10,12 +9,8 @@ export default function ExamplePage() {
109

1110
return (
1211
<>
13-
<Helmet>
14-
<title data-test="example-page-title">{t('Hello, Plugin!')}</title>
15-
</Helmet>
16-
<PageSection>
17-
<Title headingLevel="h1">{t('Hello, Plugin!')}</Title>
18-
</PageSection>
12+
<DocumentTitle>{t('Hello, Plugin!')}</DocumentTitle>
13+
<ListPageHeader title={t('Hello, Plugin!')} />
1914
<PageSection>
2015
<Content component="p">
2116
<span className="console-plugin-template__nice">

src/components/example.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Prefixing your CSS classes with your plugin name is a best practice to avoid
22
* collisions with other plugin styles. */
33
.console-plugin-template__nice {
4-
/* Use PF global vars for colors to support dark mode in OpenShift 4.11.
5-
* https://patternfly-react-main.surge.sh/developer-resources/global-css-variables */
6-
color: var(--pf-global--palette--blue-400);
4+
/* Use PatternFly semantic tokens for colors to support theming.
5+
* https://www.patternfly.org/tokens/all-patternfly-tokens */
6+
color: var(--pf-t--global--color--brand--default);
77
}

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"baseUrl": ".",
44
"module": "esnext",
55
"moduleResolution": "node",
6-
"target": "es2020",
6+
"target": "es2021",
77
"sourceMap": true,
8-
"jsx": "react",
8+
"jsx": "react-jsx",
99
"allowJs": true,
10-
"strict": false,
10+
"strict": true,
1111
"noUnusedLocals": true
1212
},
1313
"include": ["src"],

0 commit comments

Comments
 (0)