@abmao/forb
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,2 +5,2 @@ export type packagesDir = { | ||
} | ||
export declare function getPackagesDir (packagesPath: string = 'packages/*'): Promise<packagesDir> | ||
export declare function getPackagesDir (packagesPath: string | string[] = 'packages/*'): Promise<packagesDir> |
17
index.js
@@ -1,14 +0,9 @@ | ||
import glob from 'glob' | ||
import {globby} from 'globby' | ||
import { join } from 'path' | ||
export function getPackagesDir(packagesPath = 'packages/*') { | ||
return new Promise((resolve, reject) => { | ||
glob(packagesPath, {}, function (err, matches) { | ||
if (err) { | ||
reject(err) | ||
} else { | ||
const filesPath = matches.map((dir) => join(dir, 'package.json')) | ||
resolve({dirs: matches, filesPath}) | ||
} | ||
}) | ||
}) | ||
return globby(packagesPath) | ||
.then (dirs => { | ||
const filesPath = dirs.map((dir) => join(dir, 'package.json')) | ||
return { dirs, filesPath } | ||
}) | ||
} |
{ | ||
"name": "@abmao/forb", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get the directory path of `packages` and `packages.json` path", | ||
@@ -29,4 +29,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"glob": "^7.2.0" | ||
"globby": "^13.1.1" | ||
} | ||
} |
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
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
2909
13
+ Addedglobby@^13.1.1
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(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@13.2.2(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedslash@4.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removedglob@^7.2.0
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedwrappy@1.0.2(transitive)