Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Lately I've been using gradle with kotlin-js and a mix of npm and jvm dependencies. There's the https://splitties.github.io/refreshVersions/ plugin that I can recommend if you are using gradle (with or without kotlin-js).
It manages plugin dependencies, library dependencies, and version dependencies. It can use the new gradle version catalog or not if you prefer. On first use, you migrate your versions and it extracts these to a versions.properties (or your version catalog). Then whenever you run refreshVersions it indicates available new versions in comments in this file. It also indicates unused dependencies. Though for npms this is a bit harder. All you need to do is manually use the versions you want.
I run this frequently to stay on top of upstream changes. Few software engineers realize that the testing and integration overhead with version changes multiplies (just like with other forms of change). Libraries that you haven't updated amount to technical debt that you haven't addressed. So, the workload increases massively if you don't update for a while. Staying up to date minimizes the workload. This plugin makes that super easy.
Given that we are using kotlin-js, we have to deal with a rapidly evolving library ecosystem so we do have occasional issues that we need to work around by either downgrading or fixing some code. Whenever I can't update something, I document it in my versions.properties with a comment. Often you just have to wait for the next release or so for things to straighten out. The price of using cutting edge software.
Kotlin-js manages a yarn lock file as well. So it properly locks dependencies. Whenever you update npm dependencies, you have to run a command to upgrade the lock file. There's also a whole mess of webpack dependencies that comes along with kotlin-js.
[1] https://github.com/vugu-examples/simple/blob/master/root.vug...
I can't share any of my own examples, but most of the work I do was originally based on Vugu[0] which is open source. It is loosely modelled on Vue, so template files have both HTML and Go source (for the view / front end / ui handling) in the one file.[1] The code I have written has since diverged a bit from Vugu but at its core it's handled the same way.
People are still working on Vugu (you can check the issues / branches) but there hasn't been a new release in a while; it's still somewhat experimental.
[0] https://www.vugu.org/
Related posts
- Weeks of Debugging Your Build can Save Hours of Learning Gradle
- Gradle plugin for updating dependencies?
- Easy way to migrate to Gradle's version catalog
- How to keep all the common dependencies between multiple modules in single project gradle file?
- What is the best way to manage and organize build gradle dependencies?