Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update react-test-renderer version #17865

Closed
Closed
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
2 changes: 1 addition & 1 deletion addons/storyshots/storyshots-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"jest-specific-snapshot": "^4.0.0",
"preact-render-to-string": "^5.1.19",
"pretty-format": "^26.6.2",
"react-test-renderer": "^16.8.0 || ^17.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

I think we need a devDependency on the version we're currently using in the monorepo; otherwise yarn might install a too new of a version if we regenerate the lockfile.

Could you add this?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the unit test are failing because of the update, could you have a look?
https://app.circleci.com/pipelines/github/storybookjs/storybook/25536/workflows/5f9b2073-68d0-44cc-b528-962a226d74a3/jobs/378122
🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ndelangen Thanks for your feedback!

I think we need a devDependency on the version we're currently using in the monorepo; otherwise yarn might install a too new of a version if we regenerate the lockfile.

Could you add this?

Did you mean that I should move react-test-renderer in dependencies to devDependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the unit test is failing because of these 'isBatchingLegacy' of undefined errors.

image

Maybe I should first check what change has been made to react-test-renderer changed since version 17?
https://github.com/facebook/react/commits/main/packages/react-test-renderer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like react-test-renderer 18 is not meant to be used with older react.
We probably cannot be able to upgrade react-test-renderer before upgrading react and react-dom in this repo first 🤔

"react-test-renderer": "^16.8.0 || ^17.0.0 || ^18.0.0",
"read-pkg-up": "^7.0.1",
"regenerator-runtime": "^0.13.7",
"ts-dedent": "^2.0.0"
Expand Down
33 changes: 24 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6873,7 +6873,7 @@ __metadata:
jest-vue-preprocessor: ^1.7.1
preact-render-to-string: ^5.1.19
pretty-format: ^26.6.2
react-test-renderer: ^16.8.0 || ^17.0.0
react-test-renderer: ^16.8.0 || ^17.0.0 || ^18.0.0
read-pkg-up: ^7.0.1
regenerator-runtime: ^0.13.7
rxjs: ^6.6.3
Expand Down Expand Up @@ -38064,6 +38064,13 @@ __metadata:
languageName: node
linkType: hard

"react-is@npm:^18.0.0":
version: 18.0.0
resolution: "react-is@npm:18.0.0"
checksum: 1cffa48e45768fc49c6cfa67fdb6ccd2432bb1a5074575c1c48b425104e5ba03538a2d4496dfc6c844f34d1ab2b9304c97aab6c8a3b060d4f5587b2f128db8d4
languageName: node
linkType: hard

"react-lifecycles-compat@npm:^3.0.0, react-lifecycles-compat@npm:^3.0.4":
version: 3.0.4
resolution: "react-lifecycles-compat@npm:3.0.4"
Expand Down Expand Up @@ -38432,17 +38439,16 @@ __metadata:
languageName: node
linkType: hard

"react-test-renderer@npm:^16.8.0 || ^17.0.0":
version: 17.0.2
resolution: "react-test-renderer@npm:17.0.2"
"react-test-renderer@npm:^16.8.0 || ^17.0.0 || ^18.0.0":
version: 18.0.0
resolution: "react-test-renderer@npm:18.0.0"
dependencies:
object-assign: ^4.1.1
react-is: ^17.0.2
react-is: ^18.0.0
react-shallow-renderer: ^16.13.1
scheduler: ^0.20.2
scheduler: ^0.21.0
peerDependencies:
react: 17.0.2
checksum: a4ea1e745a87bb9015540d96a3077b614bf88e306a0edd639f8fb849a393fa5104e84eca4349bc4b026f2f0b115a4172d58950d7076316115795266557659276
react: ^18.0.0
checksum: 1c61b461247232455af1c6d75905a14dc819a239e58f39691067dbc582175cba6b31a223757dc6f82b595a5360646ded67139c1c54aab62cd631c920bfa51d8c
languageName: node
linkType: hard

Expand Down Expand Up @@ -40715,6 +40721,15 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.21.0":
version: 0.21.0
resolution: "scheduler@npm:0.21.0"
dependencies:
loose-envify: ^1.1.0
checksum: 083a9a0c83f4923f7f5bb28d8bcf13cff42c90f4303bc187166520fcfc576c97e946d426c707d5a9c0aa0a655819605dd0c741467c626824bbf191251c126f1b
languageName: node
linkType: hard

"schema-utils@npm:2.7.0":
version: 2.7.0
resolution: "schema-utils@npm:2.7.0"
Expand Down