YarnLockChangedStrategy

An enumeration of strategies to take when Kotlin informs us that a project's yarn.lock file has changed.

In Kotlin 1.8, Kotlin/JS now warns users if a project's yarn.lock file has changed. This is something that can be managed manually, for example by using Gradle to rebuild a lock file, and by checking it in.

However, for most Kobweb users, this is not something they'd have to worry about by default, when just creating a simple site without any of their own NPM dependencies. So Kobweb tries to hide this decisions from users unless they want to opt into it.

Please see the docs for the individual strategies for more information.

See also: https://kotlinlang.org/docs/js-project-setup.html#reporting-that-yarn-lock-has-been-updated

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Fail(val rejectCreatingNewLock: Boolean = false) : YarnLockChangedStrategy

Have the build fail if it detects that a yarn.lock update is requested.

Link copied to clipboard

Have the build leave the existing yarn lock as is.

Link copied to clipboard

Aggressively regenerate the yarn.lock file anytime it changes.