@semrel-extra/topo
Advanced tools
Comparing version 1.13.1 to 1.14.0
@@ -0,1 +1,6 @@ | ||
## [1.14.0](https://github.com/semrel-extra/topo/compare/v1.13.1...v1.14.0) (2023-08-14) | ||
### Features | ||
* feat: export `iterateDeps` helper ([0eed98f](https://github.com/semrel-extra/topo/commit/0eed98fec072db6dcb8fb7cc050c2c2df2cb2255)) | ||
## [1.13.1](https://github.com/semrel-extra/topo/compare/v1.13.0...v1.13.1) (2023-08-14) | ||
@@ -2,0 +7,0 @@ |
{ | ||
"name": "@semrel-extra/topo", | ||
"version": "1.13.1", | ||
"description": "Helper to resolve monorepo dependencies graph", | ||
"version": "1.14.0", | ||
"description": "Helpers to assist monorepo dependencies traversals", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
@@ -7,3 +7,3 @@ # @semrel-extra/topo | ||
Helper to resolve monorepo dependencies graph by package workspaces | ||
> Helpers to assist monorepo dependencies traversals | ||
@@ -112,3 +112,23 @@ ## Install | ||
### `iterateDeps()` | ||
Walks through the package dependencies and applies the `cb()` for each. | ||
```ts | ||
const results: any[] = [] | ||
const manifest = { | ||
name: 'foo', | ||
version: '0.0.0', | ||
dependencies: { | ||
bar: '1.0.0' | ||
}, | ||
devDependencies: { | ||
baz: '2.0.0' | ||
} | ||
} | ||
iterateDeps(manifest, ({ name, version, scope, deps }) => { | ||
results.push({ name, version, scope, deps }) | ||
}) | ||
``` | ||
## License | ||
[MIT](./LICENSE) |
import { TTopoResult } from 'toposource'; | ||
import { ITopoOptionsNormalized, IDepEntryEnriched, IPackageEntry, IPackageJson, ITopoOptions, ITopoContext } from './interface'; | ||
import { ITopoOptionsNormalized, IDepEntry, IDepEntryEnriched, IPackageEntry, IPackageJson, IPackageDeps, ITopoOptions, ITopoContext } from './interface'; | ||
export * from './interface'; | ||
@@ -25,1 +25,4 @@ export declare const getPackages: (options: ITopoOptionsNormalized) => Promise<Record<string, IPackageEntry>>; | ||
}) => Promise<void>; | ||
export declare const iterateDeps: (manifest: IPackageJson, cb: (ctx: IDepEntry & { | ||
deps: IPackageDeps; | ||
}) => any, scopes?: string[]) => void; |
Sorry, the diff of this file is not supported yet
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
32391
113
133