
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
get-workspaces
Advanced tools
Get workspaces for yarn workspaces, bolt workspaces, or the root package for building repo-agnostic tools
A simple utility to get workspaces, whether they be yarn or bolt.
This library exports a very simple function that looks at a package.json, and generates
the glob of accepted workspaces from the workspaces
field. It is intended mostly for
use of developers building tools that want to support both kinds of mono-repos as an easy
way to write tools for both.
import getWorkspaces from "get-workspaces";
const workspaces = await getWorkspaces();
Workspaces have the shape:
{
name // The name from the package.json
config // The package.json of the package
dir // The directory of the package
}
We assume the function is being run from a directory with the package.json you want to target, however you can pass in a working directory if you want. In addition, you can change what tools the package will scan for.
const workspaces = await getWorkspaces({ cwd, tools });
The tools supported are yarn
, bolt
, and root
, which returns the root package as a single workspace if passed.
Tools is an array, so you can try for one type of workspace and then another, so you could do:
getWorkspaces({ tools: ["bolt", "yarn", "root"] });
FAQs
Get workspaces for yarn workspaces, bolt workspaces, or the root package for building repo-agnostic tools
The npm package get-workspaces receives a total of 14,160 weekly downloads. As such, get-workspaces popularity was classified as popular.
We found that get-workspaces demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.