Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Conversation

@eps1lon
Copy link
Member

@eps1lon eps1lon commented Aug 1, 2020

Please don't ignore these warnings. They're almost always correct.

It's especially important to align the main monorepo and the pickers monorepo. This should make integrating easier since the workspaces in pickers no longer rely on the whole dependency tree but can live on their own.

@vercel
Copy link

vercel bot commented Aug 1, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mui-org/material-ui-pickers/cfg0zq670
✅ Preview: https://material-ui-pickers-git-fork-eps1lon-chore-peer-warnings.mui-org.vercel.app

"node": ">=8.0.0"
},
"dependencies": {
"@babel/core": "^7.9.6",
Copy link
Member Author

@eps1lon eps1lon Aug 1, 2020

Choose a reason for hiding this comment

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

Fixes "missing peer"-warning.

},
"dependencies": {
"@babel/core": "^7.9.6",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
Copy link
Member Author

Choose a reason for hiding this comment

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

Was previously declared in the root but only used in the docs workspace.

"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.54",
"@material-ui/pickers": "^4.0.0-alpha.1",
"@mdx-js/mdx": "^0.15.7",
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes "missing peer"-warning

Comment on lines +79 to +80
"**/@babel/core": "^7.9.6",
"**/webpack": "^4.43.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

Technically next should declare it as a peer dependency with a default but that isn't supported in most package managers. In yarn v2 we will leverage packageExtensions instead of resolutions

Comment on lines +62 to +64
"react": "^16.13.1",
"react-dom": "^16.13.1",
"typescript": "^3.9.6",
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes "missing peer"-warning.

"@babel/preset-env": "^7.9.6",
"@babel/runtime": "^7.8.4",
"@cypress/webpack-preprocessor": "^4.1.0",
"@material-ui/core": "^4.11.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes "missing peer"-warning.

},
"devDependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"@babel/preset-env": "^7.9.6",
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes "missing peer"-warning.

Comment on lines -112 to -113
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.5",
Copy link
Member Author

Choose a reason for hiding this comment

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

These are used in the .eslintrc in the root. Therefore they should be declared in the root package.json.

"codecov": "^3.7.1",
"cross-env": "^7.0.2",
"date-fns": "^2.12.0",
"dayjs": "^1.8.27",
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixes "missing peer"-warning. Worked incidentally since it was hoisted from the docs workspace.

Comment on lines -102 to -103
"@typescript-eslint/eslint-plugin": "^1.6.0",
"@typescript-eslint/parser": "^1.6.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

These are used in the .eslintrc in the root. Therefore they should be declared in the root package.json which was already the case. 1.x was unused but keeping them around can be dangerous with a lax package manger.

@cypress
Copy link

cypress bot commented Aug 1, 2020



Test summary

78 0 3 0


Run details

Project material-ui-pickers
Status Passed
Commit f8fe066
Started Aug 1, 2020 9:55 AM
Ended Aug 1, 2020 9:57 AM
Duration 01:26 💡
OS Linux Debian - 10.0
Browser Chrome 80

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 1, 2020

@eps1lon Regarding the migration plan of pickers into the main repository, the current proposed candidate approach is:

  1. We hard merge pickers and main into a WIP repository, basically something identical to https://github.com/oliviertassinari/mui-merge/tree/master/packages/material-ui-pickers but with the latest code.
  2. We set up the CI on this new temporary repository.
  3. We drop all the tooling infrastructure from pickers (making the peer dependencies issues you are going after here vanish).
  4. We work on getting the CI green, moving all the components into the /packages/material-ui-lab folder, moving the documentation into the /docs folder.
  5. Once the CI is green, we backport the changes we had to do the main infrastructure to the main repository.
  6. We do 1. once more, but this time for real, with the main repo, hopefully, it will Just work™.
  7. We transfer all the existing issues of the pickers in the main repository.

What do you think about it?

@eps1lon
Copy link
Member Author

eps1lon commented Aug 1, 2020

I need to think about this a bit more. It seems like you're making things more complicated than necessary. There bigger, fundamental issues: how are the docs pages merged? Is pickers going core or lab?

This PR is important regardless of merging. Moving workspaces is just on use case that reveals issues with undeclared dependencies.

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 1, 2020

I need to think about this a bit more

Please do :)

how are the docs pages merged?

The documentation can be migrated, to the format of the main repository. We would need to replace the mdx syntax. But the demos are close to being usable as-is. We would still need to fix #1650 (e.g. use date-fns by default in the demos). But that isn't a blocker, it can be done incrementally.

I think that the main concern is the same one as we have with the data grid. How do we organize the navigation for components that require more than 1 page?

Is pickers going core or lab?

Maybe in the lab first? So it doesn't block us in 6 months if we are ready to cut a stable release but pickers aren't.

Copy link
Contributor

@dmtrKovalenko dmtrKovalenko left a comment

Choose a reason for hiding this comment

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

Thanks 😊

@dmtrKovalenko dmtrKovalenko merged commit 5424cdd into mui:next Aug 2, 2020
@eps1lon eps1lon deleted the chore/peer-warnings branch August 2, 2020 07:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants