Socket
Socket
Sign inDemoInstall

link-check

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

link-check - npm Package Compare versions

Comparing version 4.5.2 to 4.5.3

.github/workflows/ci.yml

4

CHANGELOG.md
# Changes
## Version 4.5.3
* #76 encode urls to prevent unicode chars to fail
## Version 4.5.2

@@ -4,0 +8,0 @@

2

lib/proto/http.js

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

const options = {
uri: link,
uri: encodeURI(link),
headers: {

@@ -33,0 +33,0 @@ // override 'User-Agent' (some sites return `401` when the user-agent isn't a web browser)

{
"name": "link-check",
"version": "4.5.2",
"version": "4.5.3",
"description": "checks whether a hyperlink is alive (200 OK) or dead",

@@ -40,3 +40,3 @@ "main": "index.js",

"jshint": "^2.12.0",
"mocha": "^8.1.3"
"mocha": "^8.2.1"
},

@@ -43,0 +43,0 @@ "jshintConfig": {

@@ -0,1 +1,3 @@

![Test library workflow status](https://github.com/tcort/link-check/workflows/Test%20library/badge.svg)
# link-check

@@ -2,0 +4,0 @@

@@ -123,2 +123,6 @@ 'use strict';

app.get(encodeURI('/url_with_unicode–'), function (req, res) {
res.sendStatus(200);
});
const server = http.createServer(app);

@@ -461,2 +465,13 @@ server.listen(0 /* random open port */, 'localhost', function serverListen(err) {

it('should handle unicode chars in URLs', function(done) {
laterCustomRetryCounter = 0;
linkCheck(baseUrl + '/url_with_unicode–', function(err, result) {
expect(err).to.be(null);
expect(result.err).to.be(null);
expect(result.status).to.be('alive');
expect(result.statusCode).to.be(200);
done();
});
});
});
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