microsoft / kiota-typescript

TypeScript libraries for Kiota-generated API clients.
https://aka.ms/kiota/docs
MIT License
37 stars 27 forks source link

evaluate whether we still need commonjs support #1055

Closed baywet closed 5 months ago

baywet commented 8 months ago

Since we originally stood up this library the ecosystem has moved a lot:

IMHO we should remove commonjs support after testing our main scenarios (SPFx, TeamsFX....) and BEFORE the GA so people don't end up in confusing variants + configuration misalignment issues.

baywet commented 7 months ago

@gavinbarron @musale I'd love your input on this one when you have a couple of minutes.

musale commented 7 months ago

I agree with removing cjs support all together. You have made valid points to remove it. ESM has more desirable benefits like tree-shaking which helps developers bundle smaller sizes of the sdk in their apps. In the core https://github.com/microsoftgraph/msgraph-sdk-typescript-core repo, this has already been done. In mgt, we removed it and directed using module syntax in the browser when loading mgt from the cdn https://github.com/microsoftgraph/microsoft-graph-toolkit/releases/tag/v4.0.0.

baywet commented 7 months ago

@sebastienlevert I think we have an agreement on the engineering side for this one. Especially since it's blocking other work. Any opposition to removing common is support here?

sebastienlevert commented 7 months ago

No. We should definitely drop it at this point.

baywet commented 7 months ago

Thanks for your input. @musale please proceed as part of your existing PR.

sebastienlevert commented 7 months ago

Decision is to drop commonjs support.

baywet commented 7 months ago

Wait, we still need to do some work to remove it