-
-
Notifications
You must be signed in to change notification settings - Fork 714
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
Opera mobile is invalid with mobileToDesktop #766
Comments
Removing it will be breaking change 😔 You need to ask Babel team at least |
Based on the updated information provided regarding issue #761, perhaps handling mobile-to-desktop mapping using an alternative approach that takes into account release dates and provides consistent results across platforms:
In this example, we define a mobileToDesktopMap object that maps mobile versions to their corresponding desktop versions. The getDesktopVersion() function takes a mobile version as input and checks if there is a mapping available in the mobileToDesktopMap. If a mapping is found, it returns the corresponding desktop version; otherwise, it returns the original mobile version. One can incorporate this mapping mechanism where mobile-to-desktop mapping is required, such as when processing queries or generating results based on different platforms. By using this approach, one can ensure consistent and accurate mappings between mobile and desktop versions, regardless of the presence of feature queries or other factors. This code example is a simplified demonstration and should be adapted and expanded to fit your specific requirements and code structure. |
Can you cc the right contact then? From the debug output of
|
@nicolo-ribaudo do you need |
If the current mapping is wrong, removing it can't make things worse. I need to do some testing to see how it affects existing Babel installs. |
The difference is that the following query:
would start returning |
Yes, returning @steverep can we add some hack for it? |
You need to know how many versions were released between 12.1 and the current one. This is the same problem as with Android beyond v4.4.3, except that's a lot easier since we know the version history just follows Chrome. Since Opera desktop doesn't do the same, you'd need to fallback to hard coding the starting point and just assume versions are always increments of 1.0. |
We can hardcode the first Chromuim-based (>12) Opera Mini version from https://en.wikipedia.org/wiki/History_of_the_Opera_web_browser and do the math |
Got a fix coming that removes it from
If you want to include it back later, a good option would be to import the Opera mobile data from MDN. They have release dates and a mapping to the blink engine version for the whole history. Or just get caniuse to include that data 😉 |
I am thinking of moving to MDN, but there are two main problems:
|
I just meant using that one JSON file for now. You'd just need a script to keep it synced. Of course that then requires regular releases which is why it'd be nice if caniuse did it. |
We already do some copying from MDN database to The idea of |
@nicolo-ribaudo it seems that Babel is still causing more transpilation with this fix. It seems to also be making a false equivalency between Opera desktop and mobile. For a typical "defaults" query, the following Opera versions are now correctly returned:
But
It seems to pick out the lowest version of Opera or op_mob to use as the target, and then treat that as the desktop version in terms of feature support. This is not correct. |
Filed babel/babel#15711 |
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Opera Mobile has relaunched for Android using Chromium but the compatibility data still thinks lots of features are unsupported: ``` The es-shims polyfill added the following polyfills: Array.prototype.every { "opera_mobile":"73" } Array.prototype.indexOf { "opera_mobile":"73" } Array.prototype.keys { "opera_mobile":"73" } Date.now { "opera_mobile":"73" } Function.prototype.name { "opera_mobile":"73" } Object.entries { "opera_mobile":"73" } String.prototype.split { "opera_mobile":"73" } String.prototype.trim { "opera_mobile":"73" } ``` See related issues: browserslist/browserslist#766 babel/babel#15711
Unlike Android, Chrome, and Firefox, Opera's mobile version history does not mirror that of Opera desktop. With the
mobileToDesktop
option enabled, the results are invalid:Those versions don't exist - the latest is 75. Furthermore, time queries or feature queries (after fixing #761) for this latest version will then use data for Opera desktop 75, which is much older and based on Chromium 89 versus 112.
I would propose removing it from the mobile to desktop mapping unless the versions can be properly mapped in terms of release date and/or chromium version.
A filter similar to the one used for Android is also needed to stop "last_version" queries from grabbing very old versions without
mobileToDesktop
:The text was updated successfully, but these errors were encountered: