-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
[core] Add warning for imperative built-in action calls #4876
[core] Add warning for imperative built-in action calls #4876
Conversation
🦋 Changeset detectedLatest commit: 4be3f35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -4,6 +4,7 @@ const { constants } = require('jest-config'); | |||
* @type {import('@jest/types').Config.InitialOptions} | |||
*/ | |||
module.exports = { | |||
prettierPath: null, |
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.
Mitigates this error:
Jest: Inline Snapshots are not supported when using Prettier 3.0.0 or above.
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.
Supposedly it is fixed in Jest@30 (alpha) but 29 is still the latest version 😢
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.
LGTM 👍 (although I am not familiar with the entire code base like you 🙈 )
Ping @Andarist |
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
packages/core/src/stateUtils.ts
Outdated
@@ -1550,6 +1554,7 @@ function resolveAndExecuteActionsWithContext( | |||
: undefined; | |||
|
|||
function executeAction() { | |||
executingCustomAction = resolvedAction; |
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'd move this into the try block, it will be more clear that it goes together with the reset in the finally block
This PR warns for improper imperative calls of built-in actions, which is a very common problem.
https://stately.ai/docs/actions#built-in-actions