Are NPM dependencies transitive when a library is published as Maven artifact?

Say I add in my JS dependencies api(npm("left-pad", leftPadVersion)) and publish my library on Maven with Gradle metadata enabled.
The consumer of my library will have to add left-pad as dependency as well or it will be added to the “classpath” (or whatever is the messed up JS equivalent called) by the plugin?

1 Like

It looks like the consumer of the maven artifact needs to also manually add the npm dependency. I wish it wasn’t the case, though.

I can understand why it’s a hassle, but is there any upcoming change regarding this?

Also, is it different if I publish my JS lib to npm instead? Does the generated package.json contain these dependencies?

1 Like

It should work as long as the maven artifact (jar) contains correct package.json file.