Skip to content
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

Baseline "limited availability" for ESM? #1164

Closed
lionel-rowe opened this issue Jun 3, 2024 · 2 comments · Fixed by #1165
Closed

Baseline "limited availability" for ESM? #1164

lionel-rowe opened this issue Jun 3, 2024 · 2 comments · Fixed by #1165
Labels
bug Something isn't working

Comments

@lionel-rowe
Copy link

Originally reported in mdn/browser-compat-data.

Articles for Modules and import both claim "limited availability", but the article for export has "widely available".

I guess it's something to do with support for typed imports using with and the legacy assert, but I don't think those are what people would understand by "support for modules" or "support for import statements".

I had a look in js-modules.yml in the current repo, but all the features cited there are widely supported — even nomodule looks to be supported in Safari 11 (Sep 2017), according to MDN.

@foolip
Copy link
Collaborator

foolip commented Jun 3, 2024

I think the problem is that javascript.statements.import is part of both CSS modules and JS modules. When yari finds a web feature by compat key, it probably finds CSS modules first because it comes first alphabetically. And CSS modules is only supported in Chromium browsers.

This fix should be to remove javascript.statements.import from CSS modules in web-features.

@captainbrosset
Copy link
Contributor

When yari finds a web feature by compat key, it probably finds CSS modules first because it comes first alphabetically.

I didn't know how yari mapped MDN pages to web-features, but this way sounds prone to bugs.

This fix should be to remove javascript.statements.import from CSS modules in web-features.

Ensuring that we use BCD keys just once in the repo feels like an arbitrary limitation that will be a problem for us in the future.
I'm not apposed to doing this as a quick fix if this unblocks MDN. But would this work long term:

MDN optionally associates articles with web-features (probably by adding a webFeaturesId: js-modules entry in the front matter). For articles that have this association, that's how the right web-features dist file is pulled. For others, they continue doing what they do now.
As a bonus: we get MDN links for free, for some of our features.

foolip added a commit to foolip/web-features that referenced this issue Jun 3, 2024
This prevents a problem like in web-platform-dx#1164
from happening before we have a way to handle it.
foolip added a commit to foolip/web-features that referenced this issue Jun 3, 2024
ddbeck pushed a commit that referenced this issue Jun 3, 2024
This prevents a problem like in #1164
from happening before we have a way to handle it.
foolip added a commit that referenced this issue Jun 3, 2024
This is to release the fix for #1164.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants