-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch JS/TS API wrappers to ES modules #456
Conversation
There is still one piece missing to make this work. A Adding a minimal
|
7517a48
to
9921f04
Compare
I updated You should be able to run Could you review please, and see whether the new generated sources work for you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supressing these errors with @ts-nocheck
for testing purposes, both the httpclient's tests and the dashboard runs successfully.
I could fix all of the above errors by copying |
Thank you for finding the root cause! 🦾 The error messages indeed indicated missing declaration files, so presumed it was something going wrong in the lookup. This should give me enough input to change the build pipeline, and hopefully it subsequently still passes with the build setup of this project. :) Either way, looks super promising, and that this PR is the way to go then, instead of #455. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it builds perfectly. Great work!
`ts-node` and `jsdom` seem to be no longer needed when running mocha tests.
Also updated other JS/TS dependencies. Primarily, updating to nodenext also allowed to finally upgrade `@typescript-eslint/typescript-estree`, which depended on this module system.
Later more strict JS module systems require package.json to be present.
Without these, projects using the output modules did not automatically pick up the typescript declarations.
81fab12
to
fe1ab05
Compare
Previously, the JS/TS wrappers were compiled as UMD modules. This PR switches them to use the ES module system. The underlying generated libraries by Kotlin are still compiled as UMD.
This may make it easier to incorporate these libraries in modern web projects which use ES module systems by default. As such, this PR replaces PR #455.