Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typedoc-plugin-mdn-links

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedoc-plugin-mdn-links - npm Package Compare versions

Comparing version 3.2.12 to 3.3.0

45

dist/index.js

@@ -37,3 +37,10 @@ "use strict";

});
app.converter.addUnknownSymbolResolver((declaration) => {
app.converter.addUnknownSymbolResolver(resolveSymbol);
function resolveSymbol(declaration, _refl, _part, symbolId) {
if (symbolId) {
return resolveDeclaration(makeDeclarationReference(symbolId));
}
return resolveDeclaration(declaration);
}
function resolveDeclaration(declaration) {
const validSources = [

@@ -63,3 +70,3 @@ ...app.options.getValue("additionalModuleSources"),

}
});
}
}

@@ -73,1 +80,35 @@ function stringifyPath(path) {

}
function makeDeclarationReference(symbolId) {
if ("toDeclarationReference" in symbolId) {
// Method added in TypeDoc 0.26.8, use it if present as it will be
// smarter about package names which aren't in node_modules. Probably not
// an issue for this project, so the simpler method is also included here.
return symbolId.toDeclarationReference();
}
return {
resolutionStart: "global",
moduleSource: getModuleName(symbolId.fileName),
symbolReference: getSymbolReference(symbolId.qualifiedName),
};
}
function getModuleName(symbolPath) {
// Attempt to decide package name from path if it contains "node_modules"
let startIndex = symbolPath.lastIndexOf("node_modules/");
if (startIndex !== -1) {
startIndex += "node_modules/".length;
let stopIndex = symbolPath.indexOf("/", startIndex);
// Scoped package, e.g. `@types/node`
if (symbolPath[startIndex] === "@") {
stopIndex = symbolPath.indexOf("/", stopIndex + 1);
}
return symbolPath.substring(startIndex, stopIndex);
}
}
function getSymbolReference(qualifiedName) {
return {
path: (0, typedoc_1.splitUnquotedString)(qualifiedName, ".").map((path) => ({
navigation: ".",
path,
})),
};
}

2

package.json
{
"name": "typedoc-plugin-mdn-links",
"version": "3.2.12",
"version": "3.3.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,3 +7,3 @@ # typedoc-plugin-mdn-links

If you're explicitly referencing a type in a comment, you can use `{@link
!HTMLElement}` to have it processed by this plugin.
!HTMLElement}` or `{@link HTMLElement}` to have it processed by this plugin.

@@ -10,0 +10,0 @@ If you set `--logLevel Verbose`, it will print out when failing to resolve a

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc