-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore: update mobx
from 5.15.4
to 6.13.5
and mobx-react
from 6.1.8
to 9.1.1
inside @packages/reporter
#30514
Conversation
cypress Run #58116
Run Properties:
|
Project |
cypress
|
Branch Review |
chore/update_reporter_mobx
|
Run status |
Passed #58116
|
Run duration | 17m 41s |
Commit |
5cca87a564: add changelog entry [run ci]
|
Committer | AtofStryker |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
26
|
Skipped |
0
|
Passing |
770
|
View all changes introduced in this branch ↗︎ |
UI Coverage
66.27%
|
|
---|---|
Untested elements |
26
|
Tested elements |
55
|
Accessibility
96.17%
|
|
---|---|
Failed rules |
0 critical
4 serious
1 moderate
0 minor
|
Failed elements |
205
|
TODO: need to check the test replay |
chore: update mobx-react from v7 to v9 [run ci] bump cache [run ci]
…in production mode, bundles the cjs production dependency of mobx (mobx.cjs.production.min.js) into cypress_runner.js (in the runner package), but @packages/app (bundled via vite), bundles mobx.esm.js, which is NOT minimized and is expecting the global store/state set by the app to also not be minimized. [run ci]
72a5e4b
to
5cca87a
Compare
@@ -5,6 +5,7 @@ _Released 11/5/2024 (PENDING)_ | |||
|
|||
**Dependency Updates:** | |||
|
|||
- Updated `mobx` from `5.15.4` to `6.13.5` and `mobx-react` from `6.1.8` to `9.1.1`. Addresses [#30509](https://github.com/cypress-io/cypress/issues/30509). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AtofStryker These don't need to be in the changelog, it's a chore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured it was best to keep it just in case someone runs into an issue and isn't sure where it came from. I don't think it fails the verify changelog job but I can remove it if you'd like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add these suggestions from the migration?
The MobX default configuration has become more strict. We recommend to adopt the new defaults after completing the upgrade, check out the Configuration {🚀} section. During migration, we recommend to configure MobX in the same way as it would be in v4/v5 out of the box: import {configure} from "mobx"; configure({ enforceActions: "never" });. After finishing the entire migration process and validating that your project works as expected, consider enabling the flags computedRequiresReaction, reactionRequiresObservable and observableRequiresReaction and enforceActions: "observed" to write more idiomatic MobX code.
I think we might want to consider it once we are in a fully stable over to react 18. Right now we toggle the |
@@ -15,13 +15,14 @@ export interface SessionProps extends InstrumentProps { | |||
} | |||
|
|||
export default class Session extends Instrument { | |||
@observable name: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its declared in the Instrument
class so its inherited. declaring it twice in mobx 6 throws an error
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
mobx
v6
andmobx-react
v9
#30509Additional details
Updates the Cypress Reporter to use updated
mobx
andmobx-react
. This is a prerequisite to updating to React 17 (or at least done in isolation outside of updating to React 17 (see #30510))To do this, I ran
npx mobx-undecorate --keepDecorators
to do the code migration and followed the mobx migration guidemobx-4.mp4
mobx-5.mp4
Steps to test
All tests should serve as a regression test, but we likely want to do some performance benchmark testing with honeycomb and make sure no issues there are present. It is also a good idea to take the published binaries and run them as a smoke test on your machine to make sure everything looks good
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?