Skip to content

Commit

Permalink
ignore TP in data from caniuse-lite
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Sep 23, 2023
1 parent e7bf735 commit 0e1696f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 8 additions & 8 deletions compat-table/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions compat-table/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"githubDependencies": {
"kangax/compat-table": "d5e9c83b96b23f15318e6b2dc3f5bf51314aa340",
"williamkapke/node-compat-table": "e59188734a19f7595d29dd91643720bcbf0d0647"
"williamkapke/node-compat-table": "3dccab9db1c595030dba0e37487a78a598a16a03"
},
"dependencies": {
"@mdn/browser-compat-data": "5.3.16",
"@mdn/browser-compat-data": "5.3.18",
"@types/caniuse-lite": "1.0.1",
"@types/node": "20.3.2",
"caniuse-lite": "1.0.30001534"
"caniuse-lite": "1.0.30001538"
}
}
5 changes: 4 additions & 1 deletion compat-table/src/caniuse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ for (const feature in cssPrefixFeatures) {
? (model.prefix_exceptions && model.prefix_exceptions[versionRange]) || model.prefix
: null
for (const version of versionRange.split('-')) {
sortedVersions.push({ version, prefix })
// Filter out bogus versions such as "TP" for Safari
if (/^\d+(\.\d+)*$/.test(version)) {
sortedVersions.push({ version, prefix })
}
}
if (prefix !== null) {
prefixes.add(prefix)
Expand Down

0 comments on commit 0e1696f

Please sign in to comment.