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

feat(boundaries): package name as tag punning #10151

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 13, 2025

Conversation

NicholasLYang
Copy link
Contributor

Description

Allows a package name to be used as a tag (tag punning). We're adding this feature to help users define an explicit set of packages that their package can be imported by. Combined with the ability to define package rules in a package turbo.json (next PR after this, coming soon), and code owner restrictions, this will permit package owners to control who can import their package.

Testing Instructions

Added test in boundaries_tags fixture

@NicholasLYang NicholasLYang requested review from anthonyshew and a team as code owners March 12, 2025 21:13
@NicholasLYang NicholasLYang requested a review from tknickman March 12, 2025 21:13
Copy link

vercel bot commented Mar 12, 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 12, 2025 9:49pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2025 9:49pm

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.

Awesome feature!

Comment on lines +116 to +121
impl Spanned<String> {
pub fn as_str(&self) -> &str {
self.value.as_str()
}
}

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is needed since Spanned already implements deref?

Suggested change
impl Spanned<String> {
pub fn as_str(&self) -> &str {
self.value.as_str()
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does Rust chain derefs? When I did as_deref for Option<Spanned<String>>, I got Option<&String> and not Option<&str>?

Copy link
Member

Choose a reason for hiding this comment

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

I think you need to specify the deref type sometimes to help out. I know I've needed to do that when working with Cow sometimes

@NicholasLYang NicholasLYang merged commit 71b078b into main Mar 13, 2025
44 checks passed
@NicholasLYang NicholasLYang deleted the nicholasyang/boundaries-tag-punning branch March 13, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs Improvements or additions to documentation pkg: turbo-repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants