Merge pull request #43 from microsoft/aeschli/useStatusFromCompat

use status from compat
This commit is contained in:
Martin Aeschlimann 2022-06-07 09:57:55 +02:00 коммит произвёл GitHub
Родитель d706365daf ebd66f136e
Коммит 4206984eb3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 646 добавлений и 224 удалений

17
.vscode/launch.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/web-data/css/generateData.js"
}
]
}

Просмотреть файл

@ -26,7 +26,30 @@ export function addCSSMDNData(specProperty: CSSSpecProperty): CSSProperty {
function getPropertyStatus(name: string) {
if (properties[name]) {
return properties[name].status
let status = properties[name].status;
let mdnCompatEntry = bcdProperties[name];
if (!mdnCompatEntry) {
for (const contextName in mdnCompatEntry) {
if (mdnCompatEntry[contextName].__compat) {
mdnCompatEntry = mdnCompatEntry[contextName].__compat;
break;
}
}
}
const compatStatus = mdnCompatEntry?.status;
if (compatStatus) {
if (compatStatus.experimental) {
status = 'experimental';
} else if (compatStatus.deprecated) {
status = 'obsolete';
} else if (compatStatus.standard_track) {
status = 'standard';
} else {
status = 'nonstandard';
}
}
return status;
}
}

357
samples/svg/package-lock.json сгенерированный
Просмотреть файл

@ -1,8 +1,363 @@
{
"name": "svg",
"version": "0.1.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "svg",
"version": "0.1.0",
"license": "MIT",
"devDependencies": {
"@mdn/browser-compat-data": "^4.0.8",
"@types/cheerio": "^0.22.30",
"@types/got": "^9.6.12",
"@types/node": "^16.11.6",
"@types/turndown": "^5.0.1",
"@types/vscode": "^1.61.0",
"cheerio": "^1.0.0-rc.10",
"mdn-data": "^2.0.22",
"turndown": "^7.1.1",
"typescript": "^4.4.4"
},
"engines": {
"vscode": "^1.25.0"
}
},
"node_modules/@mdn/browser-compat-data": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.0.8.tgz",
"integrity": "sha512-knKNYGN0Yvo9UUIbCG0P1XgEf1L49JfJYCoFxxiwz55R3FKuZh3a24nC6KuvKHU3/P/5oNjqlpoqZxjqyDAifQ==",
"dev": true
},
"node_modules/@types/cheerio": {
"version": "0.22.30",
"resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz",
"integrity": "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/got": {
"version": "9.6.12",
"resolved": "https://registry.npmjs.org/@types/got/-/got-9.6.12.tgz",
"integrity": "sha512-X4pj/HGHbXVLqTpKjA2ahI4rV/nNBc9mGO2I/0CgAra+F2dKgMXnENv2SRpemScBzBAI4vMelIVYViQxlSE6xA==",
"dev": true,
"dependencies": {
"@types/node": "*",
"@types/tough-cookie": "*",
"form-data": "^2.5.0"
}
},
"node_modules/@types/node": {
"version": "16.11.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz",
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==",
"dev": true
},
"node_modules/@types/tough-cookie": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.1.tgz",
"integrity": "sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg==",
"dev": true
},
"node_modules/@types/turndown": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@types/turndown/-/turndown-5.0.1.tgz",
"integrity": "sha512-N8Ad4e3oJxh9n9BiZx9cbe/0M3kqDpOTm2wzj13wdDUxDPjfjloWIJaquZzWE1cYTAHpjOH3rcTnXQdpEfS/SQ==",
"dev": true
},
"node_modules/@types/vscode": {
"version": "1.61.0",
"resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.61.0.tgz",
"integrity": "sha512-9k5Nwq45hkRwdfCFY+eKXeQQSbPoA114mF7U/4uJXRBJeGIO7MuJdhF1PnaDN+lllL9iKGQtd6FFXShBXMNaFg==",
"dev": true
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
},
"node_modules/boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true
},
"node_modules/cheerio": {
"version": "1.0.0-rc.10",
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz",
"integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==",
"dev": true,
"dependencies": {
"cheerio-select": "^1.5.0",
"dom-serializer": "^1.3.2",
"domhandler": "^4.2.0",
"htmlparser2": "^6.1.0",
"parse5": "^6.0.1",
"parse5-htmlparser2-tree-adapter": "^6.0.1",
"tslib": "^2.2.0"
},
"engines": {
"node": ">= 6"
},
"funding": {
"url": "https://github.com/cheeriojs/cheerio?sponsor=1"
}
},
"node_modules/cheerio-select": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz",
"integrity": "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==",
"dev": true,
"dependencies": {
"css-select": "^4.1.3",
"css-what": "^5.0.1",
"domelementtype": "^2.2.0",
"domhandler": "^4.2.0",
"domutils": "^2.7.0"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/css-select": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz",
"integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==",
"dev": true,
"dependencies": {
"boolbase": "^1.0.0",
"css-what": "^5.0.0",
"domhandler": "^4.2.0",
"domutils": "^2.6.0",
"nth-check": "^2.0.0"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/css-what": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz",
"integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==",
"dev": true,
"engines": {
"node": ">= 6"
},
"funding": {
"url": "https://github.com/sponsors/fb55"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true,
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/dom-serializer": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz",
"integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==",
"dev": true,
"dependencies": {
"domelementtype": "^2.0.1",
"domhandler": "^4.2.0",
"entities": "^2.0.0"
},
"funding": {
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
}
},
"node_modules/domelementtype": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
"integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
]
},
"node_modules/domhandler": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz",
"integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==",
"dev": true,
"dependencies": {
"domelementtype": "^2.2.0"
},
"engines": {
"node": ">= 4"
},
"funding": {
"url": "https://github.com/fb55/domhandler?sponsor=1"
}
},
"node_modules/domino": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/domino/-/domino-2.1.6.tgz",
"integrity": "sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==",
"dev": true
},
"node_modules/domutils": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
"integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
"dev": true,
"dependencies": {
"dom-serializer": "^1.0.1",
"domelementtype": "^2.2.0",
"domhandler": "^4.2.0"
},
"funding": {
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
"node_modules/entities": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
"integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
"dev": true,
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/form-data": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
"integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
"dev": true,
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 0.12"
}
},
"node_modules/htmlparser2": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
"integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==",
"dev": true,
"funding": [
"https://github.com/fb55/htmlparser2?sponsor=1",
{
"type": "github",
"url": "https://github.com/sponsors/fb55"
}
],
"dependencies": {
"domelementtype": "^2.0.1",
"domhandler": "^4.0.0",
"domutils": "^2.5.2",
"entities": "^2.0.0"
}
},
"node_modules/mdn-data": {
"version": "2.0.22",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.22.tgz",
"integrity": "sha512-qDYKNxdP1636yemoyfNsEYUgfdlsTscouOZamt0e7QmN91cmpXDWd+iRADtT9m94jYtYH2QWrraDW+83UlzTwQ==",
"dev": true
},
"node_modules/mime-db": {
"version": "1.50.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
"integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==",
"dev": true,
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.33",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
"integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
"dev": true,
"dependencies": {
"mime-db": "1.50.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/nth-check": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
"integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==",
"dev": true,
"dependencies": {
"boolbase": "^1.0.0"
},
"funding": {
"url": "https://github.com/fb55/nth-check?sponsor=1"
}
},
"node_modules/parse5": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==",
"dev": true
},
"node_modules/parse5-htmlparser2-tree-adapter": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz",
"integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==",
"dev": true,
"dependencies": {
"parse5": "^6.0.1"
}
},
"node_modules/tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
"dev": true
},
"node_modules/turndown": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/turndown/-/turndown-7.1.1.tgz",
"integrity": "sha512-BEkXaWH7Wh7e9bd2QumhfAXk5g34+6QUmmWx+0q6ThaVOLuLUqsnkq35HQ5SBHSaxjSfSM7US5o4lhJNH7B9MA==",
"dev": true,
"dependencies": {
"domino": "^2.1.6"
}
},
"node_modules/typescript": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
}
},
"dependencies": {
"@mdn/browser-compat-data": {
"version": "4.0.8",

Просмотреть файл

@ -3,221 +3,216 @@
"@mdn/browser-compat-data@^4.0.8":
version "4.0.8"
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.0.8.tgz#4f903e4d62bac0160a7b8283ba5a664a0ab589e1"
integrity sha512-knKNYGN0Yvo9UUIbCG0P1XgEf1L49JfJYCoFxxiwz55R3FKuZh3a24nC6KuvKHU3/P/5oNjqlpoqZxjqyDAifQ==
"integrity" "sha512-knKNYGN0Yvo9UUIbCG0P1XgEf1L49JfJYCoFxxiwz55R3FKuZh3a24nC6KuvKHU3/P/5oNjqlpoqZxjqyDAifQ=="
"resolved" "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-4.0.8.tgz"
"version" "4.0.8"
"@types/cheerio@^0.22.30":
version "0.22.30"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.30.tgz#6c1ded70d20d890337f0f5144be2c5e9ce0936e6"
integrity sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw==
"integrity" "sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw=="
"resolved" "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.30.tgz"
"version" "0.22.30"
dependencies:
"@types/node" "*"
"@types/got@^9.6.12":
version "9.6.12"
resolved "https://registry.yarnpkg.com/@types/got/-/got-9.6.12.tgz#fd42a6e1f5f64cd6bb422279b08c30bb5a15a56f"
integrity sha512-X4pj/HGHbXVLqTpKjA2ahI4rV/nNBc9mGO2I/0CgAra+F2dKgMXnENv2SRpemScBzBAI4vMelIVYViQxlSE6xA==
"integrity" "sha512-X4pj/HGHbXVLqTpKjA2ahI4rV/nNBc9mGO2I/0CgAra+F2dKgMXnENv2SRpemScBzBAI4vMelIVYViQxlSE6xA=="
"resolved" "https://registry.npmjs.org/@types/got/-/got-9.6.12.tgz"
"version" "9.6.12"
dependencies:
"@types/node" "*"
"@types/tough-cookie" "*"
form-data "^2.5.0"
"form-data" "^2.5.0"
"@types/node@*":
version "10.12.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67"
integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==
"@types/node@^16.11.6":
version "16.11.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae"
integrity sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==
"@types/node@*", "@types/node@^16.11.6":
"integrity" "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w=="
"resolved" "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz"
"version" "16.11.6"
"@types/tough-cookie@*":
version "2.3.4"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.4.tgz#821878b81bfab971b93a265a561d54ea61f9059f"
integrity sha512-Set5ZdrAaKI/qHdFlVMgm/GsAv/wkXhSTuZFkJ+JI7HK+wIkIlOaUXSXieIvJ0+OvGIqtREFoE+NHJtEq0gtEw==
"integrity" "sha512-Y0K95ThC3esLEYD6ZuqNek29lNX2EM1qxV8y2FTLUB0ff5wWrk7az+mLrnNFUnaXcgKye22+sFBRXOgpPILZNg=="
"resolved" "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.1.tgz"
"version" "4.0.1"
"@types/turndown@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@types/turndown/-/turndown-5.0.1.tgz#fcda7b02cda4c9d445be1440036df20f335b9387"
integrity sha512-N8Ad4e3oJxh9n9BiZx9cbe/0M3kqDpOTm2wzj13wdDUxDPjfjloWIJaquZzWE1cYTAHpjOH3rcTnXQdpEfS/SQ==
"integrity" "sha512-N8Ad4e3oJxh9n9BiZx9cbe/0M3kqDpOTm2wzj13wdDUxDPjfjloWIJaquZzWE1cYTAHpjOH3rcTnXQdpEfS/SQ=="
"resolved" "https://registry.npmjs.org/@types/turndown/-/turndown-5.0.1.tgz"
"version" "5.0.1"
"@types/vscode@^1.61.0":
version "1.61.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.61.0.tgz#c54335b6f84c19c69b1435b17cc0ce3b2cecfeec"
integrity sha512-9k5Nwq45hkRwdfCFY+eKXeQQSbPoA114mF7U/4uJXRBJeGIO7MuJdhF1PnaDN+lllL9iKGQtd6FFXShBXMNaFg==
"integrity" "sha512-9k5Nwq45hkRwdfCFY+eKXeQQSbPoA114mF7U/4uJXRBJeGIO7MuJdhF1PnaDN+lllL9iKGQtd6FFXShBXMNaFg=="
"resolved" "https://registry.npmjs.org/@types/vscode/-/vscode-1.61.0.tgz"
"version" "1.61.0"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
"asynckit@^0.4.0":
"integrity" "sha1-x57Zf380y48robyXkLzDZkdLS3k="
"resolved" "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
"version" "0.4.0"
boolbase@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
"boolbase@^1.0.0":
"integrity" "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
"resolved" "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz"
"version" "1.0.0"
cheerio-select@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.5.0.tgz#faf3daeb31b17c5e1a9dabcee288aaf8aafa5823"
integrity sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg==
"cheerio-select@^1.5.0":
"integrity" "sha512-qocaHPv5ypefh6YNxvnbABM07KMxExbtbfuJoIie3iZXX1ERwYmJcIiRrr9H05ucQP1k28dav8rpdDgjQd8drg=="
"resolved" "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.5.0.tgz"
"version" "1.5.0"
dependencies:
css-select "^4.1.3"
css-what "^5.0.1"
domelementtype "^2.2.0"
domhandler "^4.2.0"
domutils "^2.7.0"
"css-select" "^4.1.3"
"css-what" "^5.0.1"
"domelementtype" "^2.2.0"
"domhandler" "^4.2.0"
"domutils" "^2.7.0"
cheerio@^1.0.0-rc.10:
version "1.0.0-rc.10"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.10.tgz#2ba3dcdfcc26e7956fc1f440e61d51c643379f3e"
integrity sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==
"cheerio@^1.0.0-rc.10":
"integrity" "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw=="
"resolved" "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz"
"version" "1.0.0-rc.10"
dependencies:
cheerio-select "^1.5.0"
dom-serializer "^1.3.2"
domhandler "^4.2.0"
htmlparser2 "^6.1.0"
parse5 "^6.0.1"
parse5-htmlparser2-tree-adapter "^6.0.1"
tslib "^2.2.0"
"cheerio-select" "^1.5.0"
"dom-serializer" "^1.3.2"
"domhandler" "^4.2.0"
"htmlparser2" "^6.1.0"
"parse5" "^6.0.1"
"parse5-htmlparser2-tree-adapter" "^6.0.1"
"tslib" "^2.2.0"
combined-stream@^1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==
"combined-stream@^1.0.6":
"integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="
"resolved" "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz"
"version" "1.0.8"
dependencies:
delayed-stream "~1.0.0"
"delayed-stream" "~1.0.0"
css-select@^4.1.3:
version "4.1.3"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.3.tgz#a70440f70317f2669118ad74ff105e65849c7067"
integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==
"css-select@^4.1.3":
"integrity" "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA=="
"resolved" "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz"
"version" "4.1.3"
dependencies:
boolbase "^1.0.0"
css-what "^5.0.0"
domhandler "^4.2.0"
domutils "^2.6.0"
nth-check "^2.0.0"
"boolbase" "^1.0.0"
"css-what" "^5.0.0"
"domhandler" "^4.2.0"
"domutils" "^2.6.0"
"nth-check" "^2.0.0"
css-what@^5.0.0, css-what@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe"
integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==
"css-what@^5.0.0", "css-what@^5.0.1":
"integrity" "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw=="
"resolved" "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz"
"version" "5.1.0"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
"delayed-stream@~1.0.0":
"integrity" "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
"resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz"
"version" "1.0.0"
dom-serializer@^1.0.1, dom-serializer@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91"
integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==
"dom-serializer@^1.0.1", "dom-serializer@^1.3.2":
"integrity" "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig=="
"resolved" "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz"
"version" "1.3.2"
dependencies:
domelementtype "^2.0.1"
domhandler "^4.2.0"
entities "^2.0.0"
"domelementtype" "^2.0.1"
"domhandler" "^4.2.0"
"entities" "^2.0.0"
domelementtype@^2.0.1, domelementtype@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==
"domelementtype@^2.0.1", "domelementtype@^2.2.0":
"integrity" "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A=="
"resolved" "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz"
"version" "2.2.0"
domhandler@^4.0.0, domhandler@^4.2.0:
version "4.2.2"
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.2.tgz#e825d721d19a86b8c201a35264e226c678ee755f"
integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==
"domhandler@^4.0.0", "domhandler@^4.2.0":
"integrity" "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w=="
"resolved" "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz"
"version" "4.2.2"
dependencies:
domelementtype "^2.2.0"
"domelementtype" "^2.2.0"
domino@^2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.6.tgz#fe4ace4310526e5e7b9d12c7de01b7f485a57ffe"
integrity sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==
"domino@^2.1.6":
"integrity" "sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ=="
"resolved" "https://registry.npmjs.org/domino/-/domino-2.1.6.tgz"
"version" "2.1.6"
domutils@^2.5.2, domutils@^2.6.0, domutils@^2.7.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==
"domutils@^2.5.2", "domutils@^2.6.0", "domutils@^2.7.0":
"integrity" "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A=="
"resolved" "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz"
"version" "2.8.0"
dependencies:
dom-serializer "^1.0.1"
domelementtype "^2.2.0"
domhandler "^4.2.0"
"dom-serializer" "^1.0.1"
"domelementtype" "^2.2.0"
"domhandler" "^4.2.0"
entities@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
"entities@^2.0.0":
"integrity" "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A=="
"resolved" "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz"
"version" "2.2.0"
form-data@^2.5.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==
"form-data@^2.5.0":
"integrity" "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA=="
"resolved" "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz"
"version" "2.5.1"
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.6"
mime-types "^2.1.12"
"asynckit" "^0.4.0"
"combined-stream" "^1.0.6"
"mime-types" "^2.1.12"
htmlparser2@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7"
integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==
"htmlparser2@^6.1.0":
"integrity" "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A=="
"resolved" "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz"
"version" "6.1.0"
dependencies:
domelementtype "^2.0.1"
domhandler "^4.0.0"
domutils "^2.5.2"
entities "^2.0.0"
"domelementtype" "^2.0.1"
"domhandler" "^4.0.0"
"domutils" "^2.5.2"
"entities" "^2.0.0"
mdn-data@^2.0.22:
version "2.0.22"
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.22.tgz#16eb79b0b603897e40236625d95018674e7ae5d4"
integrity sha512-qDYKNxdP1636yemoyfNsEYUgfdlsTscouOZamt0e7QmN91cmpXDWd+iRADtT9m94jYtYH2QWrraDW+83UlzTwQ==
"mdn-data@^2.0.22":
"integrity" "sha512-qDYKNxdP1636yemoyfNsEYUgfdlsTscouOZamt0e7QmN91cmpXDWd+iRADtT9m94jYtYH2QWrraDW+83UlzTwQ=="
"resolved" "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.22.tgz"
"version" "2.0.22"
mime-db@~1.37.0:
version "1.37.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8"
integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==
"mime-db@1.50.0":
"integrity" "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A=="
"resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz"
"version" "1.50.0"
mime-types@^2.1.12:
version "2.1.21"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96"
integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==
"mime-types@^2.1.12":
"integrity" "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g=="
"resolved" "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz"
"version" "2.1.33"
dependencies:
mime-db "~1.37.0"
"mime-db" "1.50.0"
nth-check@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2"
integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==
"nth-check@^2.0.0":
"integrity" "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w=="
"resolved" "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz"
"version" "2.0.1"
dependencies:
boolbase "^1.0.0"
"boolbase" "^1.0.0"
parse5-htmlparser2-tree-adapter@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6"
integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==
"parse5-htmlparser2-tree-adapter@^6.0.1":
"integrity" "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA=="
"resolved" "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz"
"version" "6.0.1"
dependencies:
parse5 "^6.0.1"
"parse5" "^6.0.1"
parse5@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
"parse5@^6.0.1":
"integrity" "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
"resolved" "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz"
"version" "6.0.1"
tslib@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
"tslib@^2.2.0":
"integrity" "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
"resolved" "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz"
"version" "2.3.1"
turndown@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/turndown/-/turndown-7.1.1.tgz#96992f2d9b40a1a03d3ea61ad31b5a5c751ef77f"
integrity sha512-BEkXaWH7Wh7e9bd2QumhfAXk5g34+6QUmmWx+0q6ThaVOLuLUqsnkq35HQ5SBHSaxjSfSM7US5o4lhJNH7B9MA==
"turndown@^7.1.1":
"integrity" "sha512-BEkXaWH7Wh7e9bd2QumhfAXk5g34+6QUmmWx+0q6ThaVOLuLUqsnkq35HQ5SBHSaxjSfSM7US5o4lhJNH7B9MA=="
"resolved" "https://registry.npmjs.org/turndown/-/turndown-7.1.1.tgz"
"version" "7.1.1"
dependencies:
domino "^2.1.6"
"domino" "^2.1.6"
typescript@^4.4.4:
version "4.4.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c"
integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==
"typescript@^4.4.4":
"integrity" "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA=="
"resolved" "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz"
"version" "4.4.4"

Просмотреть файл

@ -5,7 +5,8 @@
//@ts-check
const { push } = require('../chromestatus/attributeRelevance');
const mdnData = require('mdn-data');
const mdnCompatData = require('@mdn/browser-compat-data');
const { propertyDescriptions: mdnPropertyDescriptions } = require('./mdn-documentation')
const mdnExcludedProperties = [
@ -23,15 +24,23 @@ const noDoc = ["-webkit-background-composite", "-webkit-margin-bottom-collapse",
function addMDNProperties(vscProperties) {
const propertyMap = {}
const mdnProperties = require('mdn-data').css.properties
const mdnAtRules = require('mdn-data').css.atRules
const mdnProperties = mdnData.css.properties;
const mdnCompatProperties = mdnCompatData.css.properties;
const mdnAtRules = mdnData.css.atRules;
const mdnCompatAtRules = mdnCompatData.css['at-rules'];
const allMDNProperties = {};
for (const property of Object.keys(mdnProperties)) {
allMDNProperties[property] = extractMDNProperties(property, mdnProperties[property], mdnCompatProperties[property]);
}
// Flatten at-rule properties and put all properties together
const allMDNProperties = mdnProperties
for (const atRuleName of Object.keys(mdnAtRules)) {
if (mdnAtRules[atRuleName].descriptors) {
for (const atRulePropertyName of Object.keys(mdnAtRules[atRuleName].descriptors)) {
allMDNProperties[atRulePropertyName] = mdnAtRules[atRuleName].descriptors[atRulePropertyName]
allMDNProperties[atRulePropertyName] = extractMDNProperties(`${atRuleName}/${atRulePropertyName}`, mdnAtRules[atRuleName].descriptors[atRulePropertyName], mdnCompatAtRules[atRuleName]?.[atRulePropertyName]);
}
}
}
@ -48,7 +57,7 @@ function addMDNProperties(vscProperties) {
if (allMDNProperties[p.name]) {
propertyMap[p.name] = {
...p,
...extractMDNProperties(allMDNProperties[p.name])
...allMDNProperties[p.name]
}
} else {
propertyMap[p.name] = p
@ -65,7 +74,7 @@ function addMDNProperties(vscProperties) {
name: pn,
desc: '',
restriction: 'none',
...extractMDNProperties(allMDNProperties[pn])
...allMDNProperties[pn]
}
}
}
@ -91,7 +100,7 @@ function addMDNProperties(vscProperties) {
if (missingDocumentation.length) {
console.log('add to mdn-documenatation.ts (propertyDescriptions):' + missingDocumentation.map(e => `\n'${e}': '',`).join(''));
}
return Object.values(propertyMap)
@ -100,15 +109,9 @@ function addMDNProperties(vscProperties) {
/**
* Extract only the MDN data that we use
*/
function extractMDNProperties(mdnEntry) {
if (mdnEntry.status === 'standard') {
return {
syntax: mdnEntry.syntax
}
}
function extractMDNProperties(name, mdnEntry, mdCompatEntry) {
return {
status: abbreviateStatus(mdnEntry.status),
status: abbreviateStatus(mdnEntry, mdCompatEntry),
syntax: mdnEntry.syntax
}
}
@ -116,7 +119,38 @@ function extractMDNProperties(mdnEntry) {
/**
* Make syntax as small as possible for browser usage
*/
function abbreviateStatus(status) {
function abbreviateStatus(mdnEntry, mdnCompatEntry) {
let status = mdnEntry.status;
if (mdnCompatEntry) {
let compatData = mdnCompatEntry.__compat;
if (!compatData) {
for (const contextName in mdnCompatEntry) {
if (mdnCompatEntry[contextName].__compat) {
compatData = mdnCompatEntry[contextName].__compat;
break;
}
}
}
const compatStatus = compatData?.status;
if (compatStatus) {
if (compatStatus.experimental) {
status = 'experimental';
} else if (compatStatus.deprecated) {
status = 'obsolete';
} else if (compatStatus.standard_track) {
status = 'standard';
} else {
status = 'nonstandard';
}
}
}
if (mdnEntry.status === 'standard') {
return undefined;
}
return {
nonstandard: 'n',
experimental: 'e',

Просмотреть файл

@ -5,12 +5,14 @@
//@ts-check
const mdnData = require('mdn-data')
const mdnData = require('mdn-data');
const mdnCompatData = require('@mdn/browser-compat-data');
const { abbreviateStatus } = require('./mdn-data-importer')
const { pseudoSelectorDescriptions, pseudoElementDescriptions } = require('./mdn-documentation')
function addMDNPseudoElements(vscPseudoElements) {
const mdnSelectors = mdnData.css.selectors;
const mdnCompatProperties = mdnCompatData.css.properties;
const allPseudoElements = vscPseudoElements;
const missingDocumentation = [];
@ -31,7 +33,7 @@ function addMDNPseudoElements(vscPseudoElements) {
allPseudoElements.push({
name: selectorName,
desc,
status: abbreviateStatus(selector.status)
status: abbreviateStatus(selector, mdnCompatProperties[selectorName])
})
}
}
@ -52,7 +54,8 @@ const mdnExcludedPseudoSelectors = [
]
function addMDNPseudoSelectors(vscPseudoClasses) {
const mdnSelectors = mdnData.css.selectors
const mdnSelectors = mdnData.css.selectors;
const mdnCompatProperties = mdnCompatData.css.properties;
const allPseudoSelectors = vscPseudoClasses
const allPseudoSelectorNames = vscPseudoClasses.map(s => s.name);
@ -67,6 +70,7 @@ function addMDNPseudoSelectors(vscPseudoClasses) {
!allPseudoSelectorNames.includes(selectorName) &&
!allPseudoSelectorNames.includes(selectorName + '()')
) {
const desc = pseudoSelectorDescriptions[selectorName] || '';
if (!desc) {
missingDocumentation.push(selectorName);
@ -75,7 +79,7 @@ function addMDNPseudoSelectors(vscPseudoClasses) {
allPseudoSelectors.push({
name: selectorName,
desc,
status: abbreviateStatus(selector.status)
status: abbreviateStatus(selector, mdnCompatProperties[selectorName])
})
}
}

Просмотреть файл

@ -845,7 +845,6 @@
"description": "Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."
}
],
"status": "experimental",
"syntax": "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
"relevance": 54,
"references": [
@ -876,7 +875,6 @@
"description": "Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."
}
],
"status": "experimental",
"syntax": "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
"relevance": 53,
"references": [
@ -9808,9 +9806,9 @@
{
"name": "-ms-scrollbar-track-color",
"browsers": [
"IE5"
"IE8"
],
"status": "nonstandard",
"status": "obsolete",
"syntax": "<color>",
"relevance": 0,
"references": [
@ -12588,7 +12586,6 @@
"description": "The ruby text appears on the right of the base. Unlike 'before' and 'after', this value is not relative to the text flow direction."
}
],
"status": "experimental",
"syntax": "[ alternate || [ over | under ] ] | inter-character",
"relevance": 50,
"references": [
@ -17079,7 +17076,7 @@
},
{
"name": "-moz-binding",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<url> | none",
"relevance": 0,
"browsers": [
@ -17102,7 +17099,7 @@
},
{
"name": "-moz-float-edge",
"status": "nonstandard",
"status": "obsolete",
"syntax": "border-box | content-box | margin-box | padding-box",
"relevance": 0,
"browsers": [
@ -17118,7 +17115,7 @@
},
{
"name": "-moz-force-broken-image-icon",
"status": "nonstandard",
"status": "obsolete",
"syntax": "0 | 1",
"relevance": 0,
"browsers": [
@ -17166,7 +17163,7 @@
},
{
"name": "-moz-outline-radius",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
"relevance": 0,
"browsers": [
@ -17182,7 +17179,7 @@
},
{
"name": "-moz-outline-radius-bottomleft",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<outline-radius>",
"relevance": 0,
"browsers": [
@ -17198,7 +17195,7 @@
},
{
"name": "-moz-outline-radius-bottomright",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<outline-radius>",
"relevance": 0,
"browsers": [
@ -17214,7 +17211,7 @@
},
{
"name": "-moz-outline-radius-topleft",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<outline-radius>",
"relevance": 0,
"browsers": [
@ -17230,7 +17227,7 @@
},
{
"name": "-moz-outline-radius-topright",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<outline-radius>",
"relevance": 0,
"browsers": [
@ -17260,7 +17257,7 @@
},
{
"name": "-moz-user-input",
"status": "nonstandard",
"status": "obsolete",
"syntax": "auto | none | enabled | disabled",
"relevance": 0,
"browsers": [
@ -17535,7 +17532,6 @@
},
{
"name": "appearance",
"status": "experimental",
"syntax": "none | auto | textfield | menulist-button | <compat-auto>",
"relevance": 62,
"browsers": [
@ -17555,7 +17551,6 @@
},
{
"name": "aspect-ratio",
"status": "experimental",
"syntax": "auto | <ratio>",
"relevance": 52,
"browsers": [
@ -17829,12 +17824,12 @@
},
{
"name": "box-align",
"status": "nonstandard",
"status": "obsolete",
"syntax": "start | center | end | baseline | stretch",
"relevance": 0,
"browsers": [
"E12",
"FF1",
"FF49",
"S3",
"C1",
"O15"
@ -17849,12 +17844,12 @@
},
{
"name": "box-direction",
"status": "nonstandard",
"status": "obsolete",
"syntax": "normal | reverse | inherit",
"relevance": 0,
"browsers": [
"E12",
"FF1",
"FF49",
"S3",
"C1",
"O15"
@ -17869,12 +17864,12 @@
},
{
"name": "box-flex",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<number>",
"relevance": 0,
"browsers": [
"E12",
"FF1",
"FF49",
"S3",
"C1",
"O15"
@ -17889,7 +17884,7 @@
},
{
"name": "box-flex-group",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<integer>",
"relevance": 0,
"browsers": [
@ -17907,7 +17902,7 @@
},
{
"name": "box-lines",
"status": "nonstandard",
"status": "obsolete",
"syntax": "single | multiple",
"relevance": 0,
"browsers": [
@ -17925,12 +17920,12 @@
},
{
"name": "box-ordinal-group",
"status": "nonstandard",
"status": "obsolete",
"syntax": "<integer>",
"relevance": 0,
"browsers": [
"E12",
"FF1",
"FF49",
"S3",
"C1",
"O15"
@ -17945,12 +17940,12 @@
},
{
"name": "box-orient",
"status": "nonstandard",
"status": "obsolete",
"syntax": "horizontal | vertical | inline-axis | block-axis | inherit",
"relevance": 0,
"browsers": [
"E12",
"FF1",
"FF49",
"S3",
"C1",
"O15"
@ -17965,12 +17960,12 @@
},
{
"name": "box-pack",
"status": "nonstandard",
"status": "obsolete",
"syntax": "start | center | end | justify",
"relevance": 0,
"browsers": [
"E12",
"FF1",
"FF49",
"S3",
"C1",
"O15"
@ -18116,7 +18111,6 @@
},
{
"name": "forced-color-adjust",
"status": "experimental",
"syntax": "auto | none",
"relevance": 52,
"browsers": [
@ -21875,7 +21869,7 @@
"browsers": [
"E86",
"FF68",
"S11.1",
"Spreview",
"C86",
"O72"
],

Просмотреть файл

@ -19,7 +19,7 @@
"data/*"
],
"devDependencies": {
"@mdn/browser-compat-data": "^4.1.18",
"@mdn/browser-compat-data": "^5.0.1",
"mdn-data": "^2.0.27",
"xml2js": "^0.4.23"
}

Просмотреть файл

@ -2,10 +2,10 @@
# yarn lockfile v1
"@mdn/browser-compat-data@^4.1.18":
version "4.1.18"
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.1.18.tgz#eb960654aec3ebb6f39a9469845659a8c1d50b3a"
integrity sha512-Ap8MOYbyvEilK1+sNY6yh6LmsHSp7f5zzSGlY4AemhbTcoultcozEXPzx42OO6WjoriOsw88aW8TiqgYdXwsxg==
"@mdn/browser-compat-data@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.0.1.tgz#e71fe19c5ba99413fae9305cc9ed060eeb07ea45"
integrity sha512-c+RIBgZSqSWgxZdNWLaaCAfBon2YM4pz0QD+VoT32rIOGChJl3l99E7B/xSWvVlSSiE7jQkEuJx3hbKoUdAi3w==
mdn-data@^2.0.27:
version "2.0.27"