mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 04:26:32 +08:00
Run "npm audit fix"
Some packages have vulnerabilities, which can be fixed with "npm audit fix". Unfortunately not all packages can be fixed, as they are transitive dependencies that require major breaking change updates from other packages. Luckily we are not affected by these vulnerabilities in our frontend code. R=aerotwist@chromium.org Bug: none Change-Id: I728411390ebbcb5240045aae5b67b4d8cfc540fb Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2949048 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
aaaa41eb59
commit
eab929dec5
+18
-1
@@ -16,10 +16,27 @@ export declare function getOuterHTML(node: Node | Node[], options?: DomSerialize
|
||||
*/
|
||||
export declare function getInnerHTML(node: Node, options?: DomSerializerOptions): string;
|
||||
/**
|
||||
* Get a node's inner text.
|
||||
* Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags.
|
||||
*
|
||||
* @deprecated Use `textContent` instead.
|
||||
* @param node Node to get the inner text of.
|
||||
* @returns `node`'s inner text.
|
||||
*/
|
||||
export declare function getText(node: Node | Node[]): string;
|
||||
/**
|
||||
* Get a node's text content.
|
||||
*
|
||||
* @param node Node to get the text content of.
|
||||
* @returns `node`'s text content.
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}
|
||||
*/
|
||||
export declare function textContent(node: Node | Node[]): string;
|
||||
/**
|
||||
* Get a node's inner text.
|
||||
*
|
||||
* @param node Node to get the inner text of.
|
||||
* @returns `node`'s inner text.
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}
|
||||
*/
|
||||
export declare function innerText(node: Node | Node[]): string;
|
||||
//# sourceMappingURL=stringify.d.ts.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../src/stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,IAAI,EAAE,MAAM,YAAY,CAAC;AACvE,OAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,EACnB,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAIR;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,MAAM,CAMnD"}
|
||||
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../src/stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,IAAI,EAAE,MAAM,YAAY,CAAC;AACvE,OAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGlE;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,EACnB,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,oBAAoB,GAC/B,MAAM,CAIR;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,MAAM,CAMnD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,MAAM,CAMvD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,MAAM,CAQrD"}
|
||||
+43
-2
@@ -3,9 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;
|
||||
exports.innerText = exports.textContent = exports.getText = exports.getInnerHTML = exports.getOuterHTML = void 0;
|
||||
var domhandler_1 = require("domhandler");
|
||||
var dom_serializer_1 = __importDefault(require("dom-serializer"));
|
||||
var domelementtype_1 = require("domelementtype");
|
||||
/**
|
||||
* @param node Node to get the outer HTML of.
|
||||
* @param options Options for serialization.
|
||||
@@ -29,8 +30,9 @@ function getInnerHTML(node, options) {
|
||||
}
|
||||
exports.getInnerHTML = getInnerHTML;
|
||||
/**
|
||||
* Get a node's inner text.
|
||||
* Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags.
|
||||
*
|
||||
* @deprecated Use `textContent` instead.
|
||||
* @param node Node to get the inner text of.
|
||||
* @returns `node`'s inner text.
|
||||
*/
|
||||
@@ -46,3 +48,42 @@ function getText(node) {
|
||||
return "";
|
||||
}
|
||||
exports.getText = getText;
|
||||
/**
|
||||
* Get a node's text content.
|
||||
*
|
||||
* @param node Node to get the text content of.
|
||||
* @returns `node`'s text content.
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}
|
||||
*/
|
||||
function textContent(node) {
|
||||
if (Array.isArray(node))
|
||||
return node.map(textContent).join("");
|
||||
if (domhandler_1.isTag(node))
|
||||
return textContent(node.children);
|
||||
if (domhandler_1.isCDATA(node))
|
||||
return textContent(node.children);
|
||||
if (domhandler_1.isText(node))
|
||||
return node.data;
|
||||
return "";
|
||||
}
|
||||
exports.textContent = textContent;
|
||||
/**
|
||||
* Get a node's inner text.
|
||||
*
|
||||
* @param node Node to get the inner text of.
|
||||
* @returns `node`'s inner text.
|
||||
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}
|
||||
*/
|
||||
function innerText(node) {
|
||||
if (Array.isArray(node))
|
||||
return node.map(innerText).join("");
|
||||
if (domhandler_1.hasChildren(node) && node.type === domelementtype_1.ElementType.Tag) {
|
||||
return innerText(node.children);
|
||||
}
|
||||
if (domhandler_1.isCDATA(node))
|
||||
return innerText(node.children);
|
||||
if (domhandler_1.isText(node))
|
||||
return node.data;
|
||||
return "";
|
||||
}
|
||||
exports.innerText = innerText;
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "domutils",
|
||||
"version": "2.6.0",
|
||||
"version": "2.7.0",
|
||||
"description": "Utilities for working with htmlparser2's dom",
|
||||
"author": "Felix Boehm <me@feedic.com>",
|
||||
"funding": {
|
||||
@@ -42,17 +42,17 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^14.0.5",
|
||||
"@types/node": "^15.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.1.0",
|
||||
"@typescript-eslint/parser": "^4.1.0",
|
||||
"coveralls": "^3.0.5",
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-jsdoc": "^32.0.2",
|
||||
"eslint-plugin-jsdoc": "^35.1.0",
|
||||
"htmlparser2": "~6.1.0",
|
||||
"jest": "^26.0.1",
|
||||
"jest": "^27.0.1",
|
||||
"prettier": "^2.0.5",
|
||||
"ts-jest": "^26.0.0",
|
||||
"ts-jest": "^27.0.1",
|
||||
"typedoc": "^0.20.5",
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user