这是indexloc提供的服务,不要输入任何密码
Skip to content

feat(query): map file to package #9174

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

NicholasLYang
Copy link
Contributor

Description

Adding some queries so you can go from a file to the package it's from, or even the packages that it affects.

Testing Instructions

Copy link

vercel bot commented Sep 20, 2024

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

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 0:55am

}

#[derive(Union)]
enum PackageMapping {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Union types in GraphQL are pretty annoying. Maybe I should change this to just return all the packages? I'm a little worried that could be too much data.

Ok(Some(PackageMapping::All(_))) => Ok(self
.run
.pkg_dep_graph()
.packages()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be sorted?

@tknickman
Copy link
Member

@NicholasLYang do we still need this one / can you clean up the conflicts?

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.

4 participants