jest-regex-util
Advanced tools
Comparing version 29.6.3 to 30.0.0-alpha.0
@@ -1,11 +0,22 @@ | ||
'use strict'; | ||
/*! | ||
* /** | ||
* * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* * | ||
* * This source code is licensed under the MIT license found in the | ||
* * LICENSE file in the root directory of this source tree. | ||
* * / | ||
*/ | ||
/******/ (() => { // webpackBootstrap | ||
/******/ "use strict"; | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports). | ||
(() => { | ||
var exports = __webpack_exports__; | ||
Object.defineProperty(exports, '__esModule', { | ||
Object.defineProperty(exports, "__esModule", ({ | ||
value: true | ||
}); | ||
exports.replacePathSepForRegex = | ||
exports.escapeStrForRegex = | ||
exports.escapePathForRegex = | ||
void 0; | ||
var _path = require('path'); | ||
})); | ||
exports.replacePathSepForRegex = exports.escapeStrForRegex = exports.escapePathForRegex = void 0; | ||
var _path = require("path"); | ||
/** | ||
@@ -28,11 +39,7 @@ * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
exports.escapePathForRegex = escapePathForRegex; | ||
const escapeStrForRegex = string => | ||
string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'); | ||
const escapeStrForRegex = string => string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'); | ||
exports.escapeStrForRegex = escapeStrForRegex; | ||
const replacePathSepForRegex = string => { | ||
if (_path.sep === '\\') { | ||
return string.replace( | ||
/(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g, | ||
(_match, _, p2) => (p2 && p2 !== '\\' ? `${p2}\\\\` : '\\\\') | ||
); | ||
return string.replace(/(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g, (_match, _, p2) => p2 && p2 !== '\\' ? `${p2}\\\\` : '\\\\'); | ||
} | ||
@@ -42,1 +49,6 @@ return string; | ||
exports.replacePathSepForRegex = replacePathSepForRegex; | ||
})(); | ||
module.exports = __webpack_exports__; | ||
/******/ })() | ||
; |
{ | ||
"name": "jest-regex-util", | ||
"version": "29.6.3", | ||
"version": "30.0.0-alpha.0", | ||
"repository": { | ||
@@ -13,3 +13,3 @@ "type": "git", | ||
"engines": { | ||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0" | ||
"node": "^16.10.0 || ^18.12.0 || >=20.0.0" | ||
}, | ||
@@ -22,2 +22,4 @@ "license": "MIT", | ||
"types": "./build/index.d.ts", | ||
"require": "./build/index.js", | ||
"import": "./build/index.mjs", | ||
"default": "./build/index.js" | ||
@@ -30,3 +32,3 @@ }, | ||
}, | ||
"gitHead": "fb7d95c8af6e0d65a8b65348433d8a0ea0725b5b" | ||
"gitHead": "780ae28333df4d188b2ef78bd19d4ed5bc53562d" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4312
5
68
2