Socket
Socket
Sign inDemoInstall

remark-lint-are-links-valid-alive

Package Overview
Dependencies
109
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.3.0

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

<a name="0.3.0"></a>
# [0.3.0](https://github.com/wemake-services/remark-lint-are-links-valid/compare/remark-lint-are-links-valid-alive@0.2.1...remark-lint-are-links-valid-alive@0.3.0) (2017-12-10)
### Bug Fixes
* skip links for schemes that can't be checked ([6b97bcf](https://github.com/wemake-services/remark-lint-are-links-valid/commit/6b97bcf))
### Features
* **commit:** adds commitizen into scripts ([7cac9d3](https://github.com/wemake-services/remark-lint-are-links-valid/commit/7cac9d3))
<a name="0.2.1"></a>

@@ -8,0 +24,0 @@ ## [0.2.1](https://github.com/wemake-services/remark-lint-are-links-valid/compare/remark-lint-are-links-valid-alive@0.2.0...remark-lint-are-links-valid-alive@0.2.1) (2017-08-07)

10

index.js

@@ -16,4 +16,12 @@ 'use strict';

function findCheckableLinks(ast) {
var ignoredSchemes = ['data:', 'geo:', 'irc:', 'mailto:', 'sms:', 'tel:'];
return remarkLintAreLinksValidCore.findLinks(ast).filter(function (link) {
return ignoredSchemes.indexOf(link.link.protocol) === -1;
});
}
function areLinksAlive(ast, file, options, done) {
var links = remarkLintAreLinksValidCore.findLinks(ast);
var links = findCheckableLinks(ast);
var settings = remarkLintAreLinksValidCore.getSettings(options);

@@ -20,0 +28,0 @@

2

package.json
{
"name": "remark-lint-are-links-valid-alive",
"version": "0.2.1",
"version": "0.3.0",
"description": "Checks if links are still alive",

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

@@ -33,3 +33,5 @@ # remark-lint-are-links-valid-alive

Note, that this plugin will skip [unsupported](https://github.com/wemake-services/remark-lint-are-links-valid/blob/master/packages/alive/src.js#L13) URL schemes.
## Changelog

@@ -36,0 +38,0 @@

@@ -11,4 +11,19 @@ const blc = require('broken-link-checker')

function findCheckableLinks (ast) {
const ignoredSchemes = [
'data:',
'geo:',
'irc:',
'mailto:',
'sms:',
'tel:'
]
return main.findLinks(ast).filter(link => {
return ignoredSchemes.indexOf(link.link.protocol) === -1
})
}
function areLinksAlive (ast, file, options, done) {
const links = main.findLinks(ast)
const links = findCheckableLinks(ast)
const settings = main.getSettings(options)

@@ -15,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc