@abmao/forb
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -5,2 +5,2 @@ export type packagesDir = { | ||
} | ||
export declare function getPackagesDir (packagesPath: string | string[], ignoreFiles: string | string[]): Promise<packagesDir> | ||
export declare function getPackagesDir (packagesPath: string | string[], ignoreFiles?: string | string[]): Promise<packagesDir> |
10
index.js
@@ -10,5 +10,5 @@ import { globby } from 'globby' | ||
const packageJsonPath = Array.isArray(packagesPath) ? normalizePatterns(packagesPath) : normalizePatterns([packagesPath]) | ||
const values = await globby(packageJsonPath, { | ||
const values = sortFilesName(await globby(packageJsonPath, { | ||
ignoreFiles | ||
}) | ||
})) | ||
const regExp = new RegExp('\/package\\.json$') | ||
@@ -36,2 +36,6 @@ const filesPath = values.filter(item => regExp.test(item)) | ||
return normalizedPatterns | ||
} | ||
} | ||
function sortFilesName (files) { | ||
return files.slice().sort((a, b) => a.localeCompare(b)) | ||
} |
{ | ||
"name": "@abmao/forb", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Get the directory path of `packages` and `packages.json` path", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4023
42