TuyaAPI / cloud

🌨 🎁 A NodeJS wrapper for Tuya's cloud API. Documentation: https://tuyaapi.github.io/cloud/.
MIT License
32 stars 15 forks source link

Update dependencies to be current - should support Node.js 12+ #10

Closed Apollon77 closed 1 year ago

Apollon77 commented 1 year ago

I updated the dependencies (beside xo and ava because else tests will no longer run).

Because got is ESM only since v12 I updated to a special "esm2cjs" package. This project has the goal to "re-compile" such ESM only packages to also allow commonJs usage :-) Alternative would be got 11.x

Apollon77 commented 1 year ago

@codetheweb Please review ... I will also now verify it is working in depth

Apollon77 commented 1 year ago

I aslo added the ttid as new option for constructor (optional), to allow specifying the useed app to have a complete correct call

codetheweb commented 1 year ago

Let's use got@11 rather than esm2cjs, otherwise lgtm!

Apollon77 commented 1 year ago

Hm ... got 11 is already one year "old" and will not get any updates including it's deps ... really?

I trust that source and already use it in severalof my projects. The "build system" is automated, so a day after a new version of the source package there should be aalso a new package on esm2cjs

codetheweb commented 1 year ago

Using esm2cjs would add babel as a dependency, so the goodies definitely don't come free. :)

I think got@11 is fine for now. Alternatively we could switch it out for axios or something.

Apollon77 commented 1 year ago

where do you see babel? https://www.npmjs.com/package/@esm2cjs/got?activeTab=dependencies ... but yes I can downgrade ...

Apollon77 commented 1 year ago

@codetheweb got downgraded and added two moire small things :-) 1.) Option to pass in a former session ID in options 2.) Add "india region" support

Thank you for merge and release :-)

Apollon77 commented 1 year ago

No STOP ... I will add 2 more features ... need something :-) ( I hope it is ok that I iterate in that PR?)

Apollon77 commented 1 year ago

@codetheweb ready now :-)

Apollon77 commented 1 year ago

Proofed wirken in a Test with my github fork as dep.

codetheweb commented 1 year ago

where do you see babel? npmjs.com/package/@esm2cjs/got?activeTab=dependencies ... but yes I can downgrade ...

ah I guess I didn't completely understand how esm2cjs works

codetheweb commented 1 year ago

Published in v0.5.0.

Apollon77 commented 1 year ago

Thank you very much!!