-
Notifications
You must be signed in to change notification settings - Fork 826
chore: Fix various peer dependency warnings #2054
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mui-org/material-ui-pickers/cfg0zq670 |
| "node": ">=8.0.0" | ||
| }, | ||
| "dependencies": { | ||
| "@babel/core": "^7.9.6", |
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.
Fixes "missing peer"-warning.
| }, | ||
| "dependencies": { | ||
| "@babel/core": "^7.9.6", | ||
| "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", |
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.
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", |
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.
Fixes "missing peer"-warning
| "**/@babel/core": "^7.9.6", | ||
| "**/webpack": "^4.43.0" |
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.
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
| "react": "^16.13.1", | ||
| "react-dom": "^16.13.1", | ||
| "typescript": "^3.9.6", |
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.
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", |
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.
Fixes "missing peer"-warning.
| }, | ||
| "devDependencies": { | ||
| "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", | ||
| "@babel/preset-env": "^7.9.6", |
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.
Fixes "missing peer"-warning.
| "eslint-plugin-react": "^7.19.0", | ||
| "eslint-plugin-react-hooks": "^4.0.5", |
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.
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", |
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.
Fixes "missing peer"-warning. Worked incidentally since it was hoisted from the docs workspace.
| "@typescript-eslint/eslint-plugin": "^1.6.0", | ||
| "@typescript-eslint/parser": "^1.6.0", |
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.
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.
Test summaryRun details
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 |
|
@eps1lon Regarding the migration plan of pickers into the main repository, the current proposed candidate approach is:
What do you think about it? |
|
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. |
Please do :)
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?
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. |
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.
Thanks 😊
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.