Skip to content
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

Convert to es module #542

Merged
merged 1 commit into from
Dec 29, 2022
Merged

Convert to es module #542

merged 1 commit into from
Dec 29, 2022

Conversation

jsetton
Copy link
Collaborator

@jsetton jsetton commented Dec 28, 2022

AWS Lambda started to support ES modules from nodejs14 since the beginning of the year.

While looking at replacing the deprecated request http client package, there is an increasingly amount of maintained packages that are going ESM support only. I ended making the conversion to test some of the latest http client packages such as got or node-fetch. In the end, I settled with axios for the time being since it requires the least amount of changes in our codebase (Will be part of a separate PR). I am curious to see how the native Fetch API evolves.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
@digitaldan
Copy link
Collaborator

Wow!

@jsetton
Copy link
Collaborator Author

jsetton commented Dec 28, 2022

@digitaldan What do you think?

@digitaldan
Copy link
Collaborator

I think moving to ES modules sounds great.

@jsetton
Copy link
Collaborator Author

jsetton commented Dec 28, 2022

Great. Any objection if I merge this one?

My local skill is working without any issues. The conversion is mostly syntax related with some minor refactoring to account for how import/export works with ES modules.

@digitaldan
Copy link
Collaborator

Merging sounds good! As you mentioned the changes look mostly syntax related, and a lot of them, so i can't add much in terms of a review.

@jsetton jsetton merged commit 774a5b9 into openhab:main Dec 29, 2022
@jsetton jsetton deleted the esm branch December 29, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants