Comparing version 0.5.4 to 0.5.5
{ | ||
"name": "uvu", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"repository": "lukeed/uvu", | ||
@@ -51,3 +51,2 @@ "description": "uvu is an extremely fast and lightweight test runner for Node.js and the browser", | ||
"diff": "src/diff.js", | ||
"parse": "src/parse.js", | ||
"assert": "src/assert.js", | ||
@@ -54,0 +53,0 @@ "default": "src/index.js" |
@@ -0,1 +1,2 @@ | ||
// @ts-check | ||
const { readdir, stat } = require('fs'); | ||
@@ -9,7 +10,2 @@ const { resolve, join } = require('path'); | ||
function exists(dep) { | ||
try { return require.resolve(dep) } | ||
catch (err) { return false } | ||
} | ||
async function parse(dir, pattern, opts = {}) { | ||
@@ -26,6 +22,4 @@ if (pattern) pattern = toRegex(pattern); | ||
requires.forEach(name => { | ||
let tmp = exists(name); | ||
if (tmp) return require(tmp); | ||
if (tmp = exists(resolve(name))) return require(tmp); | ||
throw new Error(`Cannot find module '${name}'`); | ||
try { return require(name) } | ||
catch (e) { throw new Error(`Cannot find module "${name}"`) } | ||
}); | ||
@@ -58,2 +52,2 @@ | ||
exports.parse = parse; | ||
exports.parse = parse; |
Sorry, the diff of this file is not supported yet
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7
47620
1128