diff --git a/package.json b/package.json index 575936e7..84605563 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ }, "dependencies": { "@nodesecure/documentation-ui": "^1.3.0", - "@nodesecure/flags": "^2.4.0", + "@nodesecure/flags": "^3.0.3", "@nodesecure/i18n": "^4.0.1", "@nodesecure/licenses-conformance": "^2.1.0", "@nodesecure/npm-registry-sdk": "^3.0.0", diff --git a/src/http-server/endpoints/flags.js b/src/http-server/endpoints/flags.js index cbcf2bac..eb9883c3 100644 --- a/src/http-server/endpoints/flags.js +++ b/src/http-server/endpoints/flags.js @@ -13,7 +13,7 @@ export function getAll(_req, res) { } export function get(req, res) { - if (req.params.title !== "isDuplicate" && !kNodeSecureFlags.has(req.params.title)) { + if (req.params.title !== "hasDuplicate" && !kNodeSecureFlags.has(req.params.title)) { return send(res, 404, { error: "Not Found" }); } diff --git a/views/index.html b/views/index.html index bb4092a1..8771c75d 100644 --- a/views/index.html +++ b/views/index.html @@ -200,8 +200,8 @@

[[=z.token('settings.general.title')]]

- - + +
diff --git a/workspaces/vis-network/src/utils.js b/workspaces/vis-network/src/utils.js index c8853557..df765376 100644 --- a/workspaces/vis-network/src/utils.js +++ b/workspaces/vis-network/src/utils.js @@ -62,11 +62,22 @@ export function getNodeColor(options) { return CONSTANTS.COLORS[theme].DEFAULT; } -export function getFlagsEmojisInlined(flags, flagsToIgnore) { +export function getFlagsEmojisInlined( + flags, + flagsToIgnore = new Set() +) { return [...flags] - .filter((title) => !flagsToIgnore.has(title)) - .map((title) => kFlagsEmojis[title] ?? null) - .filter((value) => value !== null && !flagsToIgnore.has(value)) + .flatMap((title) => { + if (flagsToIgnore.has(title)) { + return []; + } + + // FIX: when scanner resolve to flags ^3.x + const emoji = kFlagsEmojis[title === "hasDuplicate" ? "isDuplicated" : title]; + + return emoji ? [emoji] : []; + }) + .filter((emoji) => !flagsToIgnore.has(emoji)) .reduce((acc, cur) => `${acc} ${cur}`, ""); }