workspace-tools
Advanced tools
Comparing version 0.31.0 to 0.32.0
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Thu, 06 Apr 2023 19:44:29 GMT", | ||
"date": "Thu, 06 Apr 2023 22:06:19 GMT", | ||
"tag": "workspace-tools_v0.32.0", | ||
"version": "0.32.0", | ||
"comments": { | ||
"minor": [ | ||
{ | ||
"author": "kchau@microsoft.com", | ||
"package": "workspace-tools", | ||
"commit": "2ce8ddc9819094b14fd1cadf7a5b92af3f61d626", | ||
"comment": "making the dep graph generation to be much faster" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Thu, 06 Apr 2023 19:44:34 GMT", | ||
"tag": "workspace-tools_v0.31.0", | ||
@@ -8,0 +23,0 @@ "version": "0.31.0", |
# Change Log - workspace-tools | ||
This log was last generated on Thu, 06 Apr 2023 19:44:29 GMT and should not be manually modified. | ||
This log was last generated on Thu, 06 Apr 2023 22:06:19 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## 0.32.0 | ||
Thu, 06 Apr 2023 22:06:19 GMT | ||
### Minor changes | ||
- making the dep graph generation to be much faster (kchau@microsoft.com) | ||
## 0.31.0 | ||
Thu, 06 Apr 2023 19:44:29 GMT | ||
Thu, 06 Apr 2023 19:44:34 GMT | ||
@@ -11,0 +19,0 @@ ### Minor changes |
@@ -10,2 +10,3 @@ "use strict"; | ||
function getPackageGraph(packages, scope = []) { | ||
const internalPackages = new Set(Object.keys(packages)); | ||
const key = memoizedKey(packages, scope); | ||
@@ -25,3 +26,3 @@ if (graphCache.has(key)) { | ||
const info = packages[pkg]; | ||
const deps = (0, getPackageDependencies_1.getPackageDependencies)(info, packages); | ||
const deps = (0, getPackageDependencies_1.getPackageDependencies)(info, internalPackages); | ||
if (deps.length > 0) { | ||
@@ -28,0 +29,0 @@ for (const dep of deps) { |
@@ -10,4 +10,5 @@ "use strict"; | ||
}; | ||
const internalPackages = new Set(Object.keys(packages)); | ||
for (const [pkg, info] of Object.entries(packages)) { | ||
const deps = (0, getPackageDependencies_1.getPackageDependencies)(info, packages, options); | ||
const deps = (0, getPackageDependencies_1.getPackageDependencies)(info, internalPackages, options); | ||
for (const dep of deps) { | ||
@@ -14,0 +15,0 @@ if (!map.dependencies.has(pkg)) { |
@@ -1,2 +0,2 @@ | ||
import { PackageInfo, PackageInfos } from "../types/PackageInfo"; | ||
import { PackageInfo } from "../types/PackageInfo"; | ||
export interface PackageDependenciesOptions { | ||
@@ -6,2 +6,2 @@ withDevDependencies?: boolean; | ||
} | ||
export declare function getPackageDependencies(info: PackageInfo, packages: PackageInfos, options?: PackageDependenciesOptions): string[]; | ||
export declare function getPackageDependencies(info: PackageInfo, packages: Set<string>, options?: PackageDependenciesOptions): string[]; |
@@ -5,10 +5,27 @@ "use strict"; | ||
function getPackageDependencies(info, packages, options = { withDevDependencies: true }) { | ||
const deps = { | ||
...info.dependencies, | ||
...(options.withDevDependencies && info.devDependencies), | ||
...(options.withPeerDependencies && info.peerDependencies), | ||
}; | ||
return Object.keys(packages).filter((pkg) => !!deps[pkg]); | ||
const deps = []; | ||
if (info.dependencies) { | ||
for (const dep of Object.keys(info.dependencies)) { | ||
if (dep !== info.name && packages.has(dep)) { | ||
deps.push(dep); | ||
} | ||
} | ||
} | ||
if (info.devDependencies && options.withDevDependencies) { | ||
for (const dep of Object.keys(info.devDependencies)) { | ||
if (dep !== info.name && packages.has(dep)) { | ||
deps.push(dep); | ||
} | ||
} | ||
} | ||
if (info.peerDependencies && options.withPeerDependencies) { | ||
for (const dep of Object.keys(info.peerDependencies)) { | ||
if (dep !== info.name && packages.has(dep)) { | ||
deps.push(dep); | ||
} | ||
} | ||
} | ||
return deps; | ||
} | ||
exports.getPackageDependencies = getPackageDependencies; | ||
//# sourceMappingURL=getPackageDependencies.js.map |
{ | ||
"name": "workspace-tools", | ||
"version": "0.31.0", | ||
"version": "0.32.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
216829
3941
1