typescript-generator icon indicating copy to clipboard operation
typescript-generator copied to clipboard

Add `usePeerDeps` option to module dependency.

Open kschaefe opened this issue 2 years ago • 1 comments

Normal dependencies can cause type mismatches if the dependency versions are different. This means that our dependency and every other library or application depending on the same dependency need to use compatible versions. This is where peerDependencies is better. The dependency is only managed once at the top-level.

kschaefe avatar Apr 20 '22 15:04 kschaefe

I don't really know much about Maven plugins, so I only touched the absolute smallest amount of code that I could. I think the result is right, if the approach is not. peerDependencies is a better way to manage the dependencies of these linked generated libraries.

kschaefe avatar Apr 20 '22 15:04 kschaefe

Any feedback on this or chance to get it included? I now have a build failing because this plugin is using dependencies instead of peerDependencies. tsc is failing to do proper module resolutions because of this.

kschaefe avatar Feb 01 '23 15:02 kschaefe

Thanks for your PR. I just renamed usePeerDeps to peerDependency.

vojtechhabarta avatar Mar 19 '23 22:03 vojtechhabarta

Released in 3.2.1263.

vojtechhabarta avatar Mar 20 '23 21:03 vojtechhabarta