-
-
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] Prepare publishing @mui-internal/typescript-to-proptypes to npm #40842
[code-infra] Prepare publishing @mui-internal/typescript-to-proptypes to npm #40842
Conversation
Netlify deploy previewhttps://deploy-preview-40842--material-ui.netlify.app/ Bundle size report |
7b11dc2
to
a7883c3
Compare
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'm good with this if mui/mui-x#11801 passes
a7883c3
to
ea51686
Compare
ea51686
to
f9dffaa
Compare
@@ -0,0 +1,30 @@ | |||
{ | |||
"name": "@mui-internal/docs-utils", |
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.
This package was released 3 days ago https://www.npmjs.com/package/@mui-internal/docs-utils.
@michaldudak Could we:
- Remove all the members in https://www.npmjs.com/settings/mui-internal/members. I don't have admin permissions to do it. This should be enough to not silently fail.
- Rename all of these to @mui/internal-*
- npm deprecate the @mui-internal/* packages
- Isolate the @mui/internal-* packages to the Material UI, Joy UI, Base UI, MUI System npm packages. We need to publish the former for each commit, and the latter once a week. So it seems to me that two should be released with two different scripts. It's also relevant to isolate npm permissions.
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.
Hi, yes, that's the plan.
Isolate the @mui/internal-* packages to the Material UI, Joy UI, Base UI, MUI System npm packages.
As far as I know, lerna version
does not support filtering, so having these packages in the same repo may force us to release on the same schedule as the public Core packages. We could write a custom script that resets their version after lerna version
finishes, but it may be confusing for the person releasing the packages.
One solution I can think of would be moving these packages to a separate infra repository and setting up different release rules there. If we used conventional commits, we could automate the most (if not whole) part of the release process, including the changelog generation. What do you think?
cc @Janpot
It's also relevant to isolate npm permissions.
Do you think about restricting who can publish the infra packages?
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.
If the goal is to develop the docs package in conjunction with the core libraries then I think following the core packages release schedule is the only option. The docs package has a dependency on the core packages, if they live in the same monorepo, it will depend on an unreleased version of the core packages in the monorepo. Any release of the docs package that is separate from a release of the core packages will potentially depend on unreleased changes in core packages and be broken. This is not a new problem, we already run into this with the current setup. Just last month alone monorepo update in X was blocked at least twice for several days just because it had to wait for core packages to be released. We can develop infra in a separate repo, but it takes away the ability to develop core and docs together.
And so here's where the submodules approach potentially could benefit us, bringing core modules + docs module together in the X monorepo and you act as if X+core is one big pnpm workspaces.
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.
Just last month alone monorepo update in X was blocked at least twice for several days just because it had to wait for core packages to be released
Oh, I didn't know this, but it makes sense, we are dogfooding new MUI System and Material UI APIs on the docs infra.
submodules approach
I was going to raise this, it's a new argument in the "pros" side.
But it feels like we could with some hacks release the infra packages more frequently than the product ones, and that the reliance on the release of the product packages is temporary, or that we could solve it with canary versions (under a different npm name to not clutter the npm version view).
It feels like it will be harder for MUI System team to dogfooding if we move the infra to the mui-public repository.
For context,
- I landed here from [material-ui] v5.15.11 still not available on npm after few days, but dependencies are #41260 (comment).
- I'm pushing so we move to monthly releases for the product packages, with canary on the side.
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 agree, this could be an issue with docs infra packages as they rely heavily on Core projects. The code infra packages, however, don't (or they are about to be decoupled), and could be released any time.
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.
But it feels like we could with some hacks release the infra packages more frequently than the product ones, and that the reliance on the release of the product packages is temporary, or that we could solve it with canary versions (under a different npm name to not clutter the npm version view).
This will be very tricky for X (and Toolpad), because the X packages rely on published releases of core packages. If the docs rely on docs infra which relies on canary releases, then we end up with two versions of core packages in the docs.
edit: I assumed docs package being an infra package, but rereading your comment, that's probably not what you meant
Prepare publishing the internal
typescript-to-proptypes
package and its dependency,docs-utils
to npm.Changes included:
typescript-to-proptypes
to@mui-internal/typescript-to-proptypes
.@mui-internal/docs-utilities
to@mui-internal/docs-utils
(to follow the pattern we use in other projects).getPropsFromComponentNode
function fromapi-docs-builder
todocs-utils
, as it's used by multiple projects.In the Core repo, these projects are referenced from source, as before.
MUI X integration PR: mui/mui-x#11801