New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@abmao/forb

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abmao/forb - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

index.d.ts

@@ -5,2 +5,2 @@ export type packagesDir = {

}
export declare function getPackagesDir (packagesPath: string | string[] = 'packages/*'): Promise<packagesDir>
export declare function getPackagesDir (packagesPath: string | string[]): Promise<packagesDir>

@@ -1,14 +0,8 @@

import glob from '@abmao/glob'
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})
}
})
})
import { globby } from 'globby'
export async function getPackagesDir(packagesPath) {
const values = await globby(packagesPath)
const regExp = new RegExp('\/package\\.json$')
const filesPath = values.filter(item => regExp.test(item))
const dirs = filesPath.map(item => item.replace(regExp, ''))
return { dirs, filesPath }
}
{
"name": "@abmao/forb",
"version": "1.0.3",
"version": "1.0.4",
"description": "Get the directory path of `packages` and `packages.json` path",

@@ -29,4 +29,4 @@ "main": "index.js",

"dependencies": {
"@abmao/glob": "^0.0.1"
"globby": "^13.1.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc