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

@lage-run/target-graph

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lage-run/target-graph

Target for Lage

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2K
decreased by-5.88%
Maintainers
1
Weekly downloads
 
Created
Source

@lage-run/target-graph

This package is concerned about the target graph. The target is a unit of work that gets spawned in a child process eventually be a scheduler + target runner. The main focus of this package are:

  1. Target interface
  2. converter that changes from target ID to package + task, and vice versa
  3. A TargetGraphBuilder that will take in PackageInfos object with some task (dependency) configuration and builds a direct-acyclic graph of the targets.

TargetGraphBuilder usage

const rootDir = getWorkspaceRoot(process.cwd());
const packageInfos = getPackageInfos(rootDir);

const builder = new TargetGraphBuilder(rootDir, packageInfos);

const tasks = ["build", "test"];
const packages = ["package-a", "package-b"];

const targetGraph = builder.buildTargetGraph(tasks, packages);

The resultant targetGraph will have a signature of this shape:

interface TargetGraph {
  targets: Map<string, Target>;
  dependencies: [string, string][];
}

Target

This is merely an interface that contains enough information to let the runner & scheduler know what to run. The "how" of how to run a target resides in the scheduler and a separate runner implementation.

FAQs

Package last updated on 09 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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