Execute JS files as Change Sets

I am trying to use liquibase for versioning of mongodb database using spring boot. However the changesets should be in the form of JS files. As per my understanding liquibase doesn’t support JS changesets, so is there a way to convert it into compatible changesets (like sql, json, etc.)

Welcome to the Liquibase Community, @kiritonline !

I’m not super well-versed in JS, but Liquibase does support JSON databases, and I was able to find several pages that have methods for converting JS objects to JSON. Can you try it and see if that works for your use case? Here’s one of the links I found: How to Convert JS Object to JSON String.

I also try to use JS file as a changelog. I have written mongodb script in JS which contain the following
db.createUser. But not sure liquibase will read the scripts from JS changelog and execute it.
If any of you have used it before, you may throw some pointers