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

Dependency-checks rule does not respect the pnpm workspace: * version signature #26707

Closed
4 tasks
meeroslav opened this issue Jun 26, 2024 · 0 comments · Fixed by #26709
Closed
4 tasks

Dependency-checks rule does not respect the pnpm workspace: * version signature #26707

meeroslav opened this issue Jun 26, 2024 · 0 comments · Fixed by #26709
Assignees
Labels
scope: linter Issues related to Eslint support in Nx type: bug

Comments

@meeroslav
Copy link
Contributor

Current Behavior

I am working on few various types of NX monorepo package based projects and I have faced an issue with nx-dependency-checks eslint rule after upgrading to PNPM version 9.

PNPM enforces to use "workspace:" protocol for workspace packages but ESLint fails when I use my workspace libraries with such depndendencies mark.

I am using ESLint flat config and so far I have been marking my workspace packages devDependencies in package.json as e.g. "@org/my-lib": "" but after upgrading to PNPM v9, I changed marks to "@org/my-lib": "workspace:".

ESLint fails with error:
The version specifier does not contain the installed version of "@org/my-lib" package: 0.0.1

Expected Behavior

ESLint properly maps the version, like it does for *

GitHub Repo

No response

Steps to Reproduce

  1. Create several libs in pnpm workspace with pnpm v9
  2. Set pnpm workspace
  3. Import lib A into lib B
  4. Run lint with dependency-checks on lib B

Nx Report

19.2.0 (likely on all v19 versions)

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

My pnpm-workspace.yaml looks like this:
packages:

  • 'apps/**'
  • 'libs/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant