Run npm audit
This syncs our dependencies to the latest version. There is still
a reported vulnerability in postcss, but we are luckily unaffected.
However, we can't upgrade postcss yet, as stylelint requires it
and can not use postcss 8 yet:
https://github.com/stylelint/stylelint/issues/4942#issuecomment-823513767
Also updated manage_node_deps.py to not run the full install when
running `ls`, to allow for easier inspection of our dependency graph.
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I1c9e4836fca25500e2e7277ec82b13bf2b881dca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887731
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
diff --git a/node_modules/stylelint/lib/utils/validateOptions.js b/node_modules/stylelint/lib/utils/validateOptions.js
index 0081cb0..0d06ae4 100644
--- a/node_modules/stylelint/lib/utils/validateOptions.js
+++ b/node_modules/stylelint/lib/utils/validateOptions.js
@@ -2,7 +2,7 @@
const _ = require('lodash');
-const ignoredOptions = new Set(['severity', 'message', 'reportDisables']);
+const IGNORED_OPTIONS = new Set(['severity', 'message', 'reportDisables']);
/** @typedef {{possible: any, actual: any, optional?: boolean}} Options */
@@ -15,8 +15,8 @@
* @param {string} ruleName
* @param {...Options} optionDescriptions - Each optionDescription can
* have the following properties:
- * - `actual` (required): the actual passed option value or object.
- * - `possible` (required): a schema representation of what values are
+ * - `actual` (required): the actual passed option value or object.
+ * - `possible` (required): a schema representation of what values are
* valid for those options. `possible` should be an object if the
* options are an object, with corresponding keys; if the options are not an
* object, `possible` isn't, either. All `possible` value representations
@@ -125,7 +125,7 @@
}
Object.keys(actual).forEach((optionName) => {
- if (ignoredOptions.has(optionName)) {
+ if (IGNORED_OPTIONS.has(optionName)) {
return;
}
@@ -155,9 +155,7 @@
function isValid(possible, actual) {
const possibleList = /** @type {Array<any|Function>} */ ([]).concat(possible);
- for (let i = 0, l = possibleList.length; i < l; i++) {
- const possibility = possibleList[i];
-
+ for (const possibility of possibleList) {
if (typeof possibility === 'function' && possibility(actual)) {
return true;
}