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

jsdoc-tsimport-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-tsimport-plugin - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

18

index.js

@@ -81,3 +81,4 @@ const path = require('path');

const s = source || (fs.readFileSync(filenameNor).toString());
const s = source || ((fs.existsSync(filenameNor)) ?
fs.readFileSync(filenameNor).toString() : '');
s.replace(docCommentsRegex, (comment) => {

@@ -176,7 +177,8 @@ if (!fileInfo.moduleId) {

/**
* Given a filename, if there is no extension, scan the files for the
* Given a filename, if there is no extension, scan the files for the
* most likely match.
*
* @param {string} filename
* @returns {string}
* @param {string} filename The filename with or without an
* extension to resolve.
* @returns {string} The path to the resolved file.
*/

@@ -186,11 +188,13 @@ function inferExtension(filename) {

const ext = path.extname(filenameNor);
if (ext) return ext;
if (ext && fs.existsSync(filename)) return ext;
const files = fs.readdirSync(path.dirname(filenameNor));
const name = path.basename(filenameNor);
return path.join(path.dirname(filenameNor), files.find((iFile) => {
const foundFile = files.find((iFile) => {
if (noExtension(iFile) == name) {
return true;
}
}));
});
if (foundFile === undefined) return filename;
return path.join(path.dirname(filenameNor), foundFile);
}

@@ -197,0 +201,0 @@

{
"name": "jsdoc-tsimport-plugin",
"version": "1.0.3",
"version": "1.0.4",
"description": "A JSDoc plugin to support the typescript module import syntax.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -0,0 +0,0 @@ # jsdoc-tsimport-plugin

Sorry, the diff of this file is not supported yet

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