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

feat(boundaries): implicit dependencies #10117

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

Merged
merged 5 commits into from
Mar 7, 2025

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Mar 6, 2025

Description

Allow users to allowlist implicit dependencies for boundaries. This is useful in cases where testing libraries or frameworks can inject globals such as server-only

Can be reviewed commit by commit

Testing Instructions

Added test to boundaries. Note the snapshots do not change since no errors are produced. To verify stuff is working as intended, try removing the implicitDependencies key and note that an error is produced.

@NicholasLYang NicholasLYang requested a review from a team as a code owner March 6, 2025 19:38
Copy link

vercel bot commented Mar 6, 2025

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 Mar 7, 2025 6:07pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 6:07pm

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

My only concert is the possibility of using implicitDependencies to cover up a bad package graph.

pub tags: Option<Spanned<RulesMap>>,
pub implicit_dependencies: Option<Spanned<Vec<Spanned<String>>>>,
Copy link
Member

Choose a reason for hiding this comment

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

Just noticed in the snapshots we're serializing "implicitDependencies": null, maybe #[serde(skip_serializing_if = "Option::is_none")]?

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.

2 participants