Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
"phaser": "~3.90.0",
"query-string": "^9.0.0",
"re-resizable": "^6.9.9",
"react": "^18.3.1",
"react": "^19.0.0",
"react-ace": "^14.0.0",
"react-copy-to-clipboard": "^5.1.0",
"react-debounce-render": "^8.0.2",
"react-dom": "^18.3.1",
"react-dom": "^19.0.0",
"react-drag-drop-files": "^3.0.0",
"react-draggable": "^4.4.5",
"react-dropzone": "^14.2.3",
Expand Down Expand Up @@ -140,9 +140,9 @@
"@types/js-cookie": "^3.0.6",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.195",
"@types/react": "^18.3.3",
"@types/react": "^19.0.0",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^18.3.0",
"@types/react-dom": "^19.0.0",
"@types/react-redux": "^7.1.24",
"@types/react-syntax-highlighter": "^15.5.7",
"@types/react-test-renderer": "^18.0.0",

This comment was marked as outdated.

Comment on lines 140 to 148

This comment was marked as outdated.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The update to react-test-renderer v19 removes the 'react-test-renderer/shallow' export, which is still imported in TestUtils.ts, causing a runtime error that will break the test suite.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The react-test-renderer package was upgraded from v18.2.0 to v19.0.0. This major version update includes a breaking change where the 'react-test-renderer/shallow' export path was removed. The file src/commons/utils/TestUtils.ts still attempts to import createRenderer from this now-nonexistent path. This will cause a "module not found" error at runtime when TestUtils.ts is imported, leading to the failure of the entire test suite. Additionally, the corresponding type definitions in @types/react-test-renderer remain at v18, creating a type-implementation mismatch.

💡 Suggested Fix

To resolve the breaking change, add the new react-shallow-renderer package as a dependency. Update the import statement in src/commons/utils/TestUtils.ts to use the new package. Finally, update the @types/react-test-renderer package to a version compatible with v19 to ensure type safety.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L148

Potential issue: The `react-test-renderer` package was upgraded from v18.2.0 to v19.0.0.
This major version update includes a breaking change where the
`'react-test-renderer/shallow'` export path was removed. The file
`src/commons/utils/TestUtils.ts` still attempts to import `createRenderer` from this
now-nonexistent path. This will cause a "module not found" error at runtime when
`TestUtils.ts` is imported, leading to the failure of the entire test suite.
Additionally, the corresponding type definitions in `@types/react-test-renderer` remain
at v18, creating a type-implementation mismatch.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7729960

Expand All @@ -159,7 +159,7 @@
"cross-env": "^10.0.0",
"eslint": "^9.9.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-hooks": "^7.0.0",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-simple-import-sort": "^12.1.1",
"https-browserify": "^1.0.0",
Expand All @@ -174,7 +174,7 @@
"prettier": "^3.3.3",
"process": "^0.11.10",
"react-error-overlay": "^6.0.11",
"react-test-renderer": "^18.2.0",
"react-test-renderer": "^19.0.0",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The upgrade to react-test-renderer v19 requires react-shallow-renderer to be added as an explicit dev dependency, as its removal will break the entire test suite.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The upgrade of react-test-renderer to version 19 removes the react-test-renderer/shallow export, which was previously available via the transitive dependency react-shallow-renderer. The project's TestUtils.ts file directly imports createRenderer from this path, and this utility is consumed by over 40 test files. Because react-shallow-renderer has not been added as an explicit dev dependency in package.json, running the test suite will result in a Cannot find module 'react-test-renderer/shallow' error, causing a complete failure of all tests.

💡 Suggested Fix

Add react-shallow-renderer as a devDependency in the package.json file to make it available for the numerous tests that depend on shallow rendering.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L177

Potential issue: The upgrade of `react-test-renderer` to version 19 removes the
`react-test-renderer/shallow` export, which was previously available via the transitive
dependency `react-shallow-renderer`. The project's `TestUtils.ts` file directly imports
`createRenderer` from this path, and this utility is consumed by over 40 test files.
Because `react-shallow-renderer` has not been added as an explicit dev dependency in
`package.json`, running the test suite will result in a `Cannot find module
'react-test-renderer/shallow'` error, causing a complete failure of all tests.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7730234

"redux-saga-test-plan": "^4.0.6",
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.63.6",
Expand Down
182 changes: 117 additions & 65 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -404,25 +404,25 @@ __metadata:
languageName: node
linkType: hard

"@babel/parser@npm:^7.28.3":
version: 7.28.3
resolution: "@babel/parser@npm:7.28.3"
"@babel/parser@npm:^7.24.4, @babel/parser@npm:^7.28.5":
version: 7.28.5
resolution: "@babel/parser@npm:7.28.5"
dependencies:
"@babel/types": "npm:^7.28.2"
"@babel/types": "npm:^7.28.5"
bin:
parser: ./bin/babel-parser.js
checksum: 10c0/1f41eb82623b0ca0f94521b57f4790c6c457cd922b8e2597985b36bdec24114a9ccf54640286a760ceb60f11fe9102d192bf60477aee77f5d45f1029b9b72729
checksum: 10c0/5bbe48bf2c79594ac02b490a41ffde7ef5aa22a9a88ad6bcc78432a6ba8a9d638d531d868bd1f104633f1f6bba9905746e15185b8276a3756c42b765d131b1ef
languageName: node
linkType: hard

"@babel/parser@npm:^7.28.5":
version: 7.28.5
resolution: "@babel/parser@npm:7.28.5"
"@babel/parser@npm:^7.28.3":
version: 7.28.3
resolution: "@babel/parser@npm:7.28.3"
dependencies:
"@babel/types": "npm:^7.28.5"
"@babel/types": "npm:^7.28.2"
bin:
parser: ./bin/babel-parser.js
checksum: 10c0/5bbe48bf2c79594ac02b490a41ffde7ef5aa22a9a88ad6bcc78432a6ba8a9d638d531d868bd1f104633f1f6bba9905746e15185b8276a3756c42b765d131b1ef
checksum: 10c0/1f41eb82623b0ca0f94521b57f4790c6c457cd922b8e2597985b36bdec24114a9ccf54640286a760ceb60f11fe9102d192bf60477aee77f5d45f1029b9b72729
languageName: node
linkType: hard

Expand Down Expand Up @@ -4279,12 +4279,12 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:^18.3.0":
version: 18.3.7
resolution: "@types/react-dom@npm:18.3.7"
"@types/react-dom@npm:^19.0.0":
version: 19.2.3
resolution: "@types/react-dom@npm:19.2.3"
peerDependencies:
"@types/react": ^18.0.0
checksum: 10c0/8bd309e2c3d1604a28a736a24f96cbadf6c05d5288cfef8883b74f4054c961b6b3a5e997fd5686e492be903c8f3380dba5ec017eff3906b1256529cd2d39603e
"@types/react": ^19.2.0
checksum: 10c0/b486ebe0f4e2fb35e2e108df1d8fc0927ca5d6002d5771e8a739de11239fe62d0e207c50886185253c99eb9dedfeeb956ea7429e5ba17f6693c7acb4c02f8cd1
languageName: node
linkType: hard

Expand Down Expand Up @@ -4336,7 +4336,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:^18, @types/react@npm:^18.3.3":
"@types/react@npm:*, @types/react@npm:^18":
version: 18.3.23
resolution: "@types/react@npm:18.3.23"
dependencies:
Expand All @@ -4346,6 +4346,15 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:^19.0.0":
version: 19.2.7
resolution: "@types/react@npm:19.2.7"
dependencies:
csstype: "npm:^3.2.2"
checksum: 10c0/a7b75f1f9fcb34badd6f84098be5e35a0aeca614bc91f93d2698664c0b2ba5ad128422bd470ada598238cebe4f9e604a752aead7dc6f5a92261d0c7f9b27cfd1
languageName: node
linkType: hard

"@types/redux-mock-store@npm:^1.0.3":
version: 1.5.0
resolution: "@types/redux-mock-store@npm:1.5.0"
Expand Down Expand Up @@ -6258,6 +6267,13 @@ __metadata:
languageName: node
linkType: hard

"csstype@npm:^3.2.2":
version: 3.2.3
resolution: "csstype@npm:3.2.3"
checksum: 10c0/cd29c51e70fa822f1cecd8641a1445bed7063697469d35633b516e60fe8c1bde04b08f6c5b6022136bb669b64c63d4173af54864510fbb4ee23281801841a3ce
languageName: node
linkType: hard

"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:^3.1.6":
version: 3.2.4
resolution: "d3-array@npm:3.2.4"
Expand Down Expand Up @@ -7121,12 +7137,18 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-react-hooks@npm:^5.2.0":
version: 5.2.0
resolution: "eslint-plugin-react-hooks@npm:5.2.0"
"eslint-plugin-react-hooks@npm:^7.0.0":
version: 7.0.1
resolution: "eslint-plugin-react-hooks@npm:7.0.1"
dependencies:
"@babel/core": "npm:^7.24.4"
"@babel/parser": "npm:^7.24.4"
hermes-parser: "npm:^0.25.1"
zod: "npm:^3.25.0 || ^4.0.0"
zod-validation-error: "npm:^3.5.0 || ^4.0.0"
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
checksum: 10c0/1c8d50fa5984c6dea32470651807d2922cc3934cf3425e78f84a24c2dfd972e7f019bee84aefb27e0cf2c13fea0ac1d4473267727408feeb1c56333ca1489385
checksum: 10c0/1e711d1a9d1fa9cfc51fa1572500656577201199c70c795c6a27adfc1df39e5c598f69aab6aa91117753d23cc1f11388579a2bed14921cf9a4efe60ae8618496
languageName: node
linkType: hard

Expand Down Expand Up @@ -7712,9 +7734,9 @@ __metadata:
"@types/js-cookie": "npm:^3.0.6"
"@types/js-yaml": "npm:^4.0.5"
"@types/lodash": "npm:^4.14.195"
"@types/react": "npm:^18.3.3"
"@types/react": "npm:^19.0.0"
"@types/react-copy-to-clipboard": "npm:^5.0.4"
"@types/react-dom": "npm:^18.3.0"
"@types/react-dom": "npm:^19.0.0"
"@types/react-redux": "npm:^7.1.24"
"@types/react-syntax-highlighter": "npm:^15.5.7"
"@types/react-test-renderer": "npm:^18.0.0"
Expand All @@ -7740,7 +7762,7 @@ __metadata:
dompurify: "npm:^3.2.4"
eslint: "npm:^9.9.0"
eslint-plugin-react: "npm:^7.35.0"
eslint-plugin-react-hooks: "npm:^5.2.0"
eslint-plugin-react-hooks: "npm:^7.0.0"
eslint-plugin-react-refresh: "npm:^0.4.9"
eslint-plugin-simple-import-sort: "npm:^12.1.1"
flexboxgrid: "npm:^6.3.1"
Expand Down Expand Up @@ -7773,11 +7795,11 @@ __metadata:
process: "npm:^0.11.10"
query-string: "npm:^9.0.0"
re-resizable: "npm:^6.9.9"
react: "npm:^18.3.1"
react: "npm:^19.0.0"
react-ace: "npm:^14.0.0"
react-copy-to-clipboard: "npm:^5.1.0"
react-debounce-render: "npm:^8.0.2"
react-dom: "npm:^18.3.1"
react-dom: "npm:^19.0.0"
react-drag-drop-files: "npm:^3.0.0"
react-draggable: "npm:^4.4.5"
react-dropzone: "npm:^14.2.3"
Expand All @@ -7794,7 +7816,7 @@ __metadata:
react-simple-keyboard: "npm:^3.6.27"
react-sortable-hoc: "npm:^2.0.0"
react-syntax-highlighter: "npm:^16.0.0"
react-test-renderer: "npm:^18.2.0"
react-test-renderer: "npm:^19.0.0"
react-textarea-autosize: "npm:^8.5.2"
redux-mock-store: "npm:^1.5.4"
redux-saga: "npm:^1.2.3"
Expand Down Expand Up @@ -8260,6 +8282,22 @@ __metadata:
languageName: node
linkType: hard

"hermes-estree@npm:0.25.1":
version: 0.25.1
resolution: "hermes-estree@npm:0.25.1"
checksum: 10c0/48be3b2fa37a0cbc77a112a89096fa212f25d06de92781b163d67853d210a8a5c3784fac23d7d48335058f7ed283115c87b4332c2a2abaaccc76d0ead1a282ac
languageName: node
linkType: hard

"hermes-parser@npm:^0.25.1":
version: 0.25.1
resolution: "hermes-parser@npm:0.25.1"
dependencies:
hermes-estree: "npm:0.25.1"
checksum: 10c0/3abaa4c6f1bcc25273f267297a89a4904963ea29af19b8e4f6eabe04f1c2c7e9abd7bfc4730ddb1d58f2ea04b6fee74053d8bddb5656ec6ebf6c79cc8d14202c
languageName: node
linkType: hard

"highlight.js@npm:^10.4.1, highlight.js@npm:~10.7.0":
version: 10.7.3
resolution: "highlight.js@npm:10.7.3"
Expand Down Expand Up @@ -11293,15 +11331,14 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:^18.3.1":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
"react-dom@npm:^19.0.0":
version: 19.2.3
resolution: "react-dom@npm:19.2.3"
dependencies:
loose-envify: "npm:^1.1.0"
scheduler: "npm:^0.23.2"
scheduler: "npm:^0.27.0"
peerDependencies:
react: ^18.3.1
checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85
react: ^19.2.3
checksum: 10c0/dc43f7ede06f46f3acc16ee83107c925530de9b91d1d0b3824583814746ff4c498ea64fd65cd83aba363205268adff52e2827c582634ae7b15069deaeabc4892
languageName: node
linkType: hard

Expand Down Expand Up @@ -11397,17 +11434,24 @@ __metadata:
languageName: node
linkType: hard

"react-is@npm:^16.12.0 || ^17.0.0 || ^18.0.0, react-is@npm:^18.0.0, react-is@npm:^18.3.1":
"react-is@npm:^17.0.1":
version: 17.0.2
resolution: "react-is@npm:17.0.2"
checksum: 10c0/2bdb6b93fbb1820b024b496042cce405c57e2f85e777c9aabd55f9b26d145408f9f74f5934676ffdc46f3dcff656d78413a6e43968e7b3f92eea35b3052e9053
languageName: node
linkType: hard

"react-is@npm:^18.0.0":
version: 18.3.1
resolution: "react-is@npm:18.3.1"
checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072
languageName: node
linkType: hard

"react-is@npm:^17.0.1":
version: 17.0.2
resolution: "react-is@npm:17.0.2"
checksum: 10c0/2bdb6b93fbb1820b024b496042cce405c57e2f85e777c9aabd55f9b26d145408f9f74f5934676ffdc46f3dcff656d78413a6e43968e7b3f92eea35b3052e9053
"react-is@npm:^19.2.3":
version: 19.2.3
resolution: "react-is@npm:19.2.3"
checksum: 10c0/2b54c422c21b8dbd68a435a1cce21ecd5b6f06f48659531f7d53dd7368365da5a67e946f352fb2010d11ca40658aa67bec90995f0f1ec5556c0f71dbffe54994
languageName: node
linkType: hard

Expand Down Expand Up @@ -11593,18 +11637,6 @@ __metadata:
languageName: node
linkType: hard

"react-shallow-renderer@npm:^16.15.0":
version: 16.15.0
resolution: "react-shallow-renderer@npm:16.15.0"
dependencies:
object-assign: "npm:^4.1.1"
react-is: "npm:^16.12.0 || ^17.0.0 || ^18.0.0"
peerDependencies:
react: ^16.0.0 || ^17.0.0 || ^18.0.0
checksum: 10c0/c194d741792e86043a4ae272f7353c1cb9412bc649945c4220c6a101a6ea5410cceb3d65d5a4d750f11a24f7426e8eec7977e8a4e3ad5d3ee235ca2b18166fa8
languageName: node
linkType: hard

"react-simple-keyboard@npm:^3.6.27":
version: 3.8.141
resolution: "react-simple-keyboard@npm:3.8.141"
Expand Down Expand Up @@ -11660,16 +11692,15 @@ __metadata:
languageName: node
linkType: hard

"react-test-renderer@npm:^18.2.0":
version: 18.3.1
resolution: "react-test-renderer@npm:18.3.1"
"react-test-renderer@npm:^19.0.0":
version: 19.2.3
resolution: "react-test-renderer@npm:19.2.3"
dependencies:
react-is: "npm:^18.3.1"
react-shallow-renderer: "npm:^16.15.0"
scheduler: "npm:^0.23.2"
react-is: "npm:^19.2.3"
scheduler: "npm:^0.27.0"
peerDependencies:
react: ^18.3.1
checksum: 10c0/c633558ef9af33bc68f0c4dbb5163a004c4fb9eade7bd0a7cfc0355fb367f36bd9d96533c90b7e85a146be6c525113a15f58683d269e0177ad77e2b04d4fe51c
react: ^19.2.3
checksum: 10c0/842b82239dbddbc536083a6260c3e1b0507c02a3400bd05879fc19160468fd0f8ab79fec5dceffa6113b131835cc7621212f8415b46ea5156ab66bbfd7e24297
languageName: node
linkType: hard

Comment on lines +11696 to 11706

This comment was marked as outdated.

Expand Down Expand Up @@ -11726,12 +11757,10 @@ __metadata:
languageName: node
linkType: hard

"react@npm:^18.3.1":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
"react@npm:^19.0.0":
version: 19.2.3
resolution: "react@npm:19.2.3"
checksum: 10c0/094220b3ba3a76c1b668f972ace1dd15509b157aead1b40391d1c8e657e720c201d9719537375eff08f5e0514748c0319063392a6f000e31303aafc4471f1436
languageName: node
linkType: hard

Expand Down Expand Up @@ -12581,7 +12610,7 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.23.0, scheduler@npm:^0.23.2":
"scheduler@npm:^0.23.0":
version: 0.23.2
resolution: "scheduler@npm:0.23.2"
dependencies:
Expand All @@ -12590,6 +12619,13 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.27.0":
version: 0.27.0
resolution: "scheduler@npm:0.27.0"
checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452
languageName: node
linkType: hard

"schema-utils@npm:^4.2.0":
version: 4.3.2
resolution: "schema-utils@npm:4.3.2"
Expand Down Expand Up @@ -14914,6 +14950,22 @@ __metadata:
languageName: node
linkType: hard

"zod-validation-error@npm:^3.5.0 || ^4.0.0":
version: 4.0.2
resolution: "zod-validation-error@npm:4.0.2"
peerDependencies:
zod: ^3.25.0 || ^4.0.0
checksum: 10c0/0ccfec48c46de1be440b719cd02044d4abb89ed0e14c13e637cd55bf29102f67ccdba373f25def0fc7130e5f15025be4d557a7edcc95d5a3811599aade689e1b
languageName: node
linkType: hard

"zod@npm:^3.25.0 || ^4.0.0":
version: 4.2.1
resolution: "zod@npm:4.2.1"
checksum: 10c0/ecb5219bddf76a42d092a843fb98ad4cb78f1e1077082772b03ef032ee5cbc80790a4051836b962d26fb4af854323bc784d628bd1b8d9898149eba7af21c5560
languageName: node
linkType: hard

"zwitch@npm:^2.0.0":
version: 2.0.4
resolution: "zwitch@npm:2.0.4"
Expand Down
Loading