-
Notifications
You must be signed in to change notification settings - Fork 709
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
New/compat package #3106
New/compat package #3106
Conversation
67253dc
to
a85642e
Compare
@atopal here's the PR for the package to query the browser compat data. Could you please take a look at the |
@Elchi3 in case you are interested as well on this tool. |
a85642e
to
bf96406
Compare
Code coverage issues in |
bf96406
to
84eb70a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a NIT, but nothing blocking.
import { UnsupportedBrowsers } from '@hint/utils/dist/src/compat'; | ||
import { getFriendlyName } from '@hint/utils/dist/src/compat/browsers'; | ||
import { UnsupportedBrowsers } from '@hint/utils-compat-data'; | ||
import { getFriendlyName } from '@hint/utils-compat-data'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Use a single import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I left some comments about minor tweaks to the README, but that's it.
packages/utils-compat-data/README.md
Outdated
# Utils compat data (`@hint/utils-compat-data`) | ||
|
||
This package allows you to easily query the data from [mdn-browser-compat-data][] | ||
to know about the support status of a feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to know about the support status of a feature. | |
to learn about the support status of a feature. |
packages/utils-compat-data/README.md
Outdated
|
||
### `isSupported` | ||
|
||
Query MDN for support of CSS or HTML features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should call out that this requires all provided browsers to have support in order to return true
. If any single provided browser is not supported this will return false
.
84eb70a
to
89441d0
Compare
Comments addressed in case you want to take a second round. Otherwise I'll merge this tomorrow. |
89441d0
to
3dd1acf
Compare
"timeout": "1m" | ||
}, | ||
"dependencies": { | ||
"@types/parse5": "^5.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ok as dependency
or should it be a devDependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might not even need a lot of this stuff. I think I copy pasted from the original utils and didn't do a lot of clean up.
Looking forward to #3104 to get merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed all the unused dependencies
3dd1acf
to
28ee784
Compare
Coverage failing for Windows 😭 |
The difference appears to be coming from Linux CI: Specifically I suspect it's this check on line 92: ${!isWindows && global ? 'sudo ' : ''}${command}
manually to install all the packages.`); |
28ee784
to
6e32ecd
Compare
Let's see if a good old |
a3ddad4
to
c10c658
Compare
Pull request checklist
Make sure you:
For non-trivial changes, please make sure you also:
Short description of the change(s)
Fix #3035