v0.12.1
Pre-releaseThis release is feature-wise identical to v0.11.12 but targets Compose 1.3.1 / Kotlin 1.8.10.
Unfortunately, release v0.12.0 was dead out of the gate due to a major JS issue introduced in Kotlin 1.8.0, and users were recommended to skip it.
Therefore, users upgrading now may have missed the following information from the v0.12.0 release, which we are repeating here:
Note: Kobweb v0.12.0 is making some opinionated decisions around yarn locking. Most people will probably be OK not worrying about it, but you may wish to read on to decide if you want to override Kobweb's default behavior in your own project.
Since Kotlin 1.8.0, the Kotlin/JS Gradle plugin is a bit more strict about yarn.lock
files, now expecting users to check kotlin-js-store/yarn.lock
into source control as a best practice. By default, normal Kotlin/JS builds now fail if you had an old yarn.lock
file that is about to get updated with some new values, requiring explicit user action to continue.
For Kobweb, however, we're currently taking the opinion that failing the build is probably too harsh for most simple, single-owner projects, and that most users can get away with regenerating the lock file every time.
As a result, the Kobweb plugin configures things to auto-regenerate the lock file by default, rather than failing. (This would be equivalent to you creating a new Kobweb project from scratch, at which point a new lock file would be generated with the latest values anyway)
If for your project you want to opt-in to failing the build if the lock file has changed, then I recommend taking the following steps:
- In your build script, update your kobweb block:
kobweb {
yarn.lockChangedStrategy.set(YarnLockChangedStrategy.Fail)
// or, yarn.lockChangedStrategy.set(YarnLockChangedStrategy.Ignore)
// if you want to intentionally keep an older version of your yarn.lock file around
}
- Remove
kotlin-js-store
from your project root's.gitignore
file - If
kobweb run
results in a build error related to youryarn.lock
file, quit Kobweb and then run./gradlew kotlinUpgradeYarnLock
. Once finished, runkobweb run
again, which should now work without hitting that failure.
For more information, please read the official Kotlin docs discussing this feature and the official Yarn docs talking about yarn.lock
files.
Also, you may wish to confer with the header docs in YarnBlock.kt.