-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[code-infra] Make useReactVersion
script reusable in other repos
#42828
Conversation
Netlify deploy previewhttps://deploy-preview-42828--material-ui.netlify.app/ Bundle size report |
Not going to block this PR, but if it's just to pass a workspace root path I'd consider just sharing the cli like we do with the changelog script. Less code to maintain and less implicit API shared between repos. |
@Janpot Hmm, do you mean something like this? |
Yes, it's just a suggestion, I have a preference but it's not a strong one neither 😄 |
@Janpot I looked into this, and it seems that I have to use the |
27e5c38
to
c30f83d
Compare
When the script is run as a package.json script then |
c30f83d
to
6f5f6db
Compare
Right, I didn't think about this! |
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.
perfect
useReactVersion
script reusable in other repos
As a next step, we could move it to @mui/internal-scripts so it can be referenced from the npm package in other repos. |
For MUI X, I duplicated the
useReactVersion.mjs
script in mui/mui-x#13360, but eventually, I want to use the script from the monorepo.I've extracted the CLI to a separate file, so now other repos ca import thesetReactVersion
function.