Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Syncpack should pass linting for pnpm default workspace behavior without extra configuration #252

Open
1 task done
VanTanev opened this issue Nov 18, 2024 · 1 comment

Comments

@VanTanev
Copy link

VanTanev commented Nov 18, 2024

Description

Currently, syncpack will fail in the following case:

// packages/ui/package.json
{
  "name": "@monorepo/ui",
  "version": "1.0.0"
}
// apps/store/package.json
{
  "name": "store"
  "dependencies": {
    "@monorepo/ui": "workspace:^"
  }
}

Error would be:

= Default Version Group ========================================================
✘ @monorepo/ui workspace:^ → 1.0.0 apps/store/package.json > dependencies [LocalPackageMismatch]

This is undesirable because workspace:^ is the default version specifier used by pnpm add --workspace @monorepo/ui.

To make a monorepo work, one needs to add custom syncpack config: https://jamiemason.github.io/syncpack/examples/pnpm-workspace-protocol/

Suggested Solution

Syncpack should support local packages with workspace:^ and workspace:* version ranges without any additional config.

Optional comments

No response

Code of Conduct

@JamieMason
Copy link
Owner

Thanks a lot @VanTanev, I made a start on this on the v14 branch after our chat. The next alpha release will include some changes for this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants