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

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 a team and anthonyshew as code owners March 12, 2025 21:13
@NicholasLYang NicholasLYang requested a review from tknickman March 12, 2025 21:13
@vercel
Copy link
Contributor

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
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.

Awesome feature!

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

Copy link
Contributor

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
Contributor

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.

4 participants