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

Addon: Interactions - include the source of jest-mock #23593

Closed
wants to merge 4 commits into from

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Jul 25, 2023

Closes #23570

What I did

I copied the source code of jest-mock into the source code of addon interactions.
I did this because jest-mock depends on jest-util. Both these packages are compiled to CJS. That cannot be treeshaken, which causes the dependencies for (unused code-paths) in jest-util to be included in the browser bundle.

How to test

  • Maybe we can use the canary release process and ask the issue-reporter to test on their reproduction repo

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]

🦋 Canary release

This pull request has been released as version 7.2.0-canary-23593-1690276507-975d4e05.0. Install it by pinning all your Storybook dependencies to that version.

More information
Published version 7.2.0-canary-23593-1690276507-975d4e05.0
Triggered by @ndelangen
Repository storybookjs/storybook
Branch norbert/jest-mock-included
Commit 975d4e05
Datetime Tue Jul 25 09:15:07 UTC 2023 (1690276507)
Workflow run 5654913774

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=23593

@ndelangen
Copy link
Member Author

@Methuselah96 would you be willing to assist verifying if this PR resolves the issue your reported?

I've triggered a canary release, it should appear soon allowing you to test this.

@ndelangen ndelangen closed this Jul 25, 2023
@Methuselah96
Copy link
Contributor

@ndelangen Looks like you went with just downgrading jest-mock in #23597 instead? Let me know if you still want me to test.

@ndelangen
Copy link
Member Author

Yes, though I'm not happy with that route. I'd love to know if this solution actually worked, so if you wouldn't mind testing it that would be 🙏

@Methuselah96
Copy link
Contributor

Methuselah96 commented Jul 25, 2023

Makes sense. I tested this and it fixes the issue for me.

@stof stof deleted the norbert/jest-mock-included branch August 2, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Storybook 7.1 interactions addon fails to build with Yarn PnP
2 participants