Addon Vitest: Fix postinstall file types#28978
Merged
Conversation
Contributor
There was a problem hiding this comment.
LGTM
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
☁️ Nx Cloud ReportCI is running/has finished running commands for commit d109914. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
ndelangen
approved these changes
Aug 27, 2024
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes N/A
NOTE: the problem below is actually fixed by #28980. But this PR is still valid. CJS should not require ESM.
What I did
Fix CJS requiring ESM. Not sure whether this will solve the problem.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Postinstall the canary (?)
🦋 Canary release
This pull request has been released as version
0.0.0-pr-28978-sha-d1099143. Try it out in a new sandbox by runningnpx storybook@0.0.0-pr-28978-sha-d1099143 sandboxor in an existing project withnpx storybook@0.0.0-pr-28978-sha-d1099143 upgrade.More information
0.0.0-pr-28978-sha-d1099143shilman/fix-vitest-postinstalld10991431724761618)To request a new release of this pull request, mention the
@storybookjs/coreteam.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=28978Greptile Summary
This pull request addresses an issue with the postinstall script for the @storybook/experimental-addon-vitest addon by updating file extensions to resolve CommonJS importing ESM problems.
code/addons/vitest/postinstall.cjsto require 'dist/postinstall.cjs' instead of '.js'code/addons/vitest/preset.cjsto directly export contents from 'dist/preset.cjs'