jest-util
Advanced tools
Comparing version 12.1.2-alpha.a482b15c to 12.1.3-alpha.6230044c
@@ -13,7 +13,3 @@ /** | ||
const FakeTimers = require('./FakeTimers'); | ||
const JasmineFormatter = require('./JasmineFormatter'); | ||
const formatFailureMessage = require('./formatFailureMessage'); | ||
const installCommonGlobals = require('./installCommonGlobals'); | ||
const fs = require('fs'); | ||
const mkdirp = require('mkdirp'); | ||
@@ -27,3 +23,3 @@ const path = require('path'); | ||
if (path.sep === '\\') { | ||
return string.replace(/(\/|\\)/g, '\\\\');} | ||
return string.replace(/(\/|\\(?!\.))/g, '\\\\');} | ||
@@ -43,8 +39,32 @@ return string;}; | ||
const getPackageRoot = () => { | ||
const cwd = process.cwd(); | ||
// Is the cwd somewhere within an npm package? | ||
let root = cwd; | ||
while (!fs.existsSync(path.join(root, 'package.json'))) { | ||
if (root === '/' || root.match(/^[A-Z]:\\/)) { | ||
root = cwd; | ||
break;} | ||
root = path.resolve(root, '..');} | ||
return root;}; | ||
exports.Console = require('./Console'); | ||
exports.FakeTimers = require('./FakeTimers'); | ||
exports.JasmineFormatter = require('./JasmineFormatter'); | ||
exports.NullConsole = require('./NullConsole'); | ||
exports.createDirectory = createDirectory; | ||
exports.escapeStrForRegex = escapeStrForRegex; | ||
exports.FakeTimers = FakeTimers; | ||
exports.formatFailureMessage = formatFailureMessage; | ||
exports.JasmineFormatter = JasmineFormatter; | ||
exports.installCommonGlobals = installCommonGlobals; | ||
exports.replacePathSepForRegex = replacePathSepForRegex; | ||
exports.formatFailureMessage = require('./formatFailureMessage'); | ||
exports.getPackageRoot = getPackageRoot; | ||
exports.installCommonGlobals = require('./installCommonGlobals'); | ||
exports.replacePathSepForRegex = replacePathSepForRegex; | ||
exports.warnAboutUnrecognizedOptions = | ||
require('./args').warnAboutUnrecognizedOptions; | ||
exports.wrap = require('./args').wrap; |
{ | ||
"name": "jest-util", | ||
"version": "12.1.2-alpha.a482b15c", | ||
"version": "12.1.3-alpha.6230044c", | ||
"repository": { | ||
@@ -15,6 +15,6 @@ "type": "git", | ||
"mkdirp": "^0.5.1", | ||
"jest-mock": "^12.1.2-alpha.a482b15c" | ||
"jest-mock": "^12.1.3-alpha.6230044c" | ||
}, | ||
"devDependencies": { | ||
"jsdom": "^8.3.1" | ||
"jsdom": "^9.2.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "jest": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28489
10
697
1
+ Addedjest-mock@12.1.3-alpha.6230044c(transitive)
- Removedjest-mock@12.1.2-alpha.a482b15c(transitive)