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.9.0 to 2.10.0

1

build/src/cli.js

@@ -183,2 +183,3 @@ #!/usr/bin/env node

logger.error(` ${state} ${chalk.gray(link.url)}`);
logger.debug(JSON.stringify(link.failureDetails, null, 2));
break;

@@ -185,0 +186,0 @@ case index_1.LinkState.OK:

@@ -26,2 +26,3 @@ /// <reference types="node" />

parent?: string;
failureDetails?: {}[];
}

@@ -28,0 +29,0 @@ export interface CrawlResult {

15

build/src/index.js

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

const events_1 = require("events");
const gaxios = require("gaxios");
const gaxios_1 = require("gaxios");
const http = require("http");

@@ -259,4 +259,5 @@ const enableDestroy = require("server-destroy");

let res = undefined;
const failures = [];
try {
res = await gaxios.request({
res = await gaxios_1.request({
method: opts.crawl ? 'GET' : 'HEAD',

@@ -271,3 +272,3 @@ url: opts.url.href,

if (res.status === 405) {
res = await gaxios.request({
res = await gaxios_1.request({
method: 'GET',

@@ -286,2 +287,3 @@ url: opts.url.href,

// for this reason, we also try doing a GET below to see if the link is valid
failures.push(err);
}

@@ -292,3 +294,3 @@ try {

!opts.crawl) {
res = await gaxios.request({
res = await gaxios_1.request({
method: 'GET',

@@ -304,2 +306,3 @@ url: opts.url.href,

catch (ex) {
failures.push(ex);
// catch the next failure

@@ -316,2 +319,5 @@ }

}
else {
failures.push(res);
}
const result = {

@@ -322,2 +328,3 @@ url: opts.url.href,

parent: opts.parent,
failureDetails: failures,
};

@@ -324,0 +331,0 @@ opts.results.push(result);

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

@@ -6,0 +6,0 @@ "repository": "JustinBeckwith/linkinator",

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