Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workspace-tools

Package Overview
Dependencies
Maintainers
3
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workspace-tools - npm Package Compare versions

Comparing version 0.31.0 to 0.32.0

17

CHANGELOG.json

@@ -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

3

lib/dependencies/transitiveDeps.js

@@ -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

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