aboutsummaryrefslogtreecommitdiff
path: root/node_modules/jest-regex-util
diff options
context:
space:
mode:
authorJoel Kronqvist <work.joelkronqvist@pm.me>2022-03-11 20:46:06 +0200
committerJoel Kronqvist <work.joelkronqvist@pm.me>2022-03-11 20:46:06 +0200
commit080c5819d87b933816d724a83f3bf4f1686770a7 (patch)
tree4a2ccc68b27edf7d4cbc586c932cc7542b655e19 /node_modules/jest-regex-util
parent5ac7049a9d30733165cc212dee308163c2a14644 (diff)
parentd003b82235a9329f912522a2f70aa950dfce4998 (diff)
downloadLYLLRuoka-080c5819d87b933816d724a83f3bf4f1686770a7.tar.gz
LYLLRuoka-080c5819d87b933816d724a83f3bf4f1686770a7.zip
Merge branch 'master' of https://github.com/JoelHMikael/FoodJS
Updating remote changes
Diffstat (limited to 'node_modules/jest-regex-util')
-rw-r--r--node_modules/jest-regex-util/LICENSE21
-rw-r--r--node_modules/jest-regex-util/build/index.d.ts10
-rw-r--r--node_modules/jest-regex-util/build/index.js48
-rw-r--r--node_modules/jest-regex-util/package.json29
4 files changed, 108 insertions, 0 deletions
diff --git a/node_modules/jest-regex-util/LICENSE b/node_modules/jest-regex-util/LICENSE
new file mode 100644
index 0000000..b96dcb0
--- /dev/null
+++ b/node_modules/jest-regex-util/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) Facebook, Inc. and its affiliates.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/jest-regex-util/build/index.d.ts b/node_modules/jest-regex-util/build/index.d.ts
new file mode 100644
index 0000000..a15e9d4
--- /dev/null
+++ b/node_modules/jest-regex-util/build/index.d.ts
@@ -0,0 +1,10 @@
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+export declare const escapePathForRegex: (dir: string) => string;
+export declare const escapeStrForRegex: (string: string) => string;
+export declare const replacePathSepForRegex: (string: string) => string;
diff --git a/node_modules/jest-regex-util/build/index.js b/node_modules/jest-regex-util/build/index.js
new file mode 100644
index 0000000..de70a08
--- /dev/null
+++ b/node_modules/jest-regex-util/build/index.js
@@ -0,0 +1,48 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', {
+ value: true
+});
+exports.replacePathSepForRegex =
+ exports.escapeStrForRegex =
+ exports.escapePathForRegex =
+ void 0;
+
+var _path = require('path');
+
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+const escapePathForRegex = dir => {
+ if (_path.sep === '\\') {
+ // Replace "\" with "/" so it's not escaped by escapeStrForRegex.
+ // replacePathSepForRegex will convert it back.
+ dir = dir.replace(/\\/g, '/');
+ }
+
+ return replacePathSepForRegex(escapeStrForRegex(dir));
+};
+
+exports.escapePathForRegex = escapePathForRegex;
+
+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;
+};
+
+exports.replacePathSepForRegex = replacePathSepForRegex;
diff --git a/node_modules/jest-regex-util/package.json b/node_modules/jest-regex-util/package.json
new file mode 100644
index 0000000..b19b990
--- /dev/null
+++ b/node_modules/jest-regex-util/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "jest-regex-util",
+ "version": "27.5.1",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/facebook/jest.git",
+ "directory": "packages/jest-regex-util"
+ },
+ "devDependencies": {
+ "@types/node": "*"
+ },
+ "engines": {
+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+ },
+ "license": "MIT",
+ "main": "./build/index.js",
+ "types": "./build/index.d.ts",
+ "exports": {
+ ".": {
+ "types": "./build/index.d.ts",
+ "default": "./build/index.js"
+ },
+ "./package.json": "./package.json"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850"
+}