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

Compat tables should show show Node.js data for Web APIs (where present) #3410

Closed
ddbeck opened this issue Mar 31, 2021 · 2 comments · Fixed by #3412
Closed

Compat tables should show show Node.js data for Web APIs (where present) #3410

ddbeck opened this issue Mar 31, 2021 · 2 comments · Fixed by #3412
Assignees

Comments

@ddbeck
Copy link
Contributor

ddbeck commented Mar 31, 2021

(This is something we ought to do, but I don't know if it's a high priority. It's been a known issue for at least a year. I thought it deserved to be written down somewhere, though.)

Presently, the compat table only includes Node.js data for JavaScript pages (see browser-compatibility-table/index.tsx).

In reality, we have some Node.js data for some Web APIs that Node.js supports (see mdn/browser-compat-data#3160), but we never show it on MDN. We ought to show Node.js data for all JavaScript pages and the subset of Web API pages that have Node.js data.

The tricky thing here is that we only want to show Node.js for Web APIs that we have data for. Otherwise, we'd show a pointless column for Node.js on, for example, a zillion irrelevant DOM API pages. Right now, the compat table chooses which browsers/engines to include based on the page type, without knowing anything about the data.

@peterbe
Copy link
Contributor

peterbe commented Mar 31, 2021

Yeah. This would be cool! E.g. https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams doesn't show which Node version added this.
Apparently it was version 10.0.0
So can we simply look for nodejs in the support key? Would a simply truthy test suffice? I.e. it'd be Yes for URLSearchParams.json and No for CSSKeyframesRule.json.

@ddbeck
Copy link
Contributor Author

ddbeck commented Apr 1, 2021

So can we simply look for nodejs in the support key? Would a simply truthy test suffice? I.e. it'd be Yes for URLSearchParams.json and No for CSSKeyframesRule.json.

@peterbe That is correct. If the nodejs key exists in support, then there is data there we meant for consumers to be able to make use of.

I checked and there are 230 compat features with Node.js data in the api tree (though they are concentrated in heavily-used APIs). There is no Node.js data in trees beside api and javascript.

peterbe added a commit to peterbe/yari that referenced this issue Apr 1, 2021
@peterbe peterbe self-assigned this Apr 1, 2021
peterbe added a commit to peterbe/yari that referenced this issue Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants