Ver Fonte

NO-JIRA: 4.22 breaking changes

Upgrade various devDependencies and dependencies for compatibility and tooling updates. Notable changes: Babel preset-env -> 7.29.3, @cypress/webpack-preprocessor -> 7.1.0, Cypress -> 15.14.2, @openshift-console/dynamic-plugin-sdk and webpack variants -> 4.22-latest, PatternFly packages -> 6.4.x, React and react-dom -> ^18.3.1 (with updated types), webpack and webpack-cli bumps, and @console/pluginAPI -> ^4.22.0. yarn.lock was regenerated to lock these new versions.
logonoff há 4 meses atrás
pai
commit
b2c29f8dd9
3 ficheiros alterados com 229 adições e 602 exclusões
  1. 3 7
      AGENTS.md
  2. 25 28
      package.json
  3. 201 567
      yarn.lock

+ 3 - 7
AGENTS.md

@@ -12,7 +12,7 @@ This is a **template repository** for creating OpenShift Console dynamic plugins
 > **Only make changes that should be standard practice for ALL plugins created from this template.** If a change is specific to one plugin use case, it belongs in the instantiated plugin repository, not in this template.
 
 **Key Technologies:**
-- TypeScript + React 17
+- TypeScript + React 18
 - PatternFly 6 (UI component library)
 - Webpack 5 with Module Federation
 - react-i18next for internationalization
@@ -104,12 +104,9 @@ integration-tests/     # Cypress e2e tests
 
 ## TypeScript Configuration
 
-Current config has `strict: false` but enforces:
+Current config has `strict: true` and enforces:
 - `noUnusedLocals: true`
 - All files should use `.tsx` extension
-- Target: ES2020
-
-**Modernization opportunity:** When touching files, consider enabling stricter TypeScript checks.
 
 ## Common Development Tasks
 
@@ -177,8 +174,7 @@ helm upgrade -i my-plugin charts/openshift-console-plugin \
 4. **Module federation requires exact module mapping** - `exposedModules` must match `$codeRef` values
 5. **PatternFly CSS variables only** - hex colors break dark mode
 6. **No webpack HMR for extensions** - changes to `console-extensions.json` require restart
-7. **TypeScript not in strict mode** - legacy choice, can be modernized
-8. **React 17, not 18** - matches console's React version
+7. **React 18** - matches console's React version
 
 ## Extension Points
 

+ 25 - 28
package.json

@@ -25,52 +25,49 @@
   },
   "devDependencies": {
     "@babel/core": "^7.29.0",
-    "@babel/preset-env": "^7.29.0",
-    "@cypress/webpack-preprocessor": "^7.0.2",
-    "@openshift-console/dynamic-plugin-sdk": "4.21-latest",
-    "@openshift-console/dynamic-plugin-sdk-webpack": "4.21-latest",
-    "@patternfly/react-core": "^6.2.2",
-    "@patternfly/react-icons": "^6.2.2",
-    "@patternfly/react-table": "^6.2.2",
+    "@babel/preset-env": "^7.29.3",
+    "@cypress/webpack-preprocessor": "^7.1.0",
+    "@openshift-console/dynamic-plugin-sdk": "4.22-latest",
+    "@openshift-console/dynamic-plugin-sdk-webpack": "4.22-latest",
+    "@patternfly/react-core": "^6.4.3",
+    "@patternfly/react-icons": "^6.4.0",
+    "@patternfly/react-table": "^6.4.3",
     "@types/node": "^22.0.0",
-    "@types/react": "^17.0.37",
-    "@types/react-router-dom": "^5.3.3",
-    "babel-loader": "^10.1.0",
+    "@types/react": "^18.3.28",
+    "babel-loader": "^10.1.1",
     "copy-webpack-plugin": "^14.0.0",
     "css-loader": "^7.1.4",
-    "cypress": "^15.11.0",
+    "cypress": "^15.14.2",
     "cypress-multi-reporters": "^2.0.5",
     "eslint": "^9.7.0",
     "eslint-config-prettier": "^10.1.8",
-    "eslint-plugin-cypress": "^6.1.0",
+    "eslint-plugin-cypress": "^6.4.0",
     "eslint-plugin-prettier": "^5.5.5",
     "eslint-plugin-react": "^7.37.5",
-    "eslint-plugin-react-hooks": "^7.0.1",
-    "globals": "^17.4.0",
-    "i18next": "^23.11.5",
+    "eslint-plugin-react-hooks": "^7.1.1",
+    "globals": "^17.6.0",
+    "i18next": "^25.8.18",
     "i18next-parser": "^9.4.0",
     "mocha": "^11.7.5",
     "mocha-junit-reporter": "^2.2.1",
     "mochawesome": "^7.1.4",
     "mochawesome-merge": "^5.1.1",
     "pluralize": "^8.0.0",
-    "prettier": "^3.8.1",
+    "prettier": "^3.8.3",
     "prettier-stylelint": "^0.4.2",
-    "react": "^17.0.1",
-    "react-dom": "^17.0.1",
-    "react-i18next": "^11.7.3",
-    "react-router": "5.3.x",
-    "react-router-dom": "5.3.x",
-    "react-router-dom-v5-compat": "^6.11.2",
+    "react": "^18.3.1",
+    "react-dom": "^18.3.1",
+    "react-i18next": "~16.5.8",
+    "react-router": "~7.13.1",
     "style-loader": "^4.0.0",
-    "stylelint": "^17.4.0",
+    "stylelint": "^17.9.1",
     "stylelint-config-standard": "^40.0.0",
-    "ts-loader": "^9.5.4",
+    "ts-loader": "^9.5.7",
     "ts-node": "^10.9.2",
     "typescript": "^5.9.3",
-    "typescript-eslint": "^8.56.1",
-    "webpack": "^5.100.0",
-    "webpack-cli": "^6.0.1",
+    "typescript-eslint": "^8.59.1",
+    "webpack": "^5.106.2",
+    "webpack-cli": "^7.0.2",
     "webpack-dev-server": "^5.2.3"
   },
   "dependenciesMeta": {
@@ -87,7 +84,7 @@
       "ExamplePage": "./components/ExamplePage"
     },
     "dependencies": {
-      "@console/pluginAPI": "^4.21.0"
+      "@console/pluginAPI": ">=4.22.0-0"
     }
   },
   "packageManager": "yarn@4.14.1"

Diff do ficheiro suprimidas por serem muito extensas
+ 201 - 567
yarn.lock


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff