apache / cordova-plugin-screen-orientation

Apache Cordova Screen Orientation Plugin
https://cordova.apache.org/
Apache License 2.0
219 stars 229 forks source link

chore(lint)!: update @cordova/eslint-config and variables #112

Open NiklasMerz opened 1 year ago

NiklasMerz commented 1 year ago

Platforms affected

Motivation and Context

npm outdated for release

Description

eslint . --fix

Testing

npm test

Checklist

breautek commented 1 year ago

Fails the test for older Android platforms due to syntax errors.

02-21 20:15:10.641 I/chromium( 3672): [INFO:CONSOLE(45)] "Uncaught SyntaxError: Unexpected identifier", source: http://localhost/plugins/cordova-plugin-screen-orientation/www/screenorientation.js (45)

So it will be intended to be merged as a breaking change, after Android 5.1 support is dropped. We may need to test to see what the minimum android version we can support with their default shipped chrome versions.

breautek commented 1 year ago

Fails the test for older Android platforms due to syntax errors.

02-21 20:15:10.641 I/chromium( 3672): [INFO:CONSOLE(45)] "Uncaught SyntaxError: Unexpected identifier", source: http://localhost/plugins/cordova-plugin-screen-orientation/www/screenorientation.js (45)

So it will be intended to be merged as a breaking change, after Android 5.1 support is dropped. We may need to test to see what the minimum android version we can support with their default shipped chrome versions.

cordova-android@12 has a min SDK of 24, which based on AOSP simulators, ships with Chrome 53 webview.

The let / const keywords was introduced in Chrome 49, so we are likely good on this PR now... but it probably should still be treated as a breaking change.

I'm not sure if we actually want to limit the engine to >= cordova-android@12, because in reality people on older devices will likely have an updated/compatible webview, but in order to guarentee compatibility even with a factory device, I think we need a min SDK of 24, which cordova-android@12 uses.