link-workspace-packages

Link workspace dependencies across pnpm, yarn, npm, and bun in a monorepo.

2|Updated Sep 2, 2024
One-click install
npx skills add https://github.com/e-burgos/tucu-ui --skill link-workspace-packages-e-burgos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: link-workspace-packages
Source: https://github.com/e-burgos/tucu-ui/tree/main/.cursor/skills/link-workspace-packages
Command: npx skills add https://github.com/e-burgos/tucu-ui --skill link-workspace-packages-e-burgos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Link workspace dependencies across package managers to wire up local packages in a monorepo, preventing misaligned pointers and manual edits.

Core Features & Use Cases

  • Identify consumer and provider packages and wire dependencies across pnpm, yarn, npm, and bun.
  • Apply the correct workspace syntax, verify symlinks in consumer's node_modules, and avoid manual edits to tsconfig paths or package.json.
  • Use cases include onboarding new packages, resolving resolution errors for workspace packages, and maintaining consistent internal dependencies.

Quick Start

Use this skill to wire up a consumer package with its provider in your monorepo using workspace syntax.

Frequently Asked Questions about link-workspace-packages

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

FAQPage Schema
How do I link workspace dependencies across different package managers in a monorepo?

To link workspace dependencies across package managers, you identify consumer and provider packages, apply the correct workspace syntax for pnpm, yarn, npm, or bun, and verify symlinks in node_modules without manual path edits.

Why are my workspace package symlinks broken in node_modules after adding a new package?

Broken workspace package symlinks often happen when the root workflow misapplies workspace syntax or fails to detect the correct package manager from lockfiles, causing misaligned pointers that require workspace validation to fix.

Does this approach work for wiring local packages with both pnpm and bun?

Yes, wiring local packages works for pnpm and bun by inspecting the root package.json and lockfiles to detect the package manager, then applying the specific workspace syntax and verifying the resulting symlinks for each tool.

What is the best way to resolve internal dependency resolution errors in a monorepo?

The best way to resolve internal dependency errors is to use workspace syntax to wire consumer and provider packages, verifying symlinks in the consumer's node_modules and validating the root workflow to avoid manual tsconfig or package.json edits.

When do I need to validate workspace symlinks instead of manually editing tsconfig paths?

You need to validate workspace symlinks when onboarding new packages or maintaining consistent internal dependencies, ensuring commands accurately wire dependencies across pnpm, yarn, npm, and bun without requiring manual tsconfig path edits.

Can I avoid manual package.json edits when wiring up local monorepo packages?

Yes, you can avoid manual package.json edits by applying correct workspace syntax for your detected package manager and verifying that symlinks in the consumer's node_modules accurately point to the provider packages.