Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,4 @@
**/__mocks__/**
**/__tests__/**
src
yarn.lock

View File

@@ -0,0 +1,35 @@
'use strict'; /**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
var path = require('path');
var escapePathForRegex = function 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));
};
var escapeStrForRegex = function escapeStrForRegex(string) {return (
string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'));};
var replacePathSepForRegex = function replacePathSepForRegex(string) {
if (path.sep === '\\') {
return string.replace(/(\/|\\(?!\.))/g, '\\\\');
}
return string;
};
module.exports = {
escapePathForRegex: escapePathForRegex,
escapeStrForRegex: escapeStrForRegex,
replacePathSepForRegex: replacePathSepForRegex };

View File

@@ -0,0 +1,35 @@
'use strict'; /**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
const path = require('path');
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));
};
const escapeStrForRegex = string =>
string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&');
const replacePathSepForRegex = string => {
if (path.sep === '\\') {
return string.replace(/(\/|\\(?!\.))/g, '\\\\');
}
return string;
};
module.exports = {
escapePathForRegex,
escapeStrForRegex,
replacePathSepForRegex };

View File

@@ -0,0 +1,47 @@
{
"_args": [
[
"jest-regex-util@20.0.3",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "jest-regex-util@20.0.3",
"_id": "jest-regex-util@20.0.3",
"_inBundle": false,
"_integrity": "sha1-hburXRM+RGJbGfr4xqpRItCF12I=",
"_location": "/react-scripts/jest-regex-util",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "jest-regex-util@20.0.3",
"name": "jest-regex-util",
"escapedName": "jest-regex-util",
"rawSpec": "20.0.3",
"saveSpec": null,
"fetchSpec": "20.0.3"
},
"_requiredBy": [
"/react-scripts/jest-config",
"/react-scripts/jest-matchers",
"/react-scripts/jest-resolve-dependencies",
"/react-scripts/jest-runtime",
"/react-scripts/jest/jest-cli"
],
"_resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-20.0.3.tgz",
"_spec": "20.0.3",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"browser": "build-es5/index.js",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"homepage": "https://github.com/facebook/jest#readme",
"license": "BSD-3-Clause",
"main": "build/index.js",
"name": "jest-regex-util",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git"
},
"version": "20.0.3"
}