How can I constrain mui/base to be a lower version...
# react
s
How can I constrain mui/base to be a lower version than
@mui/base@5.0.0-alpha.127
? Because that's the latest version and is automatically used, but contains a breaking change (the
Unstyled
suffix is removed from all components, but this is not yet the case for the kotlin-wrappers). I'm using kotlin-wrappers-bom, and I thought that was supposed to prevent issues like these, but it does not seem to.
t
You can add NPM dependencies with fixed versions
Also Yarn dependency resolution can be used
s
Thanks, Yarn dependency resolution worked for me
For future reference; it is described in https://kotlinlang.org/docs/whatsnew1420.html#gradle-dsl-changes, so you can add something like the following to
build.gradle.kts
:
Copy code
rootProject.plugins.withType<YarnPlugin> {
    rootProject.the<YarnRootExtension>().apply {
        resolution("@mui/material", "5.11.2")
    }
}
kotlin-wrappers-bom uses the carrot ^ symbol in all versions which allows any version of a library with the same major version. Normally this is fine, because any breaking changes to a package get a new major version (hopefully), but this isn't the case for
@mui/base
t
Could you please file an issue?
s
Do you mean about possibly changing/removing the ^ symbol in the versioning?
t
Yes, but only for MUI
MUI looks like exception
t
Thank you!