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

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
@vercel
Copy link
Contributor

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
Contributor

@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 struct RootBoundariesConfig {
pub struct BoundariesConfig {
pub tags: Option<Spanned<RulesMap>>,
pub implicit_dependencies: Option<Spanned<Vec<Spanned<String>>>>,
Copy link
Contributor

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.

3 participants