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

fix(linter): dependency-check-support-catalogs #29923

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

ryanbas21
Copy link
Contributor

@ryanbas21 ryanbas21 commented Feb 7, 2025

Current Behavior

Currently there doesn't seem to be support for pnpm catalogs in the dependency check which throws an error.

Expected Behavior

Catalog should be supported and at least not throw an error since its a default rule in some generators.
I noticed that also that only workspace:* was implemented so I added the other possible options.

https://pnpm.io/workspaces#publishing-workspace-packages

I copy and pasted a test twice to add tests for this.

I mean ideally I guess we would check the pnpm-workspace file and say is this catalog defined, I don't think that's up my ally for this purpose and I'm not sure if how its implemented does that for the workspace protocols as well.

Related Issue(s)

Fixes #
closed #29903, #29959

Gave it a shot, not sure if this is gonna be comprehensive enough. But let me know! happy to try and get this right.

@ryanbas21 ryanbas21 requested a review from a team as a code owner February 7, 2025 02:32
Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 7:31pm

Copy link

nx-cloud bot commented Feb 11, 2025

View your CI Pipeline Execution ↗ for commit b64ab8b.


☁️ Nx Cloud last updated this comment at 2025-02-11 20:19:05 UTC

@jaysoo
Copy link
Member

jaysoo commented Feb 11, 2025

Thanks @ryanbas21 this PR looks good overall. We can use this to fix #29959 as well. I can check it out and make minor changes to ensure both issues are addressed.

ryanbas21 and others added 2 commits February 11, 2025 14:15
…orkspace protocol

added support in dependency check lint rule to check

for named and unnamed catalogs

also added rest of workspace protocol

closed nrwl#29903
@jaysoo jaysoo force-pushed the support-catalogs-dependency-check branch from f38671d to b64ab8b Compare February 11, 2025 19:28
@jaysoo
Copy link
Member

jaysoo commented Feb 11, 2025

I pushed an update, once the CI is green I'll merge. Thanks again.

@jaysoo
Copy link
Member

jaysoo commented Feb 11, 2025

Not sure why the 1 pending check is still showing as pending. The last CI run ran successfully so I'll merge it: https://staging.nx.app/cipes/67aba57ab4efc06ae52cea88

@jaysoo jaysoo merged commit 2d9a673 into nrwl:master Feb 11, 2025
12 of 14 checks passed
jaysoo added a commit that referenced this pull request Feb 12, 2025
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
Currently there doesn't seem to be support for pnpm catalogs in the
dependency check which throws an error.



## Expected Behavior
Catalog should be supported and at least not throw an error since its a
default rule in some generators.
I noticed that also that only `workspace:*` was implemented so I added
the other possible options.

https://pnpm.io/workspaces#publishing-workspace-packages

I copy and pasted a test twice to add tests for this.

I mean ideally I guess we would check the `pnpm-workspace` file and say
is this catalog defined, I don't think that's up my ally for this
purpose and I'm not sure if how its implemented does that for the
workspace protocols as well.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
closed #29903, #29959


Gave it a shot, not sure if this is gonna be comprehensive enough. But
let me know! happy to try and get this right.

---------

Co-authored-by: Jack Hsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@nx/dependency-checks does not seem to support pnpm-catalogs
2 participants