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

linkinator

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkinator - npm Package Compare versions

Comparing version 2.13.4 to 2.13.5

2

build/src/options.js

@@ -101,3 +101,3 @@ "use strict";

const pathParts = options.path[0].split(path.sep);
options.path = [path.sep + pathParts[pathParts.length - 1]];
options.path = [path.join('.', pathParts[pathParts.length - 1])];
options.serverRoot =

@@ -104,0 +104,0 @@ pathParts.slice(0, pathParts.length - 1).join(path.sep) || '.';

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

const mime = require("mime");
const url_1 = require("url");
const escape = require("escape-html");

@@ -33,6 +34,7 @@ const enableDestroy = require("server-destroy");

async function handleRequest(req, res, root, options) {
var _a, _b, _c;
const pathParts = ((_a = req.url) === null || _a === void 0 ? void 0 : _a.split('/')) || [];
var _a;
const url = new url_1.URL(req.url || '/', `http://localhost:${options.port}`);
const pathParts = url.pathname.split('/').filter(x => !!x);
const originalPath = path.join(root, ...pathParts);
if ((_b = req.url) === null || _b === void 0 ? void 0 : _b.endsWith('/')) {
if (url.pathname.endsWith('/')) {
pathParts.push('index.html');

@@ -69,3 +71,3 @@ }

let mimeType = mime.getType(localPath);
const isMarkdown = (_c = req.url) === null || _c === void 0 ? void 0 : _c.toLocaleLowerCase().endsWith('.md');
const isMarkdown = (_a = req.url) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase().endsWith('.md');
if (isMarkdown && options.markdown) {

@@ -72,0 +74,0 @@ data = marked(data, { gfm: true });

{
"name": "linkinator",
"description": "Find broken links, missing images, etc in your HTML. Scurry around your site and find all those broken links.",
"version": "2.13.4",
"version": "2.13.5",
"license": "MIT",

@@ -38,3 +38,3 @@ "repository": "JustinBeckwith/linkinator",

"@types/chai": "^4.2.7",
"@types/cheerio": "0.22.23",
"@types/cheerio": "0.22.24",
"@types/escape-html": "^1.0.0",

@@ -41,0 +41,0 @@ "@types/glob": "^7.1.3",

Sorry, the diff of this file is not supported yet

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