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

[rush-lib] Refactor alwaysInjectDependenciesFromOtherSubspaces logic #4724

Closed
wants to merge 2 commits into from

Conversation

g-chao
Copy link
Contributor

@g-chao g-chao commented May 18, 2024

Summary

We check the injected settings in the package.json to tell if a dependency is injected or not.
However, in the current alwaysInjectDependenciesFromOtherSubspaces implementation, user no need to set injected settings in package.json for these cross subspace dependencies. This leads to inconvenience to check if a dependency is injected or not.

The alternative we check the version representation in pnpm-lock.yaml to see if it is started with file:, if yes, then it is a injected dependency. But, this method also has drawback, not all dependencies started with file: is the injected dependency, for example , we can't treat this file:./tarball/colors-1.4.0.tgz as a injected dependency.

So, we need to refactor the alwaysInjectDependenciesFromOtherSubspaces logic. Now, if user enable this logic, we write injected:true in the package.json

Details

How it was tested

Impacted documentation

"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Refactor the alwaysInjectDependenciesFromOtherSubspaces logic.",
Copy link
Member

Choose a reason for hiding this comment

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

Is this refactoring relevant to a Rush user? If it is, can you update this to explain what the changes are?

@g-chao g-chao closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants