blakeembrey / change-case

Convert strings between camelCase, PascalCase, Capital Case, snake_case and more
MIT License
2.26k stars 97 forks source link

feat: es2020 -> es2015 #333

Closed guoyunhe closed 7 months ago

guoyunhe commented 8 months ago

change-case is currently compiled to es2020 target (roughly chrome 80+), which contains ?? that some older browser, bundler (like webpack 4) and node versions don't support.

this PR changed build target to es2015 (roughly chrome 51+), which support wider range of platforms. and the output remains clean without introducing many legacy stuff.

blakeembrey commented 7 months ago

I'd actually prefer to keep supporting only ESM and ES2020 onward. I don't have any want or need to try and maintain code for older versions. I'd recommend sticking with the previous major version that's built for older ES versions if you need this.