Socket
Socket
Sign inDemoInstall

jest-regex-util

Package Overview
Dependencies
Maintainers
6
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-regex-util - npm Package Compare versions

Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3

6

build/index.js

@@ -34,3 +34,3 @@ /*!

// replacePathSepForRegex will convert it back.
dir = dir.replace(/\\/g, '/');
dir = dir.replaceAll('\\', '/');
}

@@ -40,7 +40,7 @@ return replacePathSepForRegex(escapeStrForRegex(dir));

exports.escapePathForRegex = escapePathForRegex;
const escapeStrForRegex = string => string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');
const escapeStrForRegex = string => string.replaceAll(/[$()*+.?[\\\]^{|}]/g, '\\$&');
exports.escapeStrForRegex = escapeStrForRegex;
const replacePathSepForRegex = string => {
if (_path.sep === '\\') {
return string.replace(/(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g, (_match, _, p2) => p2 && p2 !== '\\' ? `${p2}\\\\` : '\\\\');
return string.replaceAll(/(\/|(.)?\\(?![$()*+.?[\\\]^{|}]))/g, (_match, _, p2) => p2 && p2 !== '\\' ? `${p2}\\\\` : '\\\\');
}

@@ -47,0 +47,0 @@ return string;

{
"name": "jest-regex-util",
"version": "30.0.0-alpha.2",
"version": "30.0.0-alpha.3",
"repository": {

@@ -30,3 +30,3 @@ "type": "git",

},
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4"
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da"
}
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