-
-
Notifications
You must be signed in to change notification settings - Fork 32.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] Add pkg.pr.new
publishing
#42984
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-42984--material-ui.netlify.app/ Bundle size report |
.github/workflows/ci.yml
Outdated
@@ -40,6 +40,9 @@ jobs: | |||
- run: pnpm build:ci | |||
env: | |||
NODE_OPTIONS: --max_old_space_size=4096 | |||
|
|||
- run: pnpm dlx pkg-pr-new publish './packages/*' --template './examples/*' --compact |
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.
It looks like this should run in CircleCI. We test the build flow on different OS here.
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 will spam notifications and clutter the UI otherwise:
- run: pnpm dlx pkg-pr-new publish './packages/*' --template './examples/*' --compact | |
- run: pnpm dlx pkg-pr-new publish './packages/*' --template './examples/*' --compact --comment=off |
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.
@oliviertassinari Can you install the app on this repo? I don't seem to have write access.
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 believe it's already installed.
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.
There would be only one comment by pkg.pr.new and that will be updated again & again! But anyway, I'll sort this one out.
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.
It looks like this should run in CircleCI
Oh, I see, pkg.pr.new is not supported on CircleCI, it needs to be run in github workflows only.
What I'm missing from this PR is why. To be honest, I don't even understand why CodeSandbox is doing CodeSandbox CI. It's great for us, but seems to mostly be costs for them 😁. The closest thing to what I see as valuable is fixing: stackblitz/core#437 (comment) but it doesn't seems to need pkg.pr.new. The cons I see:
But maybe CodeSandbox CI is not reliable? I don't know. I tested stackblitz/core#437 (comment) again, I guess it's not working? https://stackblitz.com/edit/react-raw8yb-b4fq34?file=package.json |
I can let the team know so they can fix it. But pkg.pr.new already works with this case.
Yea, it is another workflow! So for instance, if the build steps change, the workflow should be updated for instance, which is something universal across the whole repo though. I can sort this PR out soon, but if you think closing it make more sense, I'm all there for that, sometimes just adding extra stuff is not worth it. I appreciate the honest feedback here ❤️ |
Codesandbox had three outages in the last three months. Impacting us more than it should have. Granted, we shouldn't have relied so much on it in our critical paths in the first place. My intent is not to migrate or to allocate a lot of maintenance to pkg.pr.new. But I'd like to know what our options are. If it eats up too much maintenance time, I'm happy to remove it again.
Did a quick install and I noticed that it's not rewriting dependency specifiers for workspace dependencies. e.g. when you install https://pkg.csb.dev/mui/material-ui/commit/5777e630/@mui/material you will notice that its |
Yes, it's already handled in pkg.pr.new but this is likely a bug on our side, sorry for the bad experience, I'll sort it out for you! |
I think now it's sorted out, but there's a minor issue I'd like to ask you! Here's the published package.json (of my fork): "dependencies": {
"@babel/runtime": "^7.24.8",
"@mui/core-downloads-tracker": "https://pkg.pr.new/Aslemammad/material-ui/@mui/core-downloads-tracker@b29e8b8",
"@mui/system": "https://pkg.pr.new/Aslemammad/material-ui/@mui/system@b29e8b8",
"@mui/types": "https://pkg.pr.new/Aslemammad/material-ui/@mui/types@b29e8b8",
"@mui/utils": "https://pkg.pr.new/Aslemammad/material-ui/@mui/utils@b29e8b8",
"@popperjs/core": "^2.11.8",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.1",
"csstype": "^3.1.3",
"prop-types": "^15.8.1",
"react-is": "^18.3.1",
"react-transition-group": "^4.4.5"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@mui/material-pigment-css": "workspace:^",
"@types/react": "^17.0.0 || ^18.0.0",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
}, As you can see, in pkg.pr.new I decided to not touch I would love to hear your thoughts! |
@Janpot 👍
@Aslemammad It seems to work with the runtime side: https://stackblitz.com/edit/vitejs-vite-gmeaac?file=src%2FApp.tsx,package.json,tsconfig.json&terminal=dev. But it's still broken with the older mode that provides a better DX: https://stackblitz.com/edit/react-7qjqad?file=src%2FApp.js,package.json.
pnpm would replace this with the version in the workspace. I would expect pkg.pr.new to extend pnpm behavior. This is CodeSandbox CI output, it looks correct: "dependencies": {
"@babel/runtime": "^7.24.8",
"@mui/core-downloads-tracker": "https://pkg.csb.dev/mui/material-ui/commit/6165feea/@mui/core-downloads-tracker",
"@mui/system": "https://pkg.csb.dev/mui/material-ui/commit/6165feea/@mui/system",
"@mui/types": "https://pkg.csb.dev/mui/material-ui/commit/6165feea/@mui/types",
"@mui/utils": "https://pkg.csb.dev/mui/material-ui/commit/6165feea/@mui/utils",
"@popperjs/core": "^2.11.8",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.1",
"csstype": "^3.1.3",
"prop-types": "^15.8.1",
"react-is": "^18.3.1",
"react-transition-group": "^4.4.5"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@types/react": "^17.0.0 || ^18.0.0",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"@mui/material-pigment-css": "^6.0.0-beta.1"
}, |
Resolved now! In the new release, I messed up the message formatting a bit, but that would be fixed soon. But anyway, I think this PR is ready! |
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.
Thank you for your contribution! 🙏
Could you sync your branch with latest upstream/next
to fix CI?
I'm not very familiar with material-ui
CI setup, so, I'm not sure I can approve or decline this change, but I'm all for experimenting with it, maybe also in mui-x
repo after this and considering swapping the codsandbox
for this. 🤔
@LukasTy Thank you so much Lukas, sure! I just merged the next branch. And also resolved the first comment 🙌 |
Nitpick: You have removed the comment from where it made sense, as that job calls |
This reverts commit 070ba3d.
Ohh sorry my bad, just resolved it! |
|
just resolved this!
Since it uses npm/pnpm under the hood for packing, it respects but the issue it creates is that the omitted build directories do not have the url version of the workspace dependencies! That's why we're just targeting |
Hello everyone, I hope you're doing well! I wonder if there's anything remaining I can do on this PR, would be happy help further. |
Resolves #42922
Now we only need to install the app so we can have the pr being released!