-
Notifications
You must be signed in to change notification settings - Fork 27
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
Tracking feasibility of unshipping assert
contextual keyword in Chrome
#135
Comments
Usage stats: https://chromestatus.com/metrics/feature/timeline/popularity/4528 ( |
I was exploring Chrome use counters, and I found counters for JSON modules (https://chromestatus.com/metrics/feature/timeline/popularity/3804 - 0.012% of page loads) and CSS modules (https://chromestatus.com/metrics/feature/timeline/popularity/3805 - 0.000061% of page loads). I don't think it's unreasonable to expect the usage of import assertions to roughly match the usage of JSON modules. I manually checked some of the sample URLs, and all the usages I found (using the |
Note that es-module-shims does not by default engage the JSON / CSS modules feature detection path at all in polyfill mode, unless it is explicitly enabled via https://github.com/guybedford/es-module-shims#pollyfill-enable-option, which I'd expect would be a very small percentage of es-module-shims users. |
Going back to #135 (comment) again, it looks like many of the usages of CSS/JSON modules are from v0.13.1 of |
There are now some URLs at the bottom of https://chromestatus.com/metrics/feature/timeline/popularity/4528 now, if you want to take a look again @nicolo-ribaudo. |
Thank you! Some preliminary analysis of the the first websites listed there (I only checked the homepage), searching with the
Overall, it looks like most those website have been designed to fail gracefully in browsers without import assertions support, so that they keep working just with (sometimes) one specific feature unavailable. |
V8 has landed a CL that will warn on Edit: I should say the plan is, barring new data, like newly discovered incompat. |
TC39 has consensus for trying to deprecate and remove the `assert` keyword in favor of the new `with` keyword in import attribute syntax. That is, `import m from 'foo' assert { type: 'json' }` will now throw a SyntaxError, and developers must change to `import m from 'foo' with { type: 'json' }`. tc39/proposal-import-attributes#135
Chrome has landed use counters tracking the use of the deprecated
assert
contextual keyword in import attributes.This will go to stable in 114, which is scheduled for May 30, 2023. We will need some time after the counter reaches the stable population to gather numbers.
The text was updated successfully, but these errors were encountered: