-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Require node@v18
for development
#10997
Conversation
Deploy preview: https://deploy-preview-10997--material-ui-x.netlify.app/ |
Why prevent people from using our libraries with React 17 if it's working fine? Same for NodeJS, we are upgrading the minimal version when we are forced to do it. |
As for the Node version, I do agree with the proposal of bumping the minimum version. |
I don't think that's our role. Btw the core is still using |
Maybe because their major is old? 🤔 |
With major version change, it seems to be better to bump Node.js requirements just to reserve possibility to bump dependencies later on. For example, eslint 9 will support only Node.js 18 and above, see https://eslint.org/blog/2023/11/whats-coming-in-eslint-9.0.0/. So we'll reserve possibility of using eslint 9 when released, otherwise we'll need to wait for another major version for eslint 9. There might be other dependencies too, in the future. Also, CI runs Node.js 18 only so we'll never now if we broke something on older Node.js versions. |
MUI need to bump it with next major version, because Node.js requirement is breaking change. |
Here we are mixing two things: the Node version we say we are compatible with and the Node version we are using in our tooling. |
I expect that it'll take some time until stable release, and by then Node.js 18 or maybe 20 will be commonly used version. |
it there a way to separate the two? or maybe we can require Node.js 18 on the top level, and 16 in packages? |
We are separating the two, I'm using 18 (should move to 20) to work with this repo. To stick with the modification done in this PR. |
Next.js 14 supports 18.17 and above, see https://nextjs.org/blog/next-14#other-changes |
For React, they might have some reason to bump it since there is some very small BC between the two. |
React 18 supports concurrent rendering and suspense 😉 |
325613f
to
9ef001a
Compare
Sure, but if you can support Concurrent Rendering and Suspense for your user that have React 18 and still let people use React 17 if they did not have the time to migrate (without the new features ofc), then you are just covering a broader part of the community. |
I'm adding Node.js 18 requirements on top level package.json or for developers. Leaving Node.js 14 as is for packages considering that there might be Next.js 13 users who wants to use MUI-X 7.x. Thanks for suggestions 🙏 |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@mui/code-infra What's your take on this one? But I'm not sure if that would benefit anyone, because without a change in how we build/ship packages, nothing will change in regards to the delivered packages, at least based on my testing modifying the |
On the monorepo, yes. I think it's reasonable to expect from contributors to be on at least the current LTS release line of Node.js. The goal is to communicate both internally and to contributors which APIs we expect the runtime to support for our scripts. This avoids wasting time on debugging platform issues with the scripts. Oh, and it doesn't have to be on the next major if it only affects our tooling.
We should absolutely do it for both repos |
Thank you for the confirmation @Janpot. 🙏 |
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 and patience reacting to feedback @dulmandakh! 🙏
Could you please merge with latest upstream/next
to resolve the conflicts? 🤔
node@18
for development
node@18
for developmentnode@v18
for development
Co-authored-by: Lukas <[email protected]> Signed-off-by: Olivier Tassinari <[email protected]>
Personally, I don't get the value of this change:
|
We may support older versions, but we have dependencies in our monorepo that require node >18. The engines resriction is already de facto in place. You can't install on node <18 already. Ironically we don't support newer versions very well, e.g. can't |
@oliviertassinari @Janpot Since https://github.com/mui/mui-x/pull/11366/files/ecaa7806ccbf2184bae4f898484da0b4ce6c655e#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47 the minimal version that the project can start on is |
@LukasTy Today we have v14 in MUI X as the minimum mui-x/packages/x-tree-view/package.json Line 66 in 57c6f9d
and v12 in Material UI https://github.com/mui/material-ui/blob/bc212467e7ebc75bec71cb6cd951041ec1c01a22/packages/mui-joy/package.json#L90 I think:
|
@oliviertassinari This PR is about setting the 100% agree that our end-users shouldn't get this restriction, but that's not what this PR does. Not gonna die on this hill though 🙂 |
@oliviertassinari But we are not touching node versions of the packages we expose, it's only the root package that we are discussing the version change of. I propose to set |
@Janpot Agree, I covered this in point 4. I thought we first needed to have clarity on what's the expected experience we want end-users, to figure from there, how we can design the experience for the people who build that experience. If the root repository minimum node version is set to v18, then how are we supposed to work on v12?
@LukasTy
This makes more sense to me, but how is the error Next.js gives not clear enough? Why have to maintain such an engine, to keep it up to date?
#plea for the npm package. #suggestion for the dev package, I think the bulk of my thought is raised just ⬆️. I'm unsubscribing, I think I contributed enough 😄 |
@dulmandakh Thank you for your contribution, but we are closing this PR. 🙇 Feel free to contribute in the future and thank you for your patience! 🙏 |
This will become increasingly difficult as testing tools drop support for older Node versions as well (for example https://github.com/chaijs/chai/releases/tag/v5.0.0). Why do want to ensure our libraries run on unmaintained versions of Node anyway? |
I also agree that the use-case doesn't make sense to me. If we were already testing those older nodejs versions, I would understand that we keep them working. But we're not, iiuc? And it should also be noted that v18 is already in maintenance mode, the current LTS is v20. Even older versions should definitely not be used. |
FWIW, I'm also on the same camp—I'm not sure what value we bring by releasing the latest version of the library and still shipping it with ancient API and declaring support down to Node 12 when we actually do not even test it, even our dev I do understand this position for |
First of all, thank you for MUI X.
This PR adds Node.js 18 requirement for mui-x developers, just to make it clear.