package-filter

Run pnpm commands in specific monorepo workspace packages using filters.

80|49|Updated Mar 27, 2022
One-click install
npx skills add https://github.com/cartridge-gg/controller --skill package-filter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: package-filter
Source: https://github.com/cartridge-gg/controller/tree/main/.agents/skills/package-filter
Command: npx skills add https://github.com/cartridge-gg/controller --skill package-filter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Run commands in specific workspace packages within a monorepo using pnpm filters.

Core Features & Use Cases

  • Narrow command execution to a single or subset of workspace packages with pnpm --filter.
  • Access common filters for the main packages like @cartridge/controller, @cartridge/keychain, @cartridge/connector, and @cartridge/profile.
  • Leverage automatic workspace linking and recursive operations with pnpm -r for large monorepos.

Quick Start

Identify the target workspace package and run commands using pnpm --filter <package> <command>.

Frequently Asked Questions about package-filter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run commands in specific workspace packages within a monorepo?

Run commands in specific workspace packages within a monorepo using pnpm filters. You can narrow command execution to a single or subset of packages with pnpm --filter <package> <command>.

What is a pnpm filter and how does it work for monorepos?

A pnpm filter targets specific workspace packages within a monorepo for command execution. It allows you to apply tasks like testing or building to selected packages while preserving automatic workspace linking.

Can I use pnpm filters to update dependencies for a single package?

Yes, pnpm filters support targeted dependency updates for a single package. Using pnpm --filter <package> <command> narrows the dependency update scope while maintaining workspace linkage.

What is the best way to execute recursive operations across a large pnpm monorepo?

The best way to execute recursive operations across a large pnpm monorepo is using pnpm -r. This leverages automatic workspace linking to run commands across all packages efficiently.

Why does running a command on a workspace package affect its linked dependencies?

Running a command on a workspace package affects linked dependencies because pnpm filters preserve workspace linkage. This ensures local packages remain connected during targeted testing, building, or updates.

Do I need pnpm to manage workspace package commands?

Yes, you need pnpm to manage workspace package commands using filters. The functionality relies on pnpm --filter and pnpm -r to target packages like @cartridge/controller within a monorepo.