https://kotlinlang.org logo
Title
s

Steven

04/29/2023, 2:47 PM
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

turansky

04/29/2023, 4:45 PM
You can add NPM dependencies with fixed versions
Also Yarn dependency resolution can be used
s

Steven

04/29/2023, 5:39 PM
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
:
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

turansky

04/29/2023, 6:02 PM
Could you please file an issue?
s

Steven

04/29/2023, 6:04 PM
Do you mean about possibly changing/removing the ^ symbol in the versioning?
t

turansky

04/29/2023, 6:05 PM
Yes, but only for MUI
MUI looks like exception
t

turansky

04/29/2023, 6:16 PM
Thank you!