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

check-html-links

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-html-links - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

7

CHANGELOG.md
# check-html-links
## 0.1.1
### Patch Changes
- eb74110: Add info about how many files and links will be checked
## 0.1.0
### Minor Changes
- cd22231: Initial release

5

dist-types/src/validateFolder.d.ts

@@ -5,3 +5,6 @@ /**

*/
export function validateFiles(files: string[], rootDir: string): Promise<import("../types/main.js").Error[]>;
export function validateFiles(files: string[], rootDir: string): Promise<{
errors: import("../types/main.js").Error[];
numberLinks: number;
}>;
/**

@@ -8,0 +11,0 @@ * @param {string} inRootDir

2

package.json
{
"name": "check-html-links",
"version": "0.1.0",
"version": "0.1.1",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -19,3 +19,3 @@ # Check Html Links

## Comparision
## Comparison

@@ -22,0 +22,0 @@ Checking the output of [11ty-website](https://github.com/11ty/11ty-website) with 13 missing reference targets (used by 516 links) while checking 501 files. (on January 17, 2021)

@@ -16,3 +16,13 @@ #!/usr/bin/env node

const files = await listFiles('**/*.html', rootDir);
const errors = await validateFiles(files, rootDir);
const filesOutput =
files.length == 0
? '🧐 No files to check. Did you select the correct folder?'
: `🔥 Found a total of ${chalk.green.bold(files.length)} files to check!`;
console.log(filesOutput);
const { errors, numberLinks } = await validateFiles(files, rootDir);
console.log(`🔗 Found a total of ${chalk.green.bold(numberLinks)} links to validate!\n`);
const performance = process.hrtime(performanceStart);

@@ -19,0 +29,0 @@ if (errors.length > 0) {

@@ -270,4 +270,6 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */

idCache = new Map();
let numberLinks = 0;
for (const htmlFilePath of files) {
const { links } = await extractReferences(htmlFilePath);
numberLinks += links.length;
await resolveLinks(links, { htmlFilePath, rootDir });

@@ -277,3 +279,3 @@ }

return errors;
return { errors: errors, numberLinks: numberLinks };
}

@@ -287,4 +289,4 @@

const files = await listFiles('**/*.html', rootDir);
const errors = await validateFiles(files, rootDir);
const { errors } = await validateFiles(files, rootDir);
return errors;
}

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