-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(boundaries): support tsconfig path aliases #10002
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
feat(boundaries): support tsconfig path aliases #10002
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
f840124
to
5f837e5
Compare
5f837e5
to
3289c87
Compare
3289c87
to
7e49606
Compare
5b3c253
to
6468a37
Compare
pub type PackageKey = String; | ||
pub type PackageVersion = String; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like these type aliases, can we keep them contained to this crate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to have the type be BTreeMap<String, String>
, since that's sort of opaque. Should I just copy them over?
if let Some(config) = self.configs.get(dir) { | ||
return Some(config.clone()); | ||
} | ||
if let Ok(config) = self.resolver.resolve_tsconfig(dir) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add debug log when we fail to resolve a ts config?
Description
Support tsconfig path aliases such as:
We check if we can resolve the import as a path alias and if so, check the resolved path
Can be reviewed commit by commit
Testing Instructions
Turns out we already had a test for this in
turborepo-tests/integration/fixtures/boundaries/apps/my-app/types.ts
. Added another import and updated snapshot