aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
964 stars 384 forks source link

typo: use var instead of const #412

Closed robberfree closed 2 years ago

robberfree commented 2 years ago

should keep code as es5 across files. If mixed es5 and es6 code, it' hard to compile or not in build tool like webpack. maybe has the same issue in somewhere, please double check.

jmklix commented 2 years ago

Can you add a more detailed explanation of why you made this change? and show how it makes it easier to compile/build.

robberfree commented 2 years ago

hi @jmklix. I use aws-iot-device-sdk-js as a dependency and use webpack as build tool. As aws-iot-device-sdk-js is a dependency i think all the code are es5, so i don't compile it by webpack. That works well most time even it has some es6 code(const/let).But when the platform i targeted requested that all code must be es5, that will be a problem. That means i must use webpack to compile whole aws-iot-device-sdk-js/device folder even there is only one line es6 code in this folder.

what i means why keep all code are es5? i check the files most are es5 only a little are es6.

TwistedTwigleg commented 2 years ago

Thank you for making this PR! Merging into main...