From 586a4b2a871b9026519fbf201cb678eb3b556343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:02:59 +0800 Subject: [PATCH] Build(deps): Bump css-units-list from 0.0.5 to 1.1.0 (#12684) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fisker Cheung --- package.json | 2 +- scripts/vendors/vendor-meta.json | 18 ++ scripts/vendors/vendors.mjs | 1 + src/language-css/utils/css-units.evaluate.js | 2 +- vendors/css-units-list.json | 166 +++++++++++++++++++ yarn.lock | 8 +- 6 files changed, 191 insertions(+), 6 deletions(-) create mode 100644 vendors/css-units-list.json diff --git a/package.json b/package.json index c20bcf5e4..095acb094 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "ci-info": "3.3.0", "cjk-regex": "2.0.1", "cosmiconfig": "7.0.1", - "css-units-list": "0.0.5", + "css-units-list": "1.1.0", "dashify": "2.0.0", "diff": "5.0.0", "editorconfig": "0.15.3", diff --git a/scripts/vendors/vendor-meta.json b/scripts/vendors/vendor-meta.json index ddd3695d3..0a5c00b08 100644 --- a/scripts/vendors/vendor-meta.json +++ b/scripts/vendors/vendor-meta.json @@ -1,6 +1,7 @@ { "entries": { "chalk": "chalk.js", + "css-units-list": "css-units-list.json", "escape-string-regexp": "escape-string-regexp.js", "execa": "execa.js", "html-element-attributes": "html-element-attributes.json", @@ -25,6 +26,23 @@ "author": null, "contributors": [] }, + { + "name": "css-units-list", + "maintainers": [], + "version": "1.1.0", + "description": "List of CSS:Cascading Style Sheets Units", + "repository": "fisker/css-units-list", + "homepage": "https://github.com/fisker/css-units-list#readme", + "private": false, + "license": "MIT", + "licenseText": "MIT License\n\nCopyright (c) fisker Cheung (https://www.fiskercheung.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "author": { + "name": "fisker Cheung", + "email": "lionkay@gmail.com", + "url": "https://www.fiskercheung.com/" + }, + "contributors": [] + }, { "name": "escape-string-regexp", "maintainers": [], diff --git a/scripts/vendors/vendors.mjs b/scripts/vendors/vendors.mjs index bea6f7929..c477dd756 100644 --- a/scripts/vendors/vendors.mjs +++ b/scripts/vendors/vendors.mjs @@ -1,5 +1,6 @@ const vendors = [ "chalk", + "css-units-list", "escape-string-regexp", "execa", "html-element-attributes", diff --git a/src/language-css/utils/css-units.evaluate.js b/src/language-css/utils/css-units.evaluate.js index fe62f34fe..25f8e5add 100644 --- a/src/language-css/utils/css-units.evaluate.js +++ b/src/language-css/utils/css-units.evaluate.js @@ -1,6 +1,6 @@ "use strict"; -const cssUnits = require("css-units-list"); +const { default: cssUnits } = require("../../../vendors/css-units-list.json"); const CSS_UNITS = Object.fromEntries( cssUnits.map((unit) => [unit.toLowerCase(), unit]) diff --git a/vendors/css-units-list.json b/vendors/css-units-list.json new file mode 100644 index 000000000..ca86a44bc --- /dev/null +++ b/vendors/css-units-list.json @@ -0,0 +1,166 @@ +{ + "absoluteLengths": [ + "cm", + "mm", + "Q", + "in", + "pt", + "pc", + "px" + ], + "angleUnits": [ + "deg", + "grad", + "rad", + "turn" + ], + "default": [ + "em", + "rem", + "ex", + "rex", + "cap", + "rcap", + "ch", + "rch", + "ic", + "ric", + "lh", + "rlh", + "vw", + "svw", + "lvw", + "dvw", + "vh", + "svh", + "lvh", + "dvh", + "vi", + "svi", + "lvi", + "dvi", + "vb", + "svb", + "lvb", + "dvb", + "vmin", + "svmin", + "lvmin", + "dvmin", + "vmax", + "svmax", + "lvmax", + "dvmax", + "cm", + "mm", + "Q", + "in", + "pt", + "pc", + "px", + "deg", + "grad", + "rad", + "turn", + "s", + "ms", + "Hz", + "kHz", + "dpi", + "dpcm", + "dppx", + "x" + ], + "durationUnits": [ + "s", + "ms" + ], + "fontRelativeLengths": [ + "em", + "rem", + "ex", + "rex", + "cap", + "rcap", + "ch", + "rch", + "ic", + "ric", + "lh", + "rlh" + ], + "frequencyUnits": [ + "Hz", + "kHz" + ], + "relativeLengths": [ + "em", + "rem", + "ex", + "rex", + "cap", + "rcap", + "ch", + "rch", + "ic", + "ric", + "lh", + "rlh", + "vw", + "svw", + "lvw", + "dvw", + "vh", + "svh", + "lvh", + "dvh", + "vi", + "svi", + "lvi", + "dvi", + "vb", + "svb", + "lvb", + "dvb", + "vmin", + "svmin", + "lvmin", + "dvmin", + "vmax", + "svmax", + "lvmax", + "dvmax" + ], + "resolutionUnits": [ + "dpi", + "dpcm", + "dppx", + "x" + ], + "viewportPercentageLengths": [ + "vw", + "svw", + "lvw", + "dvw", + "vh", + "svh", + "lvh", + "dvh", + "vi", + "svi", + "lvi", + "dvi", + "vb", + "svb", + "lvb", + "dvb", + "vmin", + "svmin", + "lvmin", + "dvmin", + "vmax", + "svmax", + "lvmax", + "dvmax" + ] +} diff --git a/yarn.lock b/yarn.lock index 8b4262519..938522638 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2530,10 +2530,10 @@ cspell@5.19.7: strip-ansi "^6.0.1" vscode-uri "^3.0.3" -css-units-list@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/css-units-list/-/css-units-list-0.0.5.tgz#a1aa9318ccd2f64dcda5c3336c5261d1f729cade" - integrity sha512-CDr8YQugedUsousq/G3ZSrod3XH0qGKk09MwahvDhwg72p+bBi068B2EJxuOhhePQdypxCFcbmMIyhQleUxq4A== +css-units-list@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/css-units-list/-/css-units-list-1.1.0.tgz#46cfb7022c9eb626d9a62589372b8439e1ddb91e" + integrity sha512-WnbCcmr1rHeUb5JbpIWyBjH0HiW6RIZRujOzVvwyE2aZGqtjLFUfiqB9nYmAPlYHNgvqvjhX8YeJv0uF25QoHg== cssom@^0.4.4: version "0.4.4"