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

watchpack

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watchpack - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

18

lib/watchpack.js

@@ -26,6 +26,8 @@ /*

const stringToRegexp = ignored => {
if (ignored.length === 0) {
return;
}
const source = globToRegExp(ignored, { globstar: true, extended: true })
.source;
const matchingStart = source.slice(0, source.length - 1) + "(?:$|\\/)";
return matchingStart;
return source.slice(0, source.length - 1) + "(?:$|\\/)";
};

@@ -35,6 +37,14 @@

if (Array.isArray(ignored)) {
const regexp = new RegExp(ignored.map(i => stringToRegexp(i)).join("|"));
const stringRegexps = ignored.map(i => stringToRegexp(i)).filter(Boolean);
if (stringRegexps.length === 0) {
return () => false;
}
const regexp = new RegExp(stringRegexps.join("|"));
return x => regexp.test(x.replace(/\\/g, "/"));
} else if (typeof ignored === "string") {
const regexp = new RegExp(stringToRegexp(ignored));
const stringRegexp = stringToRegexp(ignored);
if (!stringRegexp) {
return () => false;
}
const regexp = new RegExp(stringRegexp);
return x => regexp.test(x.replace(/\\/g, "/"));

@@ -41,0 +51,0 @@ } else if (ignored instanceof RegExp) {

{
"name": "watchpack",
"version": "2.4.1",
"version": "2.4.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/watchpack.js",

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