Update dependencies for upcoming Console 4.22 release#188
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughUpdated frontend dependencies (React → 18, React Router → ~7.13.1, TypeScript pinned to 5.9.3), bumped OpenShift dynamic plugin SDK prereleases, upgraded PatternFly and testing libs, and migrated many router/SDK type imports to new packages; no runtime control-flow changes introduced. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 inconclusive)
✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 83: package.json updates TypeScript to 5.9.3 but leaves
`@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` at ^5.29.0 (and a
proposed ^8.0.0) which do not support TS 5.9.x; update both
`@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` to at least
^8.39.0 (or a later compatible 8.x) in package.json, run your package manager to
regenerate lockfile (npm install / pnpm install / yarn), and re-run linting/CI
to ensure no parser/plugin incompatibilities remain.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 523ae225-3d73-4d7a-a36d-74db090adea7
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (29)
package.jsonplugin-manifest.tssrc/utils/components/MetadataLabels/MetadataLabels.tsxsrc/utils/components/PolicyForm/PolicyWizard/steps/NodesConfigurationStep/components/NodesOverlapAlert.tsxsrc/utils/hooks/useQueryParams.tssrc/views/nodenetworkconfiguration/Topology.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/CreatePolicyDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/InterfaceDrawer/InterfaceDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/InterfaceDrawer/TopologyDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/PolicyDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologyToolbar/TopologyToolbar.tsxsrc/views/nodenetworkconfiguration/manifest.tssrc/views/physical-networks/components/ConfigurationDrawer/tabs/DetailsTab.tsxsrc/views/physical-networks/components/ConfigurationDrawer/tabs/EnactmentStateTab/components/EnactmentStateTable/utils/utils.tsxsrc/views/physical-networks/components/NodesModal/NodesModal.tsxsrc/views/physical-networks/components/PhysicalNetworksEmptyState.tsxsrc/views/physical-networks/components/PhysicalNetworksPageHeader.tsxsrc/views/physical-networks/components/PhysicalNetworksTable/components/PhysicalNetworkRow/PhysicalNetworkRow.tsxsrc/views/policies/actions/PolicyActions.tsxsrc/views/policies/components/DeleteModal.tsxsrc/views/policies/details/PolicyPageTitle.tsxsrc/views/policies/list/components/CreatePolicyButtons.tsxsrc/views/policies/list/components/PolicyListEmptyState/PolicyListEmptyState.tsxsrc/views/policies/manifest.tssrc/views/policies/new/NewPolicy.tsxsrc/views/states/list/StatesList.tsxsrc/views/states/list/components/InterfaceDrawer/InterfaceDrawer.tsxsrc/views/states/list/hooks/useDrawerInterface.tssrc/views/states/manifest.ts
0c55965 to
1956f28
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 44-45: Add `@testing-library/dom` as an explicit devDependency in
package.json to satisfy the peer requirement of "@testing-library/react"
(v16.3.1). Update package.json's devDependencies block to include
"@testing-library/dom" with a compatible semver (match the peer version required
by `@testing-library/react` or use the latest compatible ^x.y.z), then run your
package manager install (npm/yarn/pnpm) to update lockfile so environments
consistently resolve the dependency alongside "@testing-library/react" and
"@testing-library/user-event".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b93b7a4b-27fd-4d73-b1a4-584340b5736a
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
| "@testing-library/react": "^16.3.1", | ||
| "@testing-library/user-event": "^14.6.1", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat package.jsonRepository: openshift/nmstate-console-plugin
Length of output: 3978
🌐 Web query:
@testing-library/react v16 peer dependencies @testing-library/dom release notes
💡 Result:
@testing-library/react v16 (starting with 16.0.0 released 2024-06-03) moved @testing-library/dom from a dependency to a peer dependency. This is a breaking change requiring explicit installation of @testing-library/dom alongside @testing-library/react. Key peer dependencies for v16: - @testing-library/dom: ^10.0.0 (explicitly required; previously bundled) - react: ^18.0.0 - react-dom: ^18.0.0 - @types/react: ^18.0.0 (optional) - @types/react-dom: ^18.0.0 (optional, needed for typechecking) Installation: npm install --save-dev @testing-library/react @testing-library/dom (or yarn add --dev @testing-library/react @testing-library/dom) This change reduces version conflicts with @testing-library/user-event and allows independent updates of @testing-library/dom without major releases of @testing-library/react. Later patch releases (16.1.0+, up to 16.3.2 as of 2026-01-19) added React 19 support but maintained the same peer dependency structure.
Citations:
- 1: https://github.com/testing-library/react-testing-library/releases
- 2: testing-library/react-testing-library@v15.0.7...v16.0.0
- 3: https://www.npmjs.com/package/@testing-library/react/v/16.0.1
- 4: https://www.npmjs.com/package/@testing-library/react
- 5: https://testing-library.com/docs/react-testing-library/intro/
Add @testing-library/dom as a direct devDependency.
@testing-library/react v16.3.1 requires @testing-library/dom as an explicit peer dependency (it was moved from a bundled dependency in v15). Without it, package resolution may fail or produce inconsistent behavior across environments.
Suggested dependency addition
"@testing-library/jest-dom": "^5.16.5",
+ "@testing-library/dom": "^10.0.0",
"@testing-library/react": "^16.3.1",
"@testing-library/user-event": "^14.6.1",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` around lines 44 - 45, Add `@testing-library/dom` as an explicit
devDependency in package.json to satisfy the peer requirement of
"@testing-library/react" (v16.3.1). Update package.json's devDependencies block
to include "@testing-library/dom" with a compatible semver (match the peer
version required by `@testing-library/react` or use the latest compatible ^x.y.z),
then run your package manager install (npm/yarn/pnpm) to update lockfile so
environments consistently resolve the dependency alongside
"@testing-library/react" and "@testing-library/user-event".
There was a problem hiding this comment.
This can be done as a follow-up change.
There was a problem hiding this comment.
@vojtechszocs, understood! Would you like me to open a follow-up GitHub issue to track adding @testing-library/dom as an explicit devDependency?
|
/lgtm |
|
/unhold |
|
/hold |
2fcc81c to
3dd7460
Compare
|
Rebased and bumped Console plugin SDK dependencies to |
|
/hold cancel |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
package.json (1)
44-45:⚠️ Potential issue | 🟠 MajorAdd
@testing-library/domalongside the RTL v16 bump.
@testing-library/reactv16 moved@testing-library/domto a peer dependency, and its own release notes / install docs now require installing both packages explicitly. I’d make that dependency direct here instead of relying on transitive resolution. (github.com)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 44 - 45, Add `@testing-library/dom` as an explicit dependency (same section where "@testing-library/react" and "@testing-library/user-event" are declared) because RTL v16 made it a peer dependency; update package.json to include "@testing-library/dom" with a compatible version (match the major used by "@testing-library/react" v16) so installs don't rely on transitive resolution and then run install to update lockfile.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@package.json`:
- Around line 44-45: Add `@testing-library/dom` as an explicit dependency (same
section where "@testing-library/react" and "@testing-library/user-event" are
declared) because RTL v16 made it a peer dependency; update package.json to
include "@testing-library/dom" with a compatible version (match the major used
by "@testing-library/react" v16) so installs don't rely on transitive resolution
and then run install to update lockfile.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0cf80e1b-1f43-40bc-b972-362a47938adc
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (29)
package.jsonplugin-manifest.tssrc/utils/components/MetadataLabels/MetadataLabels.tsxsrc/utils/components/PolicyForm/PolicyWizard/steps/NodesConfigurationStep/components/NodesOverlapAlert.tsxsrc/utils/hooks/useQueryParams.tssrc/views/nodenetworkconfiguration/Topology.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/CreatePolicyDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/InterfaceDrawer/InterfaceDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/InterfaceDrawer/TopologyDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologySidebar/PolicyDrawer.tsxsrc/views/nodenetworkconfiguration/components/TopologyToolbar/TopologyToolbar.tsxsrc/views/nodenetworkconfiguration/manifest.tssrc/views/physical-networks/components/ConfigurationDrawer/tabs/DetailsTab.tsxsrc/views/physical-networks/components/ConfigurationDrawer/tabs/EnactmentStateTab/components/EnactmentStateTable/utils/utils.tsxsrc/views/physical-networks/components/NodesModal/NodesModal.tsxsrc/views/physical-networks/components/PhysicalNetworksEmptyState.tsxsrc/views/physical-networks/components/PhysicalNetworksPageHeader.tsxsrc/views/physical-networks/components/PhysicalNetworksTable/components/PhysicalNetworkRow/PhysicalNetworkRow.tsxsrc/views/policies/actions/PolicyActions.tsxsrc/views/policies/components/DeleteModal.tsxsrc/views/policies/details/PolicyPageTitle.tsxsrc/views/policies/list/components/CreatePolicyButtons.tsxsrc/views/policies/list/components/PolicyListEmptyState/PolicyListEmptyState.tsxsrc/views/policies/manifest.tssrc/views/policies/new/NewPolicy.tsxsrc/views/states/list/StatesList.tsxsrc/views/states/list/components/InterfaceDrawer/InterfaceDrawer.tsxsrc/views/states/list/hooks/useDrawerInterface.tssrc/views/states/manifest.ts
✅ Files skipped from review due to trivial changes (19)
- src/views/physical-networks/components/NodesModal/NodesModal.tsx
- src/utils/components/MetadataLabels/MetadataLabels.tsx
- src/views/policies/list/components/PolicyListEmptyState/PolicyListEmptyState.tsx
- src/views/policies/list/components/CreatePolicyButtons.tsx
- src/views/policies/details/PolicyPageTitle.tsx
- src/views/policies/components/DeleteModal.tsx
- src/views/states/list/hooks/useDrawerInterface.ts
- src/views/states/list/StatesList.tsx
- src/views/states/manifest.ts
- src/utils/components/PolicyForm/PolicyWizard/steps/NodesConfigurationStep/components/NodesOverlapAlert.tsx
- src/views/nodenetworkconfiguration/Topology.tsx
- src/views/nodenetworkconfiguration/components/TopologySidebar/PolicyDrawer.tsx
- plugin-manifest.ts
- src/views/physical-networks/components/PhysicalNetworksPageHeader.tsx
- src/views/physical-networks/components/ConfigurationDrawer/tabs/EnactmentStateTab/components/EnactmentStateTable/utils/utils.tsx
- src/views/physical-networks/components/PhysicalNetworksEmptyState.tsx
- src/views/nodenetworkconfiguration/components/TopologySidebar/CreatePolicyDrawer.tsx
- src/views/nodenetworkconfiguration/manifest.ts
- src/views/nodenetworkconfiguration/components/TopologySidebar/InterfaceDrawer/TopologyDrawer.tsx
🚧 Files skipped from review as they are similar to previous changes (8)
- src/views/states/list/components/InterfaceDrawer/InterfaceDrawer.tsx
- src/views/nodenetworkconfiguration/components/TopologySidebar/InterfaceDrawer/InterfaceDrawer.tsx
- src/views/physical-networks/components/PhysicalNetworksTable/components/PhysicalNetworkRow/PhysicalNetworkRow.tsx
- src/views/nodenetworkconfiguration/components/TopologyToolbar/TopologyToolbar.tsx
- src/views/policies/manifest.ts
- src/utils/hooks/useQueryParams.ts
- src/views/physical-networks/components/ConfigurationDrawer/tabs/DetailsTab.tsx
- src/views/policies/actions/PolicyActions.tsx
|
@vojtechszocs: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
Plugin SDK and shared modules
@openshift/dynamic-plugin-sdk- pulled in by@openshift-console/dynamic-plugin-sdkreact-router-domandreact-router-dom-v5-compat@testing-library/reactand@testing-library/user-event@testing-library/react-hooks- replaced byrenderHookin@testing-library/react@openshift-console/dynamic-plugin-sdk-webpackPatternFly
Follow-up improvements
npm run lintworks but warns about unsupported TypeScript versionnpm run testfails on parse errors that come fromts-jestSummary by CodeRabbit