Skip to content
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

refactor: use relative imports within npm packages #30588

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewseguin
Copy link
Contributor

@andrewseguin andrewseguin commented Mar 5, 2025

Switch to using relative imports within directories under the broad npm packages like @angular/material and @angular/cdk.

@andrewseguin andrewseguin requested a review from a team as a code owner March 5, 2025 20:07
@andrewseguin andrewseguin requested review from crisbeto and wagnermaciel and removed request for a team March 5, 2025 20:07
@andrewseguin andrewseguin changed the title Pkg refactor: use relative imports within npm packages Mar 5, 2025
@andrewseguin andrewseguin requested a review from devversion March 5, 2025 20:07
@andrewseguin andrewseguin added the target: patch This PR is targeted for the next patch release label Mar 5, 2025
@@ -6,7 +6,8 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ObserversModule} from '@angular/cdk/observers';
// @ng_package: ignore-cross-repo-import
import {ObserversModule} from '../observers';
Copy link
Member

Choose a reason for hiding this comment

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

I was under the impression that cross-package imports should still be absolute?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked with @devversion to confirm that everything within src/material should be relative to each other since they are all shared under the @angular/material npm package. Likewise with cdk

@andrewseguin andrewseguin force-pushed the pkg branch 6 times, most recently from 64d33af to 213b622 Compare March 7, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants