1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 04:10:04 +02:00

update modules

This commit is contained in:
s2
2020-07-20 16:16:07 +02:00
parent 783511ce12
commit 2b23424b86
785 changed files with 91905 additions and 56057 deletions

View File

@@ -29,9 +29,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
'use strict';
var net = require('net');
var urlParse = require('url').parse;
var util = require('util');
var ipRegex = require('ip-regex')({ exact: true });
var pubsuffix = require('./pubsuffix-psl');
var Store = require('./store').Store;
var MemoryCookieStore = require('./memstore').MemoryCookieStore;
@@ -320,7 +320,7 @@ function domainMatch(str, domStr, canonicalize) {
/* "All of the following [three] conditions hold:" (order adjusted from the RFC) */
/* "* The string is a host name (i.e., not an IP address)." */
if (net.isIP(str)) {
if (ipRegex.test(str)) {
return false;
}
@@ -1007,11 +1007,17 @@ CookieJar.prototype.setCookie = function(cookie, url, options, cb) {
}
// S5.3 step 1
if (!(cookie instanceof Cookie)) {
if (typeof(cookie) === 'string' || cookie instanceof String) {
cookie = Cookie.parse(cookie, { loose: loose });
if (!cookie) {
err = new Error("Cookie failed to parse");
return cb(options.ignoreError ? null : err);
}
}
if (!cookie) {
err = new Error("Cookie failed to parse");
else if (!(cookie instanceof Cookie)) {
// If you're seeing this error, and are passing in a Cookie object,
// it *might* be a Cookie object from another loaded version of tough-cookie.
err = new Error("First argument to setCookie must be a Cookie object or string");
return cb(options.ignoreError ? null : err);
}

View File

@@ -1,2 +1,2 @@
// generated by genversion
module.exports = '2.5.0'
module.exports = '3.0.1'