-
Notifications
You must be signed in to change notification settings - Fork 16
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(cli app scripts): update to 5.7.2 and adjust related files #523
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
Code change LGTM, obviously tests need to pass and I haven't tried running this locally
There is a funky test failure in the Transfer's LeftSide component when it imports the background color. I can resolve it manually, so it's definitely there, but for some reason loading the CJS fails in the test. |
Ah, I see:
|
I've seen that one as well. But I can't figure out why it's happening. It's never failed before, the imports seem correct. I was able to get the test to succeed again by renaming that file, run the test and then rename the file back to its original name. The second time the error occurred, I wasn't able to do anything about it (even after deleting all node module folders, clearing jest's and yarn's caches and then installing the packages again) |
This comment has been minimized.
This comment has been minimized.
The test is failing because we now copy all the source files to the build directory, and Jest is very eager when it comes to finding and running tests, so it also runs them from the This fixes the |
There is some strange interactions going on between Storybook's Webpack and Bable setup, where some sources are imported through the entry-points in the When I swap out e.g. |
In my opinion importing from the built library is the actual correct implementation, because it doesn't require that storybook needs to be aware of any build steps required to get the component to work. EDIT: Good find, btw |
@Mohammer5 That brings us to the next step. Nothing in subpackages is allowed to import |
Alright, I figured out a way to override the Storybook Babel configuration with our necessary customization. |
🎉 This PR is included in version 6.5.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@dhis2/cli-app-scripts
package to 5.7.0build/[es|cjs]/lib.js
to./build/[es|cjs]/index.js
exports
field to all workspaces' `package.jsonWhen running
yarn build:icons
on master, the following files are being created:When switching to this branch, this does not happen anymore until I added an
index.js
to the icons' src folder which imports./react/index.js