-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[core] Bump monorepo #11303
[core] Bump monorepo #11303
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
🙂 Exactly the problem I described during the retreat: We added a npm dependency This makes it run for me (up until a runtime failure, but I'm leaving that for you): diff --git a/package.json b/package.json
index 51a9e13aa..439cfc3f0 100644
--- a/package.json
+++ b/package.json
@@ -159,12 +159,13 @@
"process": "^0.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "remark": "^15.0.1",
+ "remark": "^13.0.0",
"serve": "^14.2.1",
"sinon": "^16.1.3",
"stream-browserify": "^3.0.0",
"string-replace-loader": "^3.1.0",
"typescript": "^5.2.2",
+ "unist-util-visit": "^2.0.3",
"util": "^0.12.5",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4", This is still the most brittle setup. It will break in the blink of an eye and only works by accident. As long as we don't get rid of the cc @michaldudak This problem will likely compound the more internal packages we create. We may want to think about setting up publishing before creating more? |
3d0f2ad
to
da94a04
Compare
I managed to move a bit on the topic. A few Errors were interesting since they allowed me to add some information. But some would require a lot of work from X team to have an architecture similar to the core team. slots are not detected because our interfaces end with Stil to do
|
If the core is doing the same then yes |
Could extracting the |
I'm not sure I follow, the The root of the problem is that none of the yarn workspaces in the MUI core repo are recognized as npm packages by the X yarn workspace, hence none of their dependencies are installed, and none of them can be used as a yarn dependency without setting up aliases in the build tools. Actually they can't even be used at all without a build tool. And even after setting up these aliases, the imported code is completely different from the one that is referenced on our end-users' setup. |
Slots are from |
Sorry, I meant extracting everything we import from
This includes Babel transpilation and TS compilation, right? Is there something else? |
In that case yes I'm 100% in favor of unifying AND simplifying our naming |
In npm, pnpm and yarn<2, you can only specify the repository root as a dependency. Whether that root is a yarn workspace doesn't make a difference. All the package manager sees is a npm package at the root of the github repository, it completely ignores the (Unless you propose to create a github repository for every individual internal package)
Some tools don't run through a build pipeline at all, like the upcoming zero runtime next.js plugin. Or some of the markdown tooling in the docs. Some of our scripts also run natively on node.js. But building is only half of the problem. The other problem is that when you yarn install in the X repo, the |
My thought was to have no But if we need a build step anyway, then publishing to NPM makes more sense 👍🏻 |
But that would mean that one single package folder will be responsible for all of docs infra, all test infra, all linting, all build pipelines without any possibility of internally structuring this in a workspace. I think it wouldn't scale well. |
@alexfauquette Can I help you with something to move this PR forward? |
@cherniavskii With pleasure. I think there are two options. A short and a long one.
This PR is the long one. In parallel I'm adding settings I miss to make it work in this PR. For now, I'm near completion for date-pickers. Some slots are still missing, and the translations are destroyed after their creation I don't know why. If you need the core bump for any reason, giving a try to the quick fix solution could worth it |
Sure thing. We can discuss the priorities on the code infra meeting, but I'm on board with having npm publishing done soon. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
d8a0fc9
to
5a8a377
Compare
@cherniavskii Not sure we can trick the codecov. I've no idea why those code coverage decreased. But coverage modification i huge compare to the number of file modified Comparing next branch / this PR |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
trying to find out why codecov started ignoring test files that caused coverage drop
This reverts commit fdf84e7.
Import the modification from mui/material-ui#39808
Main modification
the file generated by
docs:api
don't have the same structure as before, but that's a feature, not a bug. We are now forced to be aligned with core <3The data grid is the one with the most custom behavior. Here are the modification I made:
@see Sett the {@link ....} for more details
is now handled by the core repositorychainProptypes
is removed. It was causing the recast parser fail. I preferred to remove them than spending maybe half a day to debug why it's causing issues. I copy past them at the end if someone want to bring them back (agreed with @cherniavskii on that point).[[GridColDef]]
by a link to the API page of grid col def interface got replaced as follow.docs:api
run first script from the core, then few custom script for the data grid (the one for interfaces, selectors and event).[[...]]
patterns by the correct link[[GridColDef[]]]
by[[GridColDef]][]
to let it work. Before/After:Some TS error are not spot by the CI. I assume it's unrelated to the
docs:api
but due to some other update in the monorepo. So I'm fixing them (they are commented in the PR):useSLotProps
needs to get the typing of additionalProps to work in the pickers, because some of those props are required in the generated object.placeholder
that does not exist in theRating
typing."Free" improvement
The core script do some stuff such as:
@default defaultValue
and theconst { propName=defaultValue } = props;
are the same.removed
chainProptypes
Here are the chain proptypes that got removed.