Skip to content
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

[docs] Limit date-fns package to v2 in codesandbox #11463

Merged
merged 6 commits into from
Dec 21, 2023

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Dec 19, 2023

Noticed that our codesandboxes using date-fns will no longer work after the v3 release.
Discovered while investigating #11454.
Uses changes in mui/material-ui#40257.

@LukasTy LukasTy added docs Improvements or additions to the documentation external dependency Blocked by external dependency, we can’t do anything about it component: pickers This is the name of the generic UI component, not the React module! labels Dec 19, 2023
@LukasTy LukasTy self-assigned this Dec 19, 2023
@mui-bot
Copy link

mui-bot commented Dec 19, 2023

Deploy preview: https://deploy-preview-11463--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against f67a686

@@ -59,7 +64,6 @@ ponyfillGlobal.muiDocConfig = {
'@mui/x-date-pickers-pro': getMuiPackageVersion('x-date-pickers-pro', muiCommitRef),
'@mui/x-charts': getMuiPackageVersion('x-charts', muiCommitRef),
'@mui/x-tree-view': getMuiPackageVersion('x-tree-view', muiCommitRef),
'date-fns': 'latest',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defining the version did not work, because this would override it:

https://github.com/mui/material-ui/blob/8be7ac66b99059bf2c2edcca9cf15981d389db6b/docs/src/modules/sandbox/Dependencies.ts#L157

WDYT @flaviendelangle, does the proposal make sense or shall we refactor the code in monorepo?
But in that case, we'd be blocked for the moment, because we currently can't bump monorepo. 🙈

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long do we think we will be blocked from bumping the monorepo?

Having latest hardcoded is really not a good pattern 😬

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long do we think we will be blocked from bumping the monorepo?

Given the complexity of #11303 I'd bet that it is not happening this year. 😃
So, at least 2+ weeks of a few broken demos in codesandbox.

Having latest hardcoded is really not a good pattern 😬

I don't disagree. It's error-prone, like we see now. 🙈
But I'd say that in such case, all of it should be controlled on the consuming side.
Now we have a bunch of logic in monorepo, some of it overrides whatever we specify here... 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be totally fine if you took the current commit of the monorepo on your repo and just did the date-fns fix
That's not clean, but this is a very bad regression on our doc 😬

But I'd say that in such case, all of it should be controlled on the consuming side.

Yes you're right
latest is bad AND having to go to the monorepo to fix it is bad...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flaviendelangle WDYT about the updated solution with fixes originating from @mui/monorepo? 🤔

@LukasTy LukasTy added the needs cherry-pick The PR should be cherry-picked to master after merge label Dec 20, 2023
@LukasTy LukasTy merged commit d7149ef into mui:next Dec 21, 2023
17 checks passed
@LukasTy LukasTy deleted the limit-date-fns-to-v2 branch December 21, 2023 08:31
@@ -21,4 +21,5 @@ module.exports = {
'**/build/**',
'docs/.next/**',
],
spec: ['packages/**/*.test.{js,ts,tsx}', 'docs/src/modules/**/*.test.{js,ts,tsx}'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change prevents pnpm tc from working. Restoring this in #14852.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation external dependency Blocked by external dependency, we can’t do anything about it needs cherry-pick The PR should be cherry-picked to master after merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants