@after-work.js/utils
Advanced tools
Comparing version 6.0.5 to 6.0.6
{ | ||
"name": "@after-work.js/utils", | ||
"version": "6.0.5", | ||
"version": "6.0.6", | ||
"publishConfig": { | ||
@@ -27,8 +27,8 @@ "access": "public" | ||
"debug": "4.1.1", | ||
"globby": "9.1.0", | ||
"import-cwd": "2.1.0", | ||
"globby": "10.0.1", | ||
"import-cwd": "3.0.0", | ||
"minimatch": "3.0.4", | ||
"npmlog": "4.1.2" | ||
}, | ||
"gitHead": "3249c12780c2f1cd6616098e175d215fd1633b70" | ||
"gitHead": "119ecef9549fd12516c1abc6af434bdb3a23ebc4" | ||
} |
@@ -48,3 +48,3 @@ /* eslint max-len: 0, import/no-dynamic-require: 0, global-require: 0 */ | ||
packagesPath.forEach((root) => { | ||
packagesPath.forEach(root => { | ||
const { name } = importCwd(`./${root}/package.json`); | ||
@@ -66,3 +66,3 @@ const hasTests = globby.sync(`${root}/**/${testExt}`).length > 0; | ||
const getTestGlob = (argv) => { | ||
const getTestGlob = argv => { | ||
const { testExt, scope } = argv; | ||
@@ -83,3 +83,3 @@ const packagesMap = getPackages(argv); | ||
const getSrcGlob = (argv) => { | ||
const getSrcGlob = argv => { | ||
const { srcExt, scope } = argv; | ||
@@ -149,3 +149,3 @@ const packagesMap = getPackages(argv); | ||
const addDefaults = (argv) => { | ||
const addDefaults = argv => { | ||
// Re-evaluate if it's the default values e.g `testExt` or `srcExt` could be changed | ||
@@ -167,2 +167,14 @@ if (argv.glob === TEST_GLOB) { | ||
const safeGetModule = name => { | ||
let found = importCwd.silent(name); | ||
if (!found) { | ||
try { | ||
found = require(name); | ||
} catch (err) { | ||
found = null; | ||
} | ||
} | ||
return found; | ||
}; | ||
const utils = { | ||
@@ -228,13 +240,2 @@ addDefaults, | ||
}, | ||
safeGetModule(name) { | ||
let found = importCwd.silent(name); | ||
if (!found) { | ||
try { | ||
found = require(name); | ||
} catch (err) { | ||
found = null; | ||
} | ||
} | ||
return found; | ||
}, | ||
coerceBabel(opt) { | ||
@@ -244,5 +245,5 @@ if (opt.enable && opt.core && typeof opt.core === 'string') { | ||
} else if (opt.enable && !opt.core) { | ||
let core = utils.safeGetModule('@babel/core'); | ||
let core = safeGetModule('@babel/core'); | ||
if (!core) { | ||
core = utils.safeGetModule('babel-core'); | ||
core = safeGetModule('babel-core'); | ||
if (!core) { | ||
@@ -255,3 +256,3 @@ throw new Error('Can not get babel core module'); | ||
if (opt.enable && typeof opt.babelPluginIstanbul === 'string') { | ||
const babelPluginIstanbul = utils.safeGetModule(opt.babelPluginIstanbul); | ||
const babelPluginIstanbul = safeGetModule(opt.babelPluginIstanbul); | ||
opt.babelPluginIstanbul = babelPluginIstanbul | ||
@@ -262,3 +263,3 @@ ? babelPluginIstanbul.default | ||
if (opt.enable && typeof opt.typescript === 'string') { | ||
opt.typescript = utils.safeGetModule(opt.typescript); | ||
opt.typescript = safeGetModule(opt.typescript); | ||
} | ||
@@ -274,3 +275,3 @@ return opt; | ||
.filter(c => c !== undefined) | ||
.map((c) => { | ||
.map(c => { | ||
const parts = c.split(':'); | ||
@@ -335,5 +336,5 @@ const columnno = parts.pop(); | ||
const deps = this.getDependencies(files, file); | ||
const walk = (currentDeps) => { | ||
const walk = currentDeps => { | ||
all = all.concat(currentDeps); | ||
currentDeps.forEach((d) => { | ||
currentDeps.forEach(d => { | ||
const childDeps = this.getDependencies(files, d); | ||
@@ -340,0 +341,0 @@ walk(childDeps, files, d); |
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
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
11449
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobby@10.0.1(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedimport-cwd@3.0.0(transitive)
+ Addedimport-from@3.0.0(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedresolve-from@5.0.0(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removed@mrmlnc/readdir-enhanced@2.2.1(transitive)
- Removed@nodelib/fs.stat@1.1.3(transitive)
- Removedarr-diff@4.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-union@1.0.2(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedarray-unique@0.3.2(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedatob@2.1.2(transitive)
- Removedbase@0.11.2(transitive)
- Removedbraces@2.3.2(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedcall-me-maybe@1.0.2(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removeddir-glob@2.2.2(transitive)
- Removedexpand-brackets@2.1.4(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@2.0.4(transitive)
- Removedfast-glob@2.2.7(transitive)
- Removedfill-range@4.0.0(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-value@2.0.6(transitive)
- Removedglob-parent@3.1.0(transitive)
- Removedglob-to-regexp@0.3.0(transitive)
- Removedglobby@9.1.0(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedignore@4.0.6(transitive)
- Removedimport-cwd@2.1.0(transitive)
- Removedimport-from@2.1.0(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-glob@3.1.0(transitive)
- Removedis-number@3.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmicromatch@3.1.10(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removedms@2.0.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedpath-dirname@1.0.2(transitive)
- Removedpath-type@3.0.0(transitive)
- Removedpify@3.0.04.0.1(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-from@3.0.0(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedset-value@2.0.1(transitive)
- Removedslash@2.0.0(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedunion-value@1.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
Updatedglobby@10.0.1
Updatedimport-cwd@3.0.0