After upgrading to Kotlin `1.6.10` Should we comm...
# javascript
s
After upgrading to Kotlin
1.6.10
Should we commit this file
kotlin-js-store/yarn.lock
or
gitignore
it? Based on Github search, I see repos where they add it and some others where they do not keep it And there is this comment on this channel where @Oliver.O says that the
intention is to track it on version control
Can someone please clarify on this?
o
If you commit
kotlin-js-store/yarn.lock
, you'll get a "stable" build when checking out into a new directory (e.g. in CI). Otherwise, your builds will be "stable" locally as long as the file exists. As I mentioned in the comment above, stability is limited as new dependencies trigger automatic updates to the lock file.
👍🏽 1
h
This file contains the locked versions of used npm packages. A lock file should be committed to use the same versions, to always produce the same build. without a shared lock file you could get failed builds, eg because web pack use incompatible updated dependencies.
See also: https://youtrack.jetbrains.com/issue/KT-50831, which should document this new feature.
🤞🏽 1
s
Is there a particular build/project setup where it would be needed? Like when a project has a
kotlin-js-web-app
or it would be needed in any KMP project which has a
JS
platform enabled?
h
you need at least one module with either
multiplatform
and
JS
target or kotlin(
js
)
s
ok so will push this file to github then without ignoring