@babel/helper-fixtures
Advanced tools
Comparing version 7.6.0 to 7.6.2
@@ -20,22 +20,2 @@ "use strict"; | ||
function _trimEnd() { | ||
const data = _interopRequireDefault(require("lodash/trimEnd")); | ||
_trimEnd = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _tryResolve() { | ||
const data = _interopRequireDefault(require("try-resolve")); | ||
_tryResolve = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _clone() { | ||
@@ -100,2 +80,10 @@ const data = _interopRequireDefault(require("lodash/clone")); | ||
function tryResolve(module) { | ||
try { | ||
return require.resolve(module); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
function assertDirectory(loc) { | ||
@@ -139,3 +127,3 @@ if (!_fs().default.statSync(loc).isDirectory()) { | ||
let rootOpts = {}; | ||
const rootOptsLoc = (0, _tryResolve().default)(entryLoc + "/options"); | ||
const rootOptsLoc = tryResolve(entryLoc + "/options"); | ||
if (rootOptsLoc) rootOpts = require(rootOptsLoc); | ||
@@ -153,3 +141,3 @@ | ||
suites.push(suite); | ||
const suiteOptsLoc = (0, _tryResolve().default)(suite.filename + "/options"); | ||
const suiteOptsLoc = tryResolve(suite.filename + "/options"); | ||
if (suiteOptsLoc) suite.options = require(suiteOptsLoc); | ||
@@ -198,3 +186,3 @@ | ||
const taskOpts = (0, _cloneDeep().default)(suite.options); | ||
const taskOptsLoc = (0, _tryResolve().default)(taskDir + "/options"); | ||
const taskOptsLoc = tryResolve(taskDir + "/options"); | ||
if (taskOptsLoc) (0, _extend().default)(taskOpts, require(taskOptsLoc)); | ||
@@ -323,3 +311,4 @@ const test = { | ||
if (_fs().default.existsSync(filename)) { | ||
let file = (0, _trimEnd().default)(_fs().default.readFileSync(filename, "utf8")); | ||
let file = _fs().default.readFileSync(filename, "utf8").trimRight(); | ||
file = file.replace(/\r\n/g, "\n"); | ||
@@ -326,0 +315,0 @@ return file; |
{ | ||
"name": "@babel/helper-fixtures", | ||
"version": "7.6.0", | ||
"version": "7.6.2", | ||
"description": "Helper function to support fixtures", | ||
@@ -14,6 +14,5 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
"lodash": "^4.17.13", | ||
"semver": "^5.3.0", | ||
"try-resolve": "^1.0.0" | ||
"semver": "^5.3.0" | ||
}, | ||
"gitHead": "cbd5a26e57758e3f748174ff84aa570e8780e85d" | ||
"gitHead": "b9cb4af953afb1a5aeed9b18526192ab15bb45c1" | ||
} |
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
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
2
10208
239
6
- Removedtry-resolve@^1.0.0
- Removedtry-resolve@1.0.1(transitive)