breautek commented on code in PR #213: URL: https://github.com/apache/cordova-plugin-device/pull/213#discussion_r2511649764
########## www/device.js: ########## @@ -1,28 +1,26 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ +/** + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ -var argscheck = require('cordova/argscheck'); -var channel = require('cordova/channel'); -var exec = require('cordova/exec'); -var cordova = require('cordova'); +const argscheck = require('cordova/argscheck'); +const channel = require('cordova/channel'); +const exec = require('cordova/exec'); +const cordova = require('cordova'); Review Comment: Going from `var` to `const` might be considered a breaking change as it will require a webview runtime that supports the ES6 features. ES6 is quite dated so maybe it's a non-issue. Was this tested with an API 24 simulator that hasn't been updated via Google Play? A fresh/stock API 24 simulator would be a good gauge, if that ships with a webview version that understands ES6 block-level variables, then this change is probably fine as a patch/minor release. I know iOS 11+ supports ES6 so I think we are fine on iOS platform side of things. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
