Skip to content

Commit 8a3cd25

Browse files
authored
fix: disable fallback for unsupported terminals (#1)
1 parent a5ada9e commit 8a3cd25

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/handlers/helpers.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,18 @@ const fetchModuleInfo = async (moduleName) => {
2121
head: ["Type", "Link"],
2222
});
2323

24+
const npmPageUrl = `https://npmjs.com/package/${moduleInfo.npm}`;
25+
2426
table.push(
25-
["website", terminalLink(moduleInfo.website)],
26-
["npm page", terminalLink(`https://npmjs.com/package/${moduleInfo.npm}`)],
27-
["GitHub Repository", terminalLink(moduleInfo.github)],
27+
[
28+
"website",
29+
terminalLink(moduleInfo.website, moduleInfo.website, { fallback: false }),
30+
],
31+
["npm page", terminalLink(npmPageUrl, npmPageUrl, { fallback: false })],
32+
[
33+
"GitHub Repository",
34+
terminalLink(moduleInfo.github, moduleInfo.github, { fallback: false }),
35+
],
2836
);
2937

3038
console.log(table.toString());

0 commit comments

Comments
 (0)