jest-util
Advanced tools
Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3
@@ -87,3 +87,3 @@ /*! | ||
// absolute paths passed on command line should stay same | ||
if (p.match(/^\//)) { | ||
if (/^\//.test(p)) { | ||
return p; | ||
@@ -93,3 +93,3 @@ } | ||
// explicit relative paths should resolve against rootDir | ||
if (p.match(/^\.\//)) { | ||
if (/^\.\//.test(p)) { | ||
return p.replace(/^\.\//, rootDirRegex); | ||
@@ -160,3 +160,3 @@ } | ||
if (stream.isTTY) { | ||
stream.write('\x1b[999D\x1b[K'); | ||
stream.write('\u001B[999D\u001B[K'); | ||
} | ||
@@ -231,5 +231,5 @@ } | ||
}); | ||
} catch (e) { | ||
if (e.code !== 'EEXIST') { | ||
throw e; | ||
} catch (error) { | ||
if (error.code !== 'EEXIST') { | ||
throw error; | ||
} | ||
@@ -327,7 +327,7 @@ } | ||
newProcess[Symbol.toStringTag] = 'process'; | ||
} catch (e) { | ||
} catch (error) { | ||
// Make sure it's actually set instead of potentially ignoring errors | ||
if (newProcess[Symbol.toStringTag] !== 'process') { | ||
e.message = `Unable to set toStringTag on process. Please open up an issue at https://github.com/jestjs/jest\n\n${e.message}`; | ||
throw e; | ||
error.message = `Unable to set toStringTag on process. Please open up an issue at https://github.com/jestjs/jest\n\n${error.message}`; | ||
throw error; | ||
} | ||
@@ -372,6 +372,8 @@ } | ||
const EMPTY = new Set(); | ||
function deepCyclicCopy(value, options = { | ||
blacklist: EMPTY, | ||
keepPrototype: false | ||
}, cycles = new WeakMap()) { | ||
function deepCyclicCopy(value, options, cycles = new WeakMap()) { | ||
options = { | ||
blacklist: EMPTY, | ||
keepPrototype: false, | ||
...options | ||
}; | ||
if (typeof value !== 'object' || value === null || Buffer.isBuffer(value)) { | ||
@@ -397,3 +399,3 @@ return value; | ||
const descriptor = descriptors[key]; | ||
if (typeof descriptor.value !== 'undefined') { | ||
if (descriptor.value !== undefined) { | ||
descriptor.value = deepCyclicCopy(descriptor.value, { | ||
@@ -517,7 +519,7 @@ blacklist: EMPTY, | ||
let negatives = 0; | ||
for (let i = 0; i < matchers.length; i++) { | ||
for (const matcher of matchers) { | ||
const { | ||
isMatch, | ||
negated | ||
} = matchers[i]; | ||
} = matcher; | ||
if (negated) { | ||
@@ -845,3 +847,3 @@ negatives++; | ||
function replacePathSepForGlob(path) { | ||
return path.replace(/\\(?![{}()+?.^$])/g, '/'); | ||
return path.replaceAll(/\\(?![$()+.?^{}])/g, '/'); | ||
} | ||
@@ -968,3 +970,3 @@ | ||
}; | ||
const CLEAR = exports.CLEAR = isWindows ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H'; | ||
const CLEAR = exports.CLEAR = isWindows ? '\u001B[2J\u001B[0f' : '\u001B[2J\u001B[3J\u001B[H'; | ||
@@ -971,0 +973,0 @@ /***/ }), |
{ | ||
"name": "jest-util", | ||
"version": "30.0.0-alpha.2", | ||
"version": "30.0.0-alpha.3", | ||
"repository": { | ||
@@ -22,3 +22,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "30.0.0-alpha.2", | ||
"@jest/types": "30.0.0-alpha.3", | ||
"@types/node": "*", | ||
@@ -40,3 +40,3 @@ "chalk": "^4.0.0", | ||
}, | ||
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4" | ||
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da" | ||
} |
48215
1190
+ Added@jest/schemas@30.0.0-alpha.3(transitive)
+ Added@jest/types@30.0.0-alpha.3(transitive)
+ Added@sinclair/typebox@0.32.27(transitive)
+ Added@types/node@20.12.7(transitive)
- Removed@jest/schemas@30.0.0-alpha.2(transitive)
- Removed@jest/types@30.0.0-alpha.2(transitive)
- Removed@sinclair/typebox@0.31.28(transitive)
- Removed@types/node@20.12.8(transitive)
Updated@jest/types@30.0.0-alpha.3